second round to replace SIGNAL_CONNECT with g_signal_connect
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 11 Apr 2008 21:39:16 +0000 (21:39 +0000)
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 11 Apr 2008 21:39:16 +0000 (21:39 +0000)
This requires some casts to be added and I just don't want to add casts at all possible places. So I compile and only add casts where the (MSVC) compiler has a hard time.

Unfortunately this won't find any problems in Linux/Unix only code - I'll keep an eye on the buildbot and try to fix things as I'm going on ...

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24913 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/color_edit_dlg.c
gtk/column_prefs.c
gtk/dcerpc_stat.c
gtk/dfilter_expr_dlg.c
gtk/dlg_utils.c
gtk/expert_comp_dlg.c
gtk/expert_comp_table.c
gtk/expert_dlg.c
gtk/export_object.c
gtk/fc_stat.c
gtk/file_dlg.c

index 2634b372aef442359026cc0cd41e13932415990d..9687e5ac3cdf1f6ec92f451289420c9c5f7f5ad3 100644 (file)
@@ -180,7 +180,7 @@ edit_color_filter_dialog(GtkWidget *color_filters,
     gtk_box_pack_start (GTK_BOX (filter_string_hbox), color_filter_text, FALSE, FALSE, 0);
 
     filt_text_entry = gtk_entry_new ();
-    SIGNAL_CONNECT(filt_text_entry, "changed", filter_te_syntax_check_cb, NULL);
+    g_signal_connect(filt_text_entry, "changed", G_CALLBACK(filter_te_syntax_check_cb), NULL);
     gtk_entry_set_text(GTK_ENTRY(filt_text_entry), colorf->filter_text);
 
     gtk_style_unref(style);
index 7935b04846d214a578ef6849b9da5e34b5d63ac1..4aca950ed59ca00213d2aad3e0a5cd6a56147f1b 100644 (file)
@@ -235,7 +235,7 @@ column_prefs_show() {
   gtk_widget_show(props_hb);
 
   field_te = gtk_entry_new();
-  SIGNAL_CONNECT(field_te, "changed", filter_te_syntax_check_cb, NULL);
+  g_signal_connect(field_te, "changed", G_CALLBACK(filter_te_syntax_check_cb), NULL);
   gtk_table_attach_defaults(GTK_TABLE(tb), field_te, 2, 3, 1, 2);
   gtk_widget_set_sensitive(field_te, FALSE);
   gtk_widget_hide(field_te);
index f8c71f969629a6c95c2199580ca312335e1bcb60..ce7f9793d12c8da0a5bf5b750e54fdacb7d4457f 100644 (file)
@@ -634,7 +634,7 @@ gtk_dcerpcstat_cb(GtkWidget *w _U_, gpointer d _U_)
 
        /* Filter entry */
        filter_entry=gtk_entry_new();
-        SIGNAL_CONNECT(filter_entry, "changed", filter_te_syntax_check_cb, NULL);
+       g_signal_connect(filter_entry, "changed", G_CALLBACK(filter_te_syntax_check_cb), NULL);
        gtk_box_pack_start(GTK_BOX(filter_box), filter_entry, TRUE, TRUE, 0);
        filter=gtk_entry_get_text(GTK_ENTRY(main_display_filter_widget));
        if(filter){
index e4393c1841d10f5e98ee4530e7f88128a8e61aea..033b98bc50f26f45bfe0f5a3d3d19a99b8bea5be 100644 (file)
@@ -982,7 +982,7 @@ dfilter_expr_dlg_new(GtkWidget *filter_te)
     gtk_tree_view_append_column(GTK_TREE_VIEW(field_tree), column);
     gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
     gtk_tree_view_column_set_sort_column_id(column, 0);
-    SIGNAL_CONNECT(selection, "changed", field_select_row_cb, field_tree);
+    g_signal_connect(selection, "changed", G_CALLBACK(field_select_row_cb), field_tree);
     gtk_container_add(GTK_CONTAINER(tree_scrolled_win), field_tree);
 
     relation_vb = gtk_vbox_new(FALSE, 5);
@@ -1087,16 +1087,16 @@ dfilter_expr_dlg_new(GtkWidget *filter_te)
     column = gtk_tree_view_column_new_with_attributes("value", renderer,
                                                       "text", 0, NULL);
     gtk_tree_view_append_column(GTK_TREE_VIEW(value_list), column);
-    SIGNAL_CONNECT(gtk_tree_view_get_selection(GTK_TREE_VIEW(value_list)),
-                   "changed", value_list_sel_cb, value_entry);
+    g_signal_connect(gtk_tree_view_get_selection(GTK_TREE_VIEW(value_list)),
+                   "changed", G_CALLBACK(value_list_sel_cb), value_entry);
 
     /*
      * The value stuff may be hidden or shown depending on what
      * relation was selected; connect to the "changed" signal
      * for the relation list, so we can make that happen.
      */
-    SIGNAL_CONNECT(gtk_tree_view_get_selection(GTK_TREE_VIEW(relation_list)),
-                   "changed", relation_list_sel_cb, NULL);
+    g_signal_connect(gtk_tree_view_get_selection(GTK_TREE_VIEW(relation_list)),
+                   "changed", G_CALLBACK(relation_list_sel_cb), NULL);
     l_sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(value_list));
     gtk_tree_selection_set_mode(l_sel, GTK_SELECTION_SINGLE);
     gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(value_list_scrolled_win),
@@ -1173,11 +1173,11 @@ dfilter_expr_dlg_new(GtkWidget *filter_te)
 
     ok_bt = g_object_get_data(G_OBJECT(list_bb), GTK_STOCK_OK);
     gtk_widget_set_sensitive(ok_bt, FALSE);
-    SIGNAL_CONNECT(ok_bt, "clicked", dfilter_expr_dlg_accept_cb, filter_te);
+    g_signal_connect(ok_bt, "clicked", G_CALLBACK(dfilter_expr_dlg_accept_cb), filter_te);
 
     cancel_bt = g_object_get_data(G_OBJECT(list_bb), GTK_STOCK_CANCEL);
     window_set_cancel_button(window, cancel_bt, NULL);
-    SIGNAL_CONNECT(cancel_bt, "clicked", dfilter_expr_dlg_cancel_cb, window);
+    g_signal_connect(cancel_bt, "clicked", G_CALLBACK(dfilter_expr_dlg_cancel_cb), window);
 
     gtk_widget_grab_default(ok_bt);
 
@@ -1199,22 +1199,21 @@ dfilter_expr_dlg_new(GtkWidget *filter_te)
                     value_list_scrolled_win);
     g_object_set_data(G_OBJECT(window), E_DFILTER_EXPR_OK_BT_KEY, ok_bt);
 
-    SIGNAL_CONNECT(window, "delete_event", dfilter_expr_dlg_delete_event_cb,
-                   window);
+    g_signal_connect(window, "delete_event", G_CALLBACK(dfilter_expr_dlg_delete_event_cb), window);
 
     /*
      * Catch the "destroy" signal on our top-level window, and,
      * when it's destroyed, disconnect the signal we'll be
      * connecting below.
      */
-    SIGNAL_CONNECT(window, "destroy", dfilter_expr_dlg_destroy_cb, filter_te);
+    g_signal_connect(window, "destroy", G_CALLBACK(dfilter_expr_dlg_destroy_cb), filter_te);
 
     /*
      * Catch the "destroy" signal on the text entry widget to which
      * we're attached; if it's destroyed, we should destroy ourselves
      * as well.
      */
-    SIGNAL_CONNECT(filter_te, "destroy", dfilter_expr_dlg_cancel_cb, window);
+    g_signal_connect(filter_te, "destroy", G_CALLBACK(dfilter_expr_dlg_cancel_cb), window);
 
     gtk_widget_show_all(window);
     window_present(window);
index f3c8e145c169559e9957b78b7127b04d0d84dc0b..6eac5e021414de1aa8cda603349d00a208058e8d 100644 (file)
@@ -399,7 +399,7 @@ dlg_window_new(const gchar *title)
     gtk_window_set_transient_for(GTK_WINDOW(win), GTK_WINDOW(top_level));
   }
 
