forked from osmocom/wireshark
Remove the depricated GtkItemFactory code.
svn path=/trunk/; revision=34042
This commit is contained in:
parent
f32d9a570c
commit
b6fc233757
1 changed files with 2 additions and 60 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue