/* CALLBACKS */
/****************************************************************************/
static void
-flow_graph_on_destroy(GtkObject *object _U_, gpointer user_data _U_)
+flow_graph_on_destroy(GObject *object _U_, gpointer user_data _U_)
{
/* remove_tap_listeners */
remove_tap_listener_flow_graph();
#endif
GtkWidget *flow_type_fr, *range_fr, *range_tb, *flow_type_tb, *node_addr_fr, *node_addr_tb;
-
- GtkTooltips *tooltips = gtk_tooltips_new();
-
flow_graph_dlg_w = dlg_window_new("Wireshark: Flow Graph"); /* transient_for top_level */
gtk_window_set_destroy_with_parent (GTK_WINDOW(flow_graph_dlg_w), TRUE);
/* Process all packets */
select_all_rb = gtk_radio_button_new_with_mnemonic_from_widget(NULL, "_All packets");
- gtk_tooltips_set_tip (tooltips, select_all_rb,
- ("Process all packets"), NULL);
+ gtk_widget_set_tooltip_text (select_all_rb, ("Process all packets"));
g_signal_connect(select_all_rb, "toggled", G_CALLBACK(toggle_select_all), NULL);
gtk_table_attach_defaults(GTK_TABLE(range_tb), select_all_rb, 0, 1, 0, 1);
if (type_of_packets == TYPE_OF_PACKETS_ALL) {
/* Process displayed packets */
select_displayed_rb = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(select_all_rb),
"_Displayed packets");
- gtk_tooltips_set_tip (tooltips, select_displayed_rb,
- ("Process displayed packets"), NULL);
+ gtk_widget_set_tooltip_text (select_displayed_rb, ("Process displayed packets"));
g_signal_connect(select_displayed_rb, "toggled", G_CALLBACK(toggle_select_displayed), NULL);
gtk_table_attach_defaults(GTK_TABLE(range_tb), select_displayed_rb, 0, 1, 1, 2);
if (type_of_packets == TYPE_OF_PACKETS_DISPLAYED) {
/* General information */
select_general_rb = gtk_radio_button_new_with_mnemonic_from_widget(NULL, "_General flow");
- gtk_tooltips_set_tip (tooltips, select_general_rb,
- ("Show all packets, with general information"), NULL);
+ gtk_widget_set_tooltip_text (select_general_rb, ("Show all packets, with general information"));
g_signal_connect(select_general_rb, "toggled", G_CALLBACK(toggle_select_general), NULL);
gtk_table_attach_defaults(GTK_TABLE(flow_type_tb), select_general_rb, 0, 1, 0, 1);
if (type_of_flow == TYPE_OF_FLOW_GENERAL) {
/* TCP specific information */
select_tcp_rb = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(select_general_rb),
"_TCP flow");
- gtk_tooltips_set_tip (tooltips, select_tcp_rb,
- ("Show only TCP packets, with TCP specific information"), NULL);
+ gtk_widget_set_tooltip_text (select_tcp_rb, ("Show only TCP packets, with TCP specific information"));
g_signal_connect(select_tcp_rb, "toggled", G_CALLBACK(toggle_select_tcp), NULL);
gtk_table_attach_defaults(GTK_TABLE(flow_type_tb), select_tcp_rb, 0, 1, 1, 2);
if (type_of_flow == TYPE_OF_FLOW_TCP) {
/* Source / Dest address */
src_dst_rb = gtk_radio_button_new_with_mnemonic_from_widget(NULL, "_Standard source/destination addresses");
- gtk_tooltips_set_tip (tooltips, src_dst_rb,
- ("Nodes in the diagram are identified with source and destination addresses"), NULL);
+ gtk_widget_set_tooltip_text (src_dst_rb,
+ ("Nodes in the diagram are identified with source and destination addresses"));
g_signal_connect(src_dst_rb, "toggled", G_CALLBACK(toggle_select_srcdst), NULL);
gtk_table_attach_defaults(GTK_TABLE(node_addr_tb), src_dst_rb, 0, 1, 0, 1);
if (node_addr_type == NODE_ADDR_TYPE_SRCDST) {
/* Network source / dest address */
net_src_dst_rb = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(src_dst_rb),
"_Network source/destination addresses");
- gtk_tooltips_set_tip (tooltips, net_src_dst_rb,
- ("Nodes in the diagram are identified with network source and destination addresses"), NULL);
+ gtk_widget_set_tooltip_text (net_src_dst_rb,
+ ("Nodes in the diagram are identified with network source and destination addresses"));
g_signal_connect(net_src_dst_rb, "toggled", G_CALLBACK(toggle_select_netsrcdst), NULL);
gtk_table_attach_defaults(GTK_TABLE(node_addr_tb), net_src_dst_rb, 0, 1, 1, 2);
if (node_addr_type == NODE_ADDR_TYPE_NET_SRCDST) {
bt_ok = gtk_button_new_from_stock(GTK_STOCK_OK);
gtk_container_add(GTK_CONTAINER(hbuttonbox), bt_ok);
- gtk_tooltips_set_tip (tooltips, bt_ok, "Show the flow graph", NULL);
+ gtk_widget_set_tooltip_text (bt_ok, "Show the flow graph");
g_signal_connect(bt_ok, "clicked", G_CALLBACK(flow_graph_on_ok), flow_graph_dlg_w);
gtk_widget_show(bt_ok);
bt_cancel = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
gtk_container_add (GTK_CONTAINER (hbuttonbox), bt_cancel);
+#if GTK_CHECK_VERSION(2,18,0)
+ gtk_widget_set_can_default(bt_cancel, TRUE);
+#else
GTK_WIDGET_SET_FLAGS(bt_cancel, GTK_CAN_DEFAULT);
- gtk_tooltips_set_tip (tooltips, bt_cancel, "Cancel this dialog", NULL);
+#endif
+ gtk_widget_set_tooltip_text (bt_cancel, "Cancel this dialog");
window_set_cancel_button(flow_graph_dlg_w, bt_cancel, window_cancel_button_cb);
g_signal_connect(flow_graph_dlg_w, "delete_event", G_CALLBACK(window_delete_event_cb), NULL);
/****************************************************************************/
/* entry point when called via the GTK menu */
#ifdef MAIN_MENU_USE_UIMANAGER
-static void
+void
flow_graph_launch(GtkAction *action _U_, gpointer user_data _U_)
{
flow_graph_init_tap("",NULL);
{
register_stat_cmd_arg("flow_graph",flow_graph_init_tap,NULL);
#ifdef MAIN_MENU_USE_UIMANAGER
- register_stat_menu_item_stock(
- REGISTER_STAT_GROUP_UNSORTED, /* Group */
- "/Menubar/StatisticsMenu/FlowGraph", /* GUI path */
- "Flow-Graph", /* Name */
- WIRESHARK_STOCK_FLOW_GRAPH, /* stock_id */
- "Flo_w Graph...", /* label */
- NULL, /* accelerator */
- NULL, /* tooltip */
- G_CALLBACK(flow_graph_launch), /* callback */
- TRUE, /* enabled */
- NULL, /* selected_packet_enabled */
- NULL, /* selected_tree_row_enabled */
- NULL); /* callback_data */
#else
register_stat_menu_item_stock("Flo_w Graph...",
REGISTER_STAT_GROUP_UNSORTED, WIRESHARK_STOCK_FLOW_GRAPH,