Replace deprecated functions.
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 24 Jul 2011 16:50:55 +0000 (16:50 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 24 Jul 2011 16:50:55 +0000 (16:50 +0000)
Udate comments in CheckAPIs

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

gtk/airpcap_dlg.c
gtk/find_dlg.c
gtk/firewall_dlg.c
gtk/follow_stream.c
gtk/main_airpcap_toolbar.c
tools/checkAPIs.pl

index 85fba3c1a1c228e1f590385900ac4699489b189a..4e7a69c8735c064594034231c253b847c0ba0231 100644 (file)
@@ -553,7 +553,7 @@ on_key_management_apply_bt_clicked(GtkWidget *button _U_, gpointer data)
     "might be using AirPcap, or you might not have sufficient privileges."
     /* Set the Decryption Mode */
 
-    decryption_mode_string = gtk_combo_box_get_active_text (GTK_COMBO_BOX(decryption_mode_cb));
+    decryption_mode_string = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT(decryption_mode_cb));
     if (g_ascii_strcasecmp(decryption_mode_string, AIRPCAP_DECRYPTION_TYPE_STRING_WIRESHARK) == 0)
     {
         set_wireshark_decryption(TRUE);
index f166ee29d5cf347b28e2e5a422dfdfbbfff15461..c87a98eeccb5d0a875da533ed339703764012394 100644 (file)
@@ -50,6 +50,7 @@
 #include "gtk/keys.h"
 #include "gtk/help_dlg.h"
 #include "gtk/filter_autocomplete.h"
+#include "gtk/old-gtk-compat.h"
 
 /* Capture callback data keys */
 #define E_FIND_FILT_KEY       "find_filter_te"
@@ -286,11 +287,11 @@ find_frame_cb(GtkWidget *w _U_, gpointer d _U_)
      These only apply to the string find option */
   /* Create Combo Box */
 
-  combo_cb = gtk_combo_box_new_text();
+  combo_cb = gtk_combo_box_text_new();
 
-  gtk_combo_box_append_text(GTK_COMBO_BOX(combo_cb), "ASCII Unicode & Non-Unicode");
-  gtk_combo_box_append_text(GTK_COMBO_BOX(combo_cb), "ASCII Non-Unicode");
-  gtk_combo_box_append_text(GTK_COMBO_BOX(combo_cb), "ASCII Unicode");
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(combo_cb), "ASCII Unicode & Non-Unicode");
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(combo_cb), "ASCII Non-Unicode");
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(combo_cb), "ASCII Unicode");
 
   gtk_combo_box_set_active(GTK_COMBO_BOX(combo_cb),0);
   gtk_container_add(GTK_CONTAINER(string_opt_vb), combo_cb);
index 820c40cedbf2cbfa529673c0a8b3e25a34b0f295..a5eac262cc6a2e1d176c400c9c311a57f0737228 100644 (file)
@@ -66,6 +66,7 @@
 #include <gtk/file_dlg.h>
 #include <gtk/help_dlg.h>
 #include <gtk/gui_utils.h>
+#include "gtk/old-gtk-compat.h"
 #include "gtk/firewall_dlg.h"
 
 #define MAX_RULE_LEN 200
@@ -228,9 +229,9 @@ firewall_rule_cb(GtkWidget *w _U_, gpointer data _U_)
     label = gtk_label_new("Product");
     gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
 
-    product_combo_box = gtk_combo_box_new_text();
+    product_combo_box = gtk_combo_box_text_new();
     for (i = 0; i < NUM_PRODS; i++) {
-        gtk_combo_box_append_text(GTK_COMBO_BOX(product_combo_box), products[i].name);
+        gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(product_combo_box), products[i].name);
     }
     g_object_set_data(G_OBJECT(product_combo_box), WS_RULE_INFO_KEY, rule_info);
     g_signal_connect(product_combo_box, "changed", G_CALLBACK(select_product), NULL);
