Do some prep work on GUIManager code, if you enable it it will break as the menus.c changes are not commited.

svn path=/trunk/; revision=36978
This commit is contained in:
Anders Broman 2011-05-03 16:51:08 +00:00
parent c263f6461e
commit ec855fcd7e
1 changed files with 25 additions and 0 deletions

View File

@ -2165,18 +2165,43 @@ init_io_stat_window(io_stat_t *io)
window_present(io->window);
}
#ifdef MAIN_MENU_USE_UIMANAGER
static void
gui_iostat_cb(GtkAction *action _U_, gpointer user_data _U_)
{
iostat_init(NULL,NULL);
}
#else
static void
gui_iostat_cb(GtkWidget *w _U_, gpointer d _U_)
{
iostat_init(NULL,NULL);
}
#endif
void
register_tap_listener_gtk_iostat(void)
{
register_stat_cmd_arg("io,stat", iostat_init,NULL);
#ifdef MAIN_MENU_USE_UIMANAGER
register_stat_menu_item_stock(
REGISTER_STAT_GROUP_GENERIC, /* Group */
"/Menubar/StatisticsMenu/IOGraphs", /* GUI path */
"IO-Graphs", /* Name */
WIRESHARK_STOCK_GRAPHS, /* stock_id */
"_IO Graphs", /* label */
NULL, /* accelerator */
NULL, /* tooltip */
G_CALLBACK(gui_iostat_cb), /* callback */
TRUE, /* enabled */
NULL, /* selected_packet_enabled */
NULL, /* selected_tree_row_enabled */
NULL); /* callback_data */
#else
register_stat_menu_item_stock("_IO Graphs",
REGISTER_STAT_GROUP_GENERIC, WIRESHARK_STOCK_GRAPHS,
gui_iostat_cb, NULL, NULL, NULL);
#endif
}