diff options
author | Steven Rostedt <srostedt@redhat.com> | 2010-06-10 19:17:48 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-06-10 19:17:48 -0400 |
commit | cfb08f6326b43a80ff41edfde9ba70e49e9af0d0 (patch) | |
tree | 808d29ca9bd7d0b104a59e5f426ff07d116a67cd | |
parent | 70d7fbe0f8c4f6066b67823bbbca6291bd2a2f27 (diff) |
kernelshark: Group list filters together
Move the filters around so that the graph filters
are all together, and the list filters are all together.
This makes accessing the filters a bit easier when they
are separate.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | kernel-shark.c | 87 |
1 files changed, 43 insertions, 44 deletions
diff --git a/kernel-shark.c b/kernel-shark.c index 5dde3dc..2f2d968 100644 --- a/kernel-shark.c +++ b/kernel-shark.c | |||
@@ -1682,145 +1682,144 @@ void kernel_shark(int argc, char **argv) | |||
1682 | gtk_widget_show(sub_item); | 1682 | gtk_widget_show(sub_item); |
1683 | 1683 | ||
1684 | 1684 | ||
1685 | /* --- Filter - List Tasks Option --- */ | 1685 | /* --- Filter - Graph Tasks Option --- */ |
1686 | 1686 | ||
1687 | sub_item = gtk_menu_item_new_with_label("list tasks"); | 1687 | sub_item = gtk_menu_item_new_with_label("tasks"); |
1688 | 1688 | ||
1689 | /* Add them to the menu */ | 1689 | /* Add them to the menu */ |
1690 | gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item); | 1690 | gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item); |
1691 | 1691 | ||
1692 | /* We can attach the Quit menu item to our exit function */ | 1692 | /* We can attach the Quit menu item to our exit function */ |
1693 | g_signal_connect_swapped (G_OBJECT (sub_item), "activate", | 1693 | g_signal_connect_swapped (G_OBJECT (sub_item), "activate", |
1694 | G_CALLBACK (list_tasks_clicked), | 1694 | G_CALLBACK (graph_tasks_clicked), |
1695 | (gpointer) info); | 1695 | (gpointer) info); |
1696 | 1696 | ||
1697 | info->list_task_menu = sub_item; | 1697 | info->graph_task_menu = sub_item; |
1698 | 1698 | ||
1699 | /* Only show this item when list and graph tasks are not synced */ | 1699 | /* We do need to show menu items */ |
1700 | gtk_widget_show(sub_item); | ||
1700 | 1701 | ||
1701 | 1702 | ||
1702 | /* --- Filter - Graph Tasks Option --- */ | 1703 | /* --- Filter - Graph Hide Tasks Option --- */ |
1703 | 1704 | ||
1704 | sub_item = gtk_menu_item_new_with_label("tasks"); | 1705 | sub_item = gtk_menu_item_new_with_label("hide tasks"); |
1705 | 1706 | ||
1706 | /* Add them to the menu */ | 1707 | /* Add them to the menu */ |
1707 | gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item); | 1708 | gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item); |
1708 | 1709 | ||
1709 | /* We can attach the Quit menu item to our exit function */ | 1710 | /* We can attach the Quit menu item to our exit function */ |
1710 | g_signal_connect_swapped (G_OBJECT (sub_item), "activate", | 1711 | g_signal_connect_swapped (G_OBJECT (sub_item), "activate", |
1711 | G_CALLBACK (graph_tasks_clicked), | 1712 | G_CALLBACK (graph_hide_tasks_clicked), |
1712 | (gpointer) info); | 1713 | (gpointer) info); |
1713 | 1714 | ||
1714 | info->graph_task_menu = sub_item; | 1715 | info->graph_hide_task_menu = sub_item; |
1715 | 1716 | ||
1716 | /* We do need to show menu items */ | 1717 | /* We do need to show menu items */ |
1717 | gtk_widget_show(sub_item); | 1718 | gtk_widget_show(sub_item); |
1718 | 1719 | ||
1719 | 1720 | ||
1720 | /* --- Filter - List Hide Tasks Option --- */ | ||
1721 | 1721 | ||
1722 | sub_item = gtk_menu_item_new_with_label("list hide tasks"); | 1722 | /* --- Filter - Events Option --- */ |
1723 | |||
1724 | /* The list and graph events start off insync */ | ||
1725 | sub_item = gtk_menu_item_new_with_label("events"); | ||
1723 | 1726 | ||
1724 | /* Add them to the menu */ | 1727 | /* Add them to the menu */ |
1725 | gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item); | 1728 | gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item); |
1726 | 1729 | ||
1727 | /* We can attach the Quit menu item to our exit function */ | 1730 | /* We can attach the Quit menu item to our exit function */ |
1728 | g_signal_connect_swapped (G_OBJECT (sub_item), "activate", | 1731 | g_signal_connect_swapped (G_OBJECT (sub_item), "activate", |
1729 | G_CALLBACK (list_hide_tasks_clicked), | 1732 | G_CALLBACK (graph_events_clicked), |
1730 | (gpointer) info); | 1733 | (gpointer) info); |
1731 | 1734 | ||
1732 | info->list_hide_task_menu = sub_item; | 1735 | info->graph_events_menu = sub_item; |
1733 | 1736 | ||
1734 | /* Only show this item when list and graph tasks are not synced */ | 1737 | /* We do need to show menu items */ |
1738 | gtk_widget_show(sub_item); | ||
1735 | 1739 | ||
1736 | 1740 | ||
1737 | /* --- Filter - Graph Hide Tasks Option --- */ | 1741 | /* --- Filter - Graph Advanced Events Option --- */ |
1738 | 1742 | ||
1739 | sub_item = gtk_menu_item_new_with_label("hide tasks"); | 1743 | /* The list and graph events start off in sync */ |
1744 | sub_item = gtk_menu_item_new_with_label("advanced events"); | ||
1740 | 1745 | ||
1741 | /* Add them to the menu */ | 1746 | /* Add them to the menu */ |
1742 | gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item); | 1747 | gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item); |
1743 | 1748 | ||
1744 | /* We can attach the Quit menu item to our exit function */ | 1749 | /* We can attach the Quit menu item to our exit function */ |
1745 | g_signal_connect_swapped (G_OBJECT (sub_item), "activate", | 1750 | g_signal_connect_swapped (G_OBJECT (sub_item), "activate", |
1746 | G_CALLBACK (graph_hide_tasks_clicked), | 1751 | G_CALLBACK (adv_graph_filter_clicked), |
1747 | (gpointer) info); | 1752 | (gpointer) info); |
1748 | 1753 | ||
1749 | info->graph_hide_task_menu = sub_item; | 1754 | info->graph_adv_events_menu = sub_item; |
1750 | 1755 | ||
1751 | /* We do need to show menu items */ | 1756 | /* We do need to show menu items */ |
1752 | gtk_widget_show(sub_item); | 1757 | gtk_widget_show(sub_item); |
1753 | 1758 | ||
1759 | /* --- Filter - List Tasks Option --- */ | ||
1754 | 1760 | ||
1755 | /* --- Filter - List Events Option --- */ | 1761 | sub_item = gtk_menu_item_new_with_label("list tasks"); |
1756 | |||
1757 | sub_item = gtk_menu_item_new_with_label("list events"); | ||
1758 | 1762 | ||
1759 | /* Add them to the menu */ | 1763 | /* Add them to the menu */ |
1760 | gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item); | 1764 | gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item); |
1761 | 1765 | ||
1762 | /* We can attach the Quit menu item to our exit function */ | 1766 | /* We can attach the Quit menu item to our exit function */ |
1763 | g_signal_connect_swapped (G_OBJECT (sub_item), "activate", | 1767 | g_signal_connect_swapped (G_OBJECT (sub_item), "activate", |
1764 | G_CALLBACK (list_events_clicked), | 1768 | G_CALLBACK (list_tasks_clicked), |
1765 | (gpointer) info); | 1769 | (gpointer) info); |
1766 | 1770 | ||
1767 | info->list_events_menu = sub_item; | 1771 | info->list_task_menu = sub_item; |
1768 | 1772 | ||
1769 | /* We do not show this menu (yet) */ | 1773 | /* Only show this item when list and graph tasks are not synced */ |
1770 | 1774 | ||
1771 | 1775 | ||
1772 | /* --- Filter - Events Option --- */ | 1776 | /* --- Filter - List Hide Tasks Option --- */ |
1773 | 1777 | ||
1774 | /* The list and graph events start off insync */ | 1778 | sub_item = gtk_menu_item_new_with_label("list hide tasks"); |
1775 | sub_item = gtk_menu_item_new_with_label("events"); | ||
1776 | 1779 | ||
1777 | /* Add them to the menu */ | 1780 | /* Add them to the menu */ |
1778 | gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item); | 1781 | gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item); |
1779 | 1782 | ||
1780 | /* We can attach the Quit menu item to our exit function */ | 1783 | /* We can attach the Quit menu item to our exit function */ |
1781 | g_signal_connect_swapped (G_OBJECT (sub_item), "activate", | 1784 | g_signal_connect_swapped (G_OBJECT (sub_item), "activate", |
1782 | G_CALLBACK (graph_events_clicked), | 1785 | G_CALLBACK (list_hide_tasks_clicked), |
1783 | (gpointer) info); | 1786 | (gpointer) info); |
1784 | 1787 | ||
1785 | info->graph_events_menu = sub_item; | 1788 | info->list_hide_task_menu = sub_item; |
1786 | |||
1787 | /* We do need to show menu items */ | ||
1788 | gtk_widget_show(sub_item); | ||
1789 | 1789 | ||
1790 | /* Only show this item when list and graph tasks are not synced */ | ||
1790 | 1791 | ||
1791 | /* --- Filter - List Advanced Events Option --- */ | 1792 | /* --- Filter - List Events Option --- */ |
1792 | 1793 | ||
1793 | sub_item = gtk_menu_item_new_with_label("list advanced event"); | 1794 | sub_item = gtk_menu_item_new_with_label("list events"); |
1794 | 1795 | ||
1795 | /* Add them to the menu */ | 1796 | /* Add them to the menu */ |
1796 | gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item); | 1797 | gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item); |
1797 | 1798 | ||
1798 | /* We can attach the Quit menu item to our exit function */ | 1799 | /* We can attach the Quit menu item to our exit function */ |
1799 | g_signal_connect_swapped (G_OBJECT (sub_item), "activate", | 1800 | g_signal_connect_swapped (G_OBJECT (sub_item), "activate", |
1800 | G_CALLBACK (adv_list_filter_clicked), | 1801 | G_CALLBACK (list_events_clicked), |
1801 | (gpointer) info); | 1802 | (gpointer) info); |
1802 | 1803 | ||
1803 | info->list_adv_events_menu = sub_item; | 1804 | info->list_events_menu = sub_item; |
1805 | |||
1804 | /* We do not show this menu (yet) */ | 1806 | /* We do not show this menu (yet) */ |
1805 | 1807 | ||
1806 | 1808 | ||
1807 | /* --- Filter - Graph Advanced Events Option --- */ | 1809 | /* --- Filter - List Advanced Events Option --- */ |
1808 | 1810 | ||
1809 | /* The list and graph events start off in sync */ | 1811 | sub_item = gtk_menu_item_new_with_label("list advanced event"); |
1810 | sub_item = gtk_menu_item_new_with_label("advanced events"); | ||
1811 | 1812 | ||
1812 | /* Add them to the menu */ | 1813 | /* Add them to the menu */ |
1813 | gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item); | 1814 | gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item); |
1814 | 1815 | ||
1815 | /* We can attach the Quit menu item to our exit function */ | 1816 | /* We can attach the Quit menu item to our exit function */ |
1816 | g_signal_connect_swapped (G_OBJECT (sub_item), "activate", | 1817 | g_signal_connect_swapped (G_OBJECT (sub_item), "activate", |
1817 | G_CALLBACK (adv_graph_filter_clicked), | 1818 | G_CALLBACK (adv_list_filter_clicked), |
1818 | (gpointer) info); | 1819 | (gpointer) info); |
1819 | 1820 | ||
1820 | info->graph_adv_events_menu = sub_item; | 1821 | info->list_adv_events_menu = sub_item; |
1821 | 1822 | /* We do not show this menu (yet) */ | |
1822 | /* We do need to show menu items */ | ||
1823 | gtk_widget_show(sub_item); | ||
1824 | 1823 | ||
1825 | 1824 | ||
1826 | /* --- Filter - CPUs Option --- */ | 1825 | /* --- Filter - CPUs Option --- */ |