index 860aa0b1c96c0ea0c873ab327db34d1b66b430e4..8becb7d7430ece232e60b7705f5ca0ba93142592 100644 (file)
@@ -56,6 +56,7 @@
 #include <gtk/gui_utils.h>
 #include <gtk/help_dlg.h>
 #include "gtk/main.h"
+#include "gtk/old-gtk-compat.h"
 
 #ifdef _WIN32
 #include "../tempfile.h"
@@ -765,16 +766,16 @@ follow_stream(gchar *title, follow_info_t *follow_info,
        direction_hbox = gtk_hbox_new(FALSE, 1);
        gtk_box_pack_start(GTK_BOX(stream_vb), direction_hbox, FALSE, FALSE, 0);
 
-       stream_cmb = gtk_combo_box_new_text();
+       stream_cmb = gtk_combo_box_text_new();
 
-       gtk_combo_box_append_text(GTK_COMBO_BOX(stream_cmb),
+       gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(stream_cmb),
                                  both_directions_string);
        follow_info->show_stream = BOTH_HOSTS;
 
-       gtk_combo_box_append_text(GTK_COMBO_BOX(stream_cmb),
+       gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(stream_cmb),
                                  server_to_client_string);
 
-       gtk_combo_box_append_text(GTK_COMBO_BOX(stream_cmb),
+       gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(stream_cmb),
                                   client_to_server_string);
 
        gtk_combo_box_set_active(GTK_COMBO_BOX(stream_cmb), 0); /* Do this before signal_connect  */
index 580e74bff63ac66ebea590d10ac775d5b46b323a..22e86c9c8e773841a0ad84fb033311555a2a1130 100644 (file)
@@ -33,6 +33,7 @@
 #ifdef HAVE_AIRPCAP
 
 #include <gtk/gtk.h>
+#include "gtk/old-gtk-compat.h"
 
 #include <epan/epan.h>
 #include <epan/frequency-utils.h>
@@ -67,7 +68,7 @@ airpcap_toolbar_fcs_filter_combo_cb(GtkWidget *fcs_filter_cb, gpointer user_data
     gchar *fcs_filter_str;
 
     if (fcs_filter_cb != NULL && !block_toolbar_signals && (airpcap_if_active != NULL)) {
-        fcs_filter_str = gtk_combo_box_get_active_text(GTK_COMBO_BOX(fcs_filter_cb));
+        fcs_filter_str = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT(fcs_filter_cb));
         ad = airpcap_if_open(airpcap_if_active->name, ebuf);
 
         if (fcs_filter_str && (g_ascii_strcasecmp("", fcs_filter_str)) && ad) {
@@ -215,7 +216,7 @@ GtkWidget *airpcap_toolbar_new(void)
        gtk_widget_set_tooltip_text(GTK_WIDGET(tool_item), "Current 802.11 Channel");
 
     /* Create the channel combo box */
-    channel_cb = gtk_combo_box_new_text();
+    channel_cb = gtk_combo_box_text_new();
     g_object_set_data(G_OBJECT(airpcap_tb), AIRPCAP_TOOLBAR_CHANNEL_KEY, channel_cb);
 
     /* Select the current channel */
@@ -246,7 +247,7 @@ GtkWidget *airpcap_toolbar_new(void)
        gtk_widget_set_tooltip_text(GTK_WIDGET(tool_item), "Current 802.11 Channel Offset");
 
     /* Start: Channel offset combo box */
-    channel_offset_cb = gtk_combo_box_new_text();
+    channel_offset_cb = gtk_combo_box_text_new();
     g_object_set_data(G_OBJECT(airpcap_tb), AIRPCAP_TOOLBAR_CHANNEL_OFFSET_KEY, channel_offset_cb);
 
     if(airpcap_if_active != NULL){
@@ -282,14 +283,14 @@ GtkWidget *airpcap_toolbar_new(void)
     gtk_toolbar_insert(GTK_TOOLBAR(airpcap_tb), tool_item, -1);
 
     /* FCS filter combo box */
-    fcs_filter_cb = gtk_combo_box_new_text();
+    fcs_filter_cb = gtk_combo_box_text_new();
     g_object_set_data(G_OBJECT(airpcap_tb), AIRPCAP_TOOLBAR_FCS_FILTER_KEY, fcs_filter_cb);
 
     gtk_widget_set_size_request(fcs_filter_cb, 100, -1);
 
-    gtk_combo_box_append_text(GTK_COMBO_BOX(fcs_filter_cb), airpcap_get_validation_name(AIRPCAP_VT_ACCEPT_EVERYTHING));
-    gtk_combo_box_append_text(GTK_COMBO_BOX(fcs_filter_cb), airpcap_get_validation_name(AIRPCAP_VT_ACCEPT_CORRECT_FRAMES));
-    gtk_combo_box_append_text(GTK_COMBO_BOX(fcs_filter_cb), airpcap_get_validation_name(AIRPCAP_VT_ACCEPT_CORRUPT_FRAMES));
+     gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(fcs_filter_cb), airpcap_get_validation_name(AIRPCAP_VT_ACCEPT_EVERYTHING));
+     gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(fcs_filter_cb), airpcap_get_validation_name(AIRPCAP_VT_ACCEPT_CORRECT_FRAMES));
+     gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(fcs_filter_cb), airpcap_get_validation_name(AIRPCAP_VT_ACCEPT_CORRUPT_FRAMES));
     gtk_combo_box_set_active(GTK_COMBO_BOX(fcs_filter_cb), 0);
 
        gtk_widget_set_tooltip_text(fcs_filter_cb, "Select the 802.11 FCS filter that the wireless adapter will apply.");
@@ -312,7 +313,7 @@ GtkWidget *airpcap_toolbar_new(void)
     gtk_widget_set_name (decryption_mode_lb, "decryption_mode_lb");
     gtk_widget_show (decryption_mode_lb);
 
-    decryption_mode_cb = gtk_combo_box_new_text();
+    decryption_mode_cb = gtk_combo_box_text_new();
     gtk_widget_set_name (decryption_mode_cb, "decryption_mode_cb");
     gtk_widget_show (decryption_mode_cb);
     gtk_widget_set_size_request(decryption_mode_cb, 83, -1);
index ab6baae7adbf2e0910bfa741126270beffb54f0c..7a101e548e644f311c2a4c376ca52d9f3507c351 100755 (executable)
@@ -966,7 +966,7 @@ my %deprecatedGtkFunctions = (
                'gdk_bitmap_create_from_data',                          'W', # 
                'gdk_bitmap_ref',                                                       'W', # 
                'gdk_bitmap_unref',                                                     'W', # 
-               'gdk_cairo_set_source_pixmap',                          'W', # 
+               'gdk_cairo_set_source_pixmap',                          'W', # deprecated since version 2.24. Use gdk_cairo_set_source_window() where appropriate(Since 2.24).
                'gdk_char_height',                                                      'W', #
                'gdk_char_measure',                                                     'W', #
                'gdk_char_width',                                                       'W', #
@@ -1014,7 +1014,7 @@ my %deprecatedGtkFunctions = (
                'gdk_draw_layout_line_with_colors',                     'W', # 
                'gdk_draw_layout_with_colors',                          'W', # 
                'gdk_draw_line',                                                        'W', # 
-               'gdk_draw_lines',                                                       'W', # 
+               'gdk_draw_lines',                                                       'W', # deprecated since version 2.22. Use cairo_line_to() and cairo_stroke() instead.
                'gdk_draw_pixbuf',                                                      'W', # gdk_cairo_set_source_pixbuf() and cairo_paint() or cairo_rectangle() and cairo_fill() instead.
                'gdk_draw_pixmap',                                                      'W', # gdk_draw_drawable() (gdk_draw_drawable has been deprecated since version 2.22 )
                'gdk_draw_point',                                                       'W', #