-  SIGNAL_CONNECT(win, "destroy", dlg_destroy_cb, NULL);
+  g_signal_connect(win, "destroy", G_CALLBACK(dlg_destroy_cb), NULL);
 
   return win;
 }
@@ -416,7 +416,7 @@ dlg_window_new(const gchar *title)
 void
 dlg_set_activate(GtkWidget *widget, GtkWidget *ok_button)
 {
-  SIGNAL_CONNECT(widget, "activate", dlg_activate, ok_button);
+  g_signal_connect(widget, "activate", G_CALLBACK(dlg_activate), ok_button);
 }
 
 static void
index 537c01e147847539d48f2717d5ca0dd279d5945d..c2a23de42431c891cfdf36763b0115235496f6ca 100644 (file)
@@ -249,8 +249,8 @@ expert_comp_init(const char *optarg _U_, void* userdata _U_)
         return;
     }
 
-    SIGNAL_CONNECT(etd->win, "delete_event", window_delete_event_cb, NULL);
-    SIGNAL_CONNECT(etd->win, "destroy", expert_dlg_destroy_cb, etd);
+    g_signal_connect(etd->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL);
+    g_signal_connect(etd->win, "destroy", G_CALLBACK(expert_dlg_destroy_cb), etd);
 
     /* Register the tap listener */
 
