aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2010-09-02 15:38:04 +0000
committerAnders Broman <anders.broman@ericsson.com>2010-09-02 15:38:04 +0000
commitb6fc233757ff02cd48a66b17ec09ad9f00f9a7b8 (patch)
tree6a651b204a865e27687c76f5f9197f00ae14ba54 /gtk
parentf32d9a570c64181552eede955909c02e0c21b6e3 (diff)
Remove the depricated GtkItemFactory code.
svn path=/trunk/; revision=34042
Diffstat (limited to 'gtk')
-rw-r--r--gtk/proto_hier_stats_dlg.c62
1 files changed, 2 insertions, 60 deletions
diff --git a/gtk/proto_hier_stats_dlg.c b/gtk/proto_hier_stats_dlg.c
index fd2103b0e4..9e148556d0 100644
--- a/gtk/proto_hier_stats_dlg.c
+++ b/gtk/proto_hier_stats_dlg.c
@@ -93,57 +93,8 @@ proto_hier_select_filter_cb(GtkWidget *widget _U_, gpointer callback_data _U_, g
g_free (str);
}
-#define PROTO_HIER_STATS_USE_GUIMANAGER 1
-#ifndef PROTO_HIER_STATS_USE_GUIMANAGER
-static GtkItemFactoryEntry proto_hier_list_menu_items[] =
-{
- /* Match */
- {"/Apply as Filter", NULL, NULL, 0, "<Branch>", NULL,},
- {"/Apply as Filter/Selected", NULL,
- GTK_MENU_FUNC(proto_hier_select_filter_cb), CALLBACK_MATCH(ACTYPE_SELECTED, 0), NULL, NULL,},
- {"/Apply as Filter/Not Selected", NULL,
- GTK_MENU_FUNC(proto_hier_select_filter_cb), CALLBACK_MATCH(ACTYPE_NOT_SELECTED, 0), NULL, NULL,},
- {"/Apply as Filter/... and Selected", NULL,
- GTK_MENU_FUNC(proto_hier_select_filter_cb), CALLBACK_MATCH(ACTYPE_AND_SELECTED, 0), NULL, NULL,},
- {"/Apply as Filter/... or Selected", NULL,
- GTK_MENU_FUNC(proto_hier_select_filter_cb), CALLBACK_MATCH(ACTYPE_OR_SELECTED, 0), NULL, NULL,},
- {"/Apply as Filter/... and not Selected", NULL,
- GTK_MENU_FUNC(proto_hier_select_filter_cb), CALLBACK_MATCH(ACTYPE_AND_NOT_SELECTED, 0), NULL, NULL,},
- {"/Apply as Filter/... or not Selected", NULL,
- GTK_MENU_FUNC(proto_hier_select_filter_cb), CALLBACK_MATCH(ACTYPE_OR_NOT_SELECTED, 0), NULL, NULL,},
-
- /* Prepare */
- {"/Prepare a Filter", NULL, NULL, 0, "<Branch>", NULL,},
- {"/Prepare a Filter/Selected", NULL,
- GTK_MENU_FUNC(proto_hier_select_filter_cb), CALLBACK_PREPARE(ACTYPE_SELECTED, 0), NULL, NULL,},
- {"/Prepare a Filter/Not Selected", NULL,
- GTK_MENU_FUNC(proto_hier_select_filter_cb), CALLBACK_PREPARE(ACTYPE_NOT_SELECTED, 0), NULL, NULL,},
- {"/Prepare a Filter/... and Selected", NULL,
- GTK_MENU_FUNC(proto_hier_select_filter_cb), CALLBACK_PREPARE(ACTYPE_AND_SELECTED, 0), NULL, NULL,},
- {"/Prepare a Filter/... or Selected", NULL,
- GTK_MENU_FUNC(proto_hier_select_filter_cb), CALLBACK_PREPARE(ACTYPE_OR_SELECTED, 0), NULL, NULL,},
- {"/Prepare a Filter/... and not Selected", NULL,
- GTK_MENU_FUNC(proto_hier_select_filter_cb), CALLBACK_PREPARE(ACTYPE_AND_NOT_SELECTED, 0), NULL, NULL,},
- {"/Prepare a Filter/... or not Selected", NULL,
- GTK_MENU_FUNC(proto_hier_select_filter_cb), CALLBACK_PREPARE(ACTYPE_OR_NOT_SELECTED, 0), NULL, NULL,},
-
- /* Find Frame */
- {"/Find Frame", NULL, NULL, 0, "<Branch>", NULL,},
- {"/Find Frame/Find Frame", NULL,
- GTK_MENU_FUNC(proto_hier_select_filter_cb), CALLBACK_FIND_FRAME(ACTYPE_SELECTED, 0), NULL, NULL,},
- /* Find Next */
- {"/Find Frame/Find Next", NULL,
- GTK_MENU_FUNC(proto_hier_select_filter_cb), CALLBACK_FIND_NEXT(ACTYPE_SELECTED, 0), NULL, NULL,},
- /* Find Previous */
- {"/Find Frame/Find Previous", NULL,
- GTK_MENU_FUNC(proto_hier_select_filter_cb), CALLBACK_FIND_PREVIOUS(ACTYPE_SELECTED, 0), NULL, NULL,},
- /* Colorize Protocol */
- {"/Colorize Protocol", NULL,
- GTK_MENU_FUNC(proto_hier_select_filter_cb), CALLBACK_COLORIZE(ACTYPE_SELECTED, 0), NULL, NULL,}
-};
-#else /* PROTO_HIER_STATS_USE_GUIMANAGER */
-/* Prepare to change GtkItemFactory to GtkUIManager */
+/* Action callbacks */
static void
apply_as_selected_cb(GtkWidget *widget, gpointer user_data)
{
@@ -331,7 +282,6 @@ static const GtkActionEntry proto_hier_stats_popup_entries[] = {
{ "/Find Next/Not Selected", NULL, "Not Selected", NULL, "Not Selected", G_CALLBACK(find_next_not_selected_cb) },
{ "/Colorize Procedure/Colorize Protocol", NULL, "Colorize Protocol", NULL, "Colorize Protocol", G_CALLBACK(color_selected_cb) },
};
-#endif /* PROTO_HIER_STATS_USE_GUIMANAGER */
static void
fill_in_tree_node(GNode *node, gpointer data)
@@ -436,15 +386,7 @@ proto_hier_show_popup_menu_cb(GtkWidget *widget _U_, GdkEvent *event, GtkWidget
static void
proto_hier_create_popup_menu(void)
{
-#ifndef PROTO_HIER_STATS_USE_GUIMANAGER
- GtkItemFactory *item_factory;
- GtkWidget *popup_menu_object;
- item_factory = gtk_item_factory_new(GTK_TYPE_MENU, "<main>", NULL);
- gtk_item_factory_create_items_ac(item_factory, sizeof(proto_hier_list_menu_items)/sizeof(proto_hier_list_menu_items[0]), proto_hier_list_menu_items, NULL, 2);
- popup_menu_object = gtk_item_factory_get_widget (item_factory, "<main>");
- g_signal_connect(tree, "button_press_event", G_CALLBACK(proto_hier_show_popup_menu_cb), popup_menu_object);
-#else
GtkUIManager *ui_manager;
GtkActionGroup *action_group;
GError *error = NULL;
@@ -470,7 +412,7 @@ proto_hier_create_popup_menu(void)
}
popup_menu_object = gtk_ui_manager_get_widget(ui_manager, "/ProtoHierStatsFilterPopup");
g_signal_connect(tree, "button_press_event", G_CALLBACK(proto_hier_show_popup_menu_cb), popup_menu_object);
-#endif /* PROTO_HIER_STATS_USE_GUIMANAGER */
+
}
#define MAX_DLG_HEIGHT 450