@@ -275,12 +275,12 @@ expert_comp_init(const char *optarg _U_, void* userdata _U_)
 
     if(topic_available(HELP_EXPERT_INFO_DIALOG)) {
         help_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP);
-        SIGNAL_CONNECT(help_bt, "clicked", topic_cb, HELP_EXPERT_INFO_DIALOG);
+        g_signal_connect(help_bt, "clicked", G_CALLBACK(topic_cb), (gpointer)HELP_EXPERT_INFO_DIALOG);
         gtk_tooltips_set_tip (tooltips, help_bt, "Show topic specific help", NULL);
     }
 
-    SIGNAL_CONNECT(ss->win, "delete_event", window_delete_event_cb, NULL);
-    SIGNAL_CONNECT(ss->win, "destroy", win_destroy_cb, ss);
+    g_signal_connect(ss->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL);
+    g_signal_connect(ss->win, "destroy", G_CALLBACK(win_destroy_cb), ss);
 
     gtk_widget_show_all(ss->win);
     window_present(ss->win);
index 4ead9d17cb26cbd787393fdc551c5fd81e296ab0..fb3b62408b20e7a1199b199f2729c4c249ba30b4 100644 (file)
@@ -430,7 +430,7 @@ error_create_popup_menu(error_equiv_table *err)
     gtk_item_factory_create_items_ac(item_factory, sizeof(error_list_menu_items)/sizeof(error_list_menu_items[0]), error_list_menu_items, err, 2);
 
     err->menu = gtk_item_factory_get_widget(item_factory, "<main>");
-    SIGNAL_CONNECT(err->tree_view, "button_press_event", error_show_popup_menu_cb, err);
+    g_signal_connect(err->tree_view, "button_press_event", G_CALLBACK(error_show_popup_menu_cb), err);
 }
 
 void
index 7bb5a41cd4265cfd6564f1a9578bc0b6b86197c4..f99959690ba485bf69268e7c82af5f02d4beab2f 100644 (file)
@@ -358,7 +358,7 @@ expert_dlg_init_table(expert_tapdata_t * etd, GtkWidget *vbox)
        gtk_box_pack_start(GTK_BOX(vbox), etd->scrolled_window, TRUE, TRUE, 0);
 
        etd->table=(GtkCList *)gtk_clist_new(5);
-       SIGNAL_CONNECT(etd->table, "select-row", select_row_cb, etd);
+       g_signal_connect(etd->table, "select-row", G_CALLBACK(select_row_cb), etd);
 
        gtk_widget_show(GTK_WIDGET(etd->table));
        gtk_widget_show(etd->scrolled_window);
@@ -406,7 +406,7 @@ expert_dlg_init_table(expert_tapdata_t * etd, GtkWidget *vbox)
 /*    gtk_list_select_item(GTK_LIST(value_list), 0);*/
        gtk_container_add(GTK_CONTAINER(etd->scrolled_window), (GtkWidget *)etd->table);
 
-       SIGNAL_CONNECT(etd->table, "click-column", srt_click_column_cb, col_arrows);
+       g_signal_connect(etd->table, "click-column", G_CALLBACK(srt_click_column_cb), col_arrows);
 
        gtk_widget_show(GTK_WIDGET(etd->table));
        gtk_widget_show(etd->scrolled_window);
@@ -518,7 +518,7 @@ expert_dlg_init(const char *optarg, void* userdata _U_)
        for(i=0; expert_severity_om_vals[i].strptr != NULL;i++){
                menu_item=gtk_menu_item_new_with_label(expert_severity_om_vals[i].strptr);
                g_object_set_data(G_OBJECT(menu_item), "tapdata", etd);
-               SIGNAL_CONNECT(menu_item, "activate", expert_dlg_severity_cb, (long) i);
+               g_signal_connect(menu_item, "activate", G_CALLBACK(expert_dlg_severity_cb), (gpointer)(long) i);
                gtk_menu_append(GTK_MENU(menu), menu_item);
                if(expert_severity_om_vals[i].value == (guint) etd->severity_report_level) {
                        gtk_menu_set_active(GTK_MENU(menu), i);
@@ -560,12 +560,12 @@ expert_dlg_init(const char *optarg, void* userdata _U_)
 
        if(topic_available(HELP_EXPERT_INFO_DIALOG)) {
                 help_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP);
-               SIGNAL_CONNECT(help_bt, "clicked", topic_cb, HELP_EXPERT_INFO_DIALOG);
+               g_signal_connect(help_bt, "clicked", G_CALLBACK(topic_cb), (gpointer)HELP_EXPERT_INFO_DIALOG);
                gtk_tooltips_set_tip (tooltips, help_bt, "Show topic specific help", NULL);
        }
 
-       SIGNAL_CONNECT(etd->win, "delete_event", window_delete_event_cb, NULL);
-       SIGNAL_CONNECT(etd->win, "destroy", expert_dlg_destroy_cb, etd);
+       g_signal_connect(etd->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL);
+       g_signal_connect(etd->win, "destroy", G_CALLBACK(expert_dlg_destroy_cb), etd);
 
        gtk_widget_show_all(etd->win);
        window_present(etd->win);
index b28c25cbc40fc6dded36f8db7855df18d183ab2d..c907e2fd605216b884b4810264786c2a8c30ec24 100644 (file)
@@ -369,21 +369,21 @@ export_object_window(const gchar *tapname, const gchar *name, tap_packet_cb tap_
        gtk_container_add(GTK_CONTAINER(sw), object_list->tree);
 
        selection = gtk_tree_view_get_selection(object_list->tree_view);
-        SIGNAL_CONNECT(selection, "changed", eo_remember_row_num, object_list);
+        g_signal_connect(selection, "changed", G_CALLBACK(eo_remember_row_num), object_list);
 
 
        bbox = gtk_hbox_new(FALSE, 5);
 
        /* Help button */
        help_bt = gtk_button_new_from_stock(GTK_STOCK_HELP);
-       SIGNAL_CONNECT(help_bt, "clicked", topic_cb, HELP_EXPORT_OBJECT_LIST);
+       g_signal_connect(help_bt, "clicked", G_CALLBACK(topic_cb), (gpointer)HELP_EXPORT_OBJECT_LIST);
        gtk_tooltips_set_tip(GTK_TOOLTIPS(button_bar_tips), help_bt,
                             "Show help for this dialog.", NULL);
        gtk_box_pack_start(GTK_BOX(bbox), help_bt, FALSE, FALSE, 0);
 
        /* Save All button */
        save_all_bt = gtk_button_new_with_mnemonic("Save A_ll");
-       SIGNAL_CONNECT(save_all_bt, "clicked", eo_save_all_clicked_cb,
+       g_signal_connect(save_all_bt, "clicked", G_CALLBACK(eo_save_all_clicked_cb),
                       object_list);
        gtk_tooltips_set_tip(GTK_TOOLTIPS(button_bar_tips), save_all_bt,
                             "Save all listed objects with their displayed "
@@ -392,7 +392,7 @@ export_object_window(const gchar *tapname, const gchar *name, tap_packet_cb tap_
 
        /* Save button */
        save_bt = gtk_button_new_from_stock(GTK_STOCK_SAVE_AS);
-       SIGNAL_CONNECT(save_bt, "clicked", eo_save_clicked_cb, object_list);
+       g_signal_connect(save_bt, "clicked", G_CALLBACK(eo_save_clicked_cb), object_list);
        gtk_tooltips_set_tip(GTK_TOOLTIPS(button_bar_tips), save_bt,
                             "Saves the currently selected content to a file.",
                             NULL);
@@ -410,10 +410,9 @@ export_object_window(const gchar *tapname, const gchar *name, tap_packet_cb tap_
         gtk_widget_show(bbox);
 
        /* Setup cancel/delete/destroy signal handlers */
-        SIGNAL_CONNECT(object_list->dlg, "delete_event",
-                      window_delete_event_cb, NULL);
-       SIGNAL_CONNECT(object_list->dlg, "destroy",
-                      eo_win_destroy_cb, object_list);
+        g_signal_connect(object_list->dlg, "delete_event", G_CALLBACK(window_delete_event_cb), NULL);
+       g_signal_connect(object_list->dlg, "destroy",
+                      G_CALLBACK(eo_win_destroy_cb), object_list);
                window_set_cancel_button(object_list->dlg, close_bt,
                                 window_cancel_button_cb);
 
index eaec6362bff6a7577e5b2f6d527f0f01fdf9590c..aede73b3eb5539f3e2d09a0528c1546324ef11e9 100644 (file)
@@ -195,8 +195,8 @@ gtk_fcstat_init(const char *optarg, void *userdata _U_)
        close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE);
        window_set_cancel_button(fc->win, close_bt, window_cancel_button_cb);
 
-       SIGNAL_CONNECT(fc->win, "delete_event", window_delete_event_cb, NULL);
-       SIGNAL_CONNECT(fc->win, "destroy", win_destroy_cb, fc);
+       g_signal_connect(fc->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL);
+       g_signal_connect(fc->win, "destroy", G_CALLBACK(win_destroy_cb), fc);
 
        gtk_widget_show_all(fc->win);
        window_present(fc->win);
index 8462db27b4d5f5a183f539df1786021b00fe0417..929f1b7287c5131c4019689f58a5501daa2dc166 100644 (file)
@@ -238,7 +238,7 @@ file_selection_browse(GtkWidget *file_bt, GtkWidget *file_te, const char *label,
 
   /* Call a handler when the file selection box is destroyed, so we can inform
      our caller, if any, that it's been destroyed. */
-  SIGNAL_CONNECT(fs, "destroy", GTK_SIGNAL_FUNC(file_selection_browse_destroy_cb), 
+  g_signal_connect(fs, "destroy", GTK_SIGNAL_FUNC(file_selection_browse_destroy_cb), 
                 file_te);
 
 #if GTK_CHECK_VERSION(2,4,0)
@@ -250,7 +250,7 @@ file_selection_browse(GtkWidget *file_bt, GtkWidget *file_te, const char *label,
   }
   window_destroy(fs);
 #else
-  SIGNAL_CONNECT(GTK_FILE_SELECTION(fs)->ok_button, "clicked", 
+  g_signal_connect(GTK_FILE_SELECTION(fs)->ok_button, "clicked", 
                 file_selection_browse_ok_cb, fs);
 
   window_set_cancel_button(fs, GTK_FILE_SELECTION(fs)->cancel_button,