Fix almost all accesses to ->window
authorjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 21 Jul 2011 20:12:08 +0000 (20:12 +0000)
committerjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 21 Jul 2011 20:12:08 +0000 (20:12 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38151 f5534014-38df-0310-8fa8-9805f1628bb7

41 files changed:
gtk/afp_stat.c
gtk/ansi_a_stat.c
gtk/ansi_map_stat.c
gtk/bootp_stat.c
gtk/camel_counter.c
gtk/camel_srt.c
gtk/compare_stat.c
gtk/dcerpc_stat.c
gtk/diameter_stat.c
gtk/expert_comp_dlg.c
gtk/fc_stat.c
gtk/gsm_a_stat.c
gtk/gtp_stat.c
gtk/h225_counter.c
gtk/h225_ras_srt.c
gtk/iax2_analysis.c
gtk/io_stat.c
gtk/ldap_stat.c
gtk/mac_lte_stat_dlg.c
gtk/megaco_stat.c
gtk/mgcp_stat.c
gtk/mtp3_stat.c
gtk/radius_stat.c
gtk/rlc_lte_stat_dlg.c
gtk/rpc_progs.c
gtk/rpc_stat.c
gtk/rtp_analysis.c
gtk/rtp_player.c
gtk/scsi_stat.c
gtk/sctp_byte_graph_dlg.c
gtk/sctp_graph_dlg.c
gtk/sctp_stat_dlg.c
gtk/simple_dialog.c
gtk/sip_stat.c
gtk/smb2_stat.c
gtk/smb_stat.c
gtk/stats_tree_stat.c
gtk/tap_param_dlg.c
gtk/tcp_graph.c
gtk/voip_calls_dlg.c
gtk/wlan_stat_dlg.c

index 6479154a2a168f0b023cabe0dc340682f2e55ae2..fc5d3608c0d46280ae3b3d6d0f2ca96397d8480a 100644 (file)
@@ -52,6 +52,7 @@
 #include "gtk/tap_param_dlg.h"
 #include "gtk/main.h"
 
+#include "gtk/old-gtk-compat.h"
 
 /* used to keep track of the statistics for an entire program interface */
 typedef struct _afpstat_t {
@@ -193,7 +194,7 @@ gtk_afpstat_init(const char *optarg, void *userdata _U_)
        window_present(ss->win);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(ss->win->window);
+       gdk_window_raise(gtk_widget_get_window(ss->win));
 }
 
 static tap_param afp_stat_params[] = {
index 68a6ac701fd97f23b76a90d9e22e553acb0e8ba6..455234b59d812c98d6525b5dbb233c337276f737 100644 (file)
@@ -53,6 +53,8 @@
 #include "gtk/filter_dlg.h"
 #include "gtk/gui_utils.h"
 
+#include "gtk/old-gtk-compat.h"
+
 enum
 {
    IEI_COLUMN,
@@ -328,7 +330,7 @@ ansi_a_stat_gtk_bsmap_cb(
      */
     if (dlg_bsmap.win)
     {
-        gdk_window_raise(dlg_bsmap.win->window);
+        gdk_window_raise(gtk_widget_get_window(dlg_bsmap.win));
         return;
     }
 
@@ -360,7 +362,7 @@ ansi_a_stat_gtk_dtap_cb(
      */
     if (dlg_dtap.win)
     {
-        gdk_window_raise(dlg_dtap.win->window);
+        gdk_window_raise(gtk_widget_get_window(dlg_dtap.win));
         return;
     }
 
index 9e3b42033ded86e89877b460c89e3637dad9c409..bba53748682b6276603ab6f869fb0a55297ba7da 100644 (file)
@@ -52,6 +52,8 @@
 #include "gtk/filter_dlg.h"
 #include "gtk/gui_utils.h"
 
+#include "gtk/old-gtk-compat.h"
+
 enum
 {
     OP_CODE_COLUMN,
@@ -337,7 +339,7 @@ ansi_map_stat_gtk_cb(
      * if the window is already open, bring it to front
      */
     if (dlg.win){
-        gdk_window_raise(dlg.win->window);
+        gdk_window_raise(gtk_widget_get_window(dlg.win));
         return;
     }
 
index 25a83992bd2efd6ecdba507fc550918c1545a34f..d50ecae3ce5a8278772e787d31a4aedc0b722046 100644 (file)
@@ -42,6 +42,7 @@
 #include "gtk/tap_param_dlg.h"
 #include "gtk/main.h"
 
+#include "gtk/old-gtk-compat.h"
 
 typedef const char* bootp_info_value_t;
 
@@ -268,7 +269,7 @@ dhcpstat_init(const char *optarg, void *userdata _U_)
        window_present(sp->win);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(sp->win->window);
+       gdk_window_raise(gtk_widget_get_window(sp->win));
 }
 
 static tap_param bootp_stat_params[] = {
index e34c6dbd0f3a5fac1d088a89018ba7f803bcc2c6..41c1c166ada0f0e84c7786fbb851afe6753b41e5 100644 (file)
@@ -52,6 +52,7 @@
 #include "gtk/gui_stat_util.h"
 #include "gtk/tap_param_dlg.h"
 
+#include "gtk/old-gtk-compat.h"
 
 static void gtk_camelcounter_reset(void *phs);
 static int gtk_camelcounter_packet(void *phs,
@@ -210,7 +211,7 @@ static void gtk_camelcounter_init(const char *optarg, void *userdata _U_)
   window_present(p_camelcounter->win);
 
   cf_retap_packets(&cfile);
-  gdk_window_raise(p_camelcounter->win->window);
+  gdk_window_raise(gtk_widget_get_window(p_camelcounter->win));
 }
 
 static tap_param camel_counter_params[] = {
index 92e5dc7769814de82b0d6dc761866ab01bb7a1e0..18b7c63142b724a7a7640767a339900863a330e2 100644 (file)
@@ -54,6 +54,7 @@
 #include "gtk/tap_param_dlg.h"
 #include "gtk/service_response_time_table.h"
 
+#include "gtk/old-gtk-compat.h"
 
 /* used to keep track of the statistics for an entire program interface */
 struct camelsrt_t {
@@ -226,7 +227,7 @@ static void gtk_camelsrt_init(const char *optarg, void *userdata _U_)
   gtk_widget_show_all(p_camelsrt->win);
   window_present(p_camelsrt->win);
   cf_retap_packets(&cfile);
-  gdk_window_raise(p_camelsrt->win->window);
+  gdk_window_raise(gtk_widget_get_window(p_camelsrt->win));
 
 }
 
index 25dab28b297f1304e13a33dcd8ac21676721a560..d134184de2d43d0bc69c35329607b4f110dae55c 100644 (file)
@@ -80,6 +80,9 @@
 #include "color_filters.h"
 #include "color_dlg.h"
 #include "new_packet_list.h"
+
+#include "gtk/old-gtk-compat.h"
+
 /* From colorize convertion */
 #define COLOR_N        1
 
@@ -900,7 +903,7 @@ gtk_comparestat_cb(GtkWidget *w _U_, gpointer d _U_)
 
        /* if the window is already open, bring it to front */
        if(dlg){
-               gdk_window_raise(dlg->window);
+               gdk_window_raise(gtk_widget_get_window(dlg));
                return;
        }
 
index 0b38f3ed4d49c324a3eb58529fb88539b3ce2f27..9647a5bfa009a573569420fbbdd2ca2f2e77eb14 100644 (file)
@@ -57,6 +57,8 @@
 #include "gtk/main.h"
 #include "gtk/filter_autocomplete.h"
 
+#include "gtk/old-gtk-compat.h"
+
 /* used to keep track of the statistics for an entire program interface */
 typedef struct _dcerpcstat_t {
        GtkWidget *win;
@@ -343,7 +345,7 @@ gtk_dcerpcstat_init(const char *optarg, void* userdata _U_)
        window_present(rs->win);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(rs->win->window);
+       gdk_window_raise(gtk_widget_get_window(rs->win));
 }
 
 
index 0905f1d69499fb668225f7ea17112923bb69485d..28ca9cbad483d505ff044410e2329dab9b646244 100644 (file)
@@ -54,6 +54,8 @@
 #include "gtk/gtkglobals.h"
 #include "gtk/main.h"
 
+#include "gtk/old-gtk-compat.h"
+
 /* used to keep track of the statistics for an entire program interface */
 typedef struct _diameterstat_t {
        GtkWidget *win;
@@ -214,7 +216,7 @@ gtk_diameterstat_init(const char *optarg, void *userdata _U_)
        window_present(diameter->win);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(diameter->win->window);
+       gdk_window_raise(gtk_widget_get_window(diameter->win));
 }
 
 static tap_param diameter_stat_params[] = {
index d3f79ef02f89ef3bdadb1139766a0774cca2f0ac..2b4441479ddf0a052f6e889989165490fdee0b0b 100644 (file)
@@ -52,6 +52,7 @@
 
 #include "gtk/main_proto_draw.h"
 
+#include "gtk/old-gtk-compat.h"
 
 enum
 {
@@ -767,7 +768,7 @@ expert_comp_init(const char *optarg _U_, void* userdata _U_)
     /* This will bring up the progress bar
      * Put our window back in front
      */
-    gdk_window_raise(ss->win->window);
+    gdk_window_raise(gtk_widget_get_window(ss->win));
     /* Set the lable text */
     expert_comp_draw(ss);
 }
index 38618143371200c44bf31f25b27716df614e8e1c..288c5a4dd8f853f401285c067d88b55e91c1aa7c 100644 (file)
@@ -54,6 +54,7 @@
 #include "gtk/gtkglobals.h"
 #include "gtk/main.h"
 
+#include "gtk/old-gtk-compat.h"
 
 /* used to keep track of the statistics for an entire program interface */
 typedef struct _fcstat_t {
@@ -200,7 +201,7 @@ gtk_fcstat_init(const char *optarg, void *userdata _U_)
        window_present(fc->win);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(fc->win->window);
+       gdk_window_raise(gtk_widget_get_window(fc->win));
 }
 
 static tap_param fc_stat_params[] = {
index 82b57d176552bf4bb32d31424b24688533b3ecb6..34b5bfad8bbd872e98b7d638d8bc459e1b13029d 100644 (file)
@@ -53,6 +53,8 @@
 #include "gtk/filter_dlg.h"
 #include "gtk/gui_utils.h"
 
+#include "gtk/old-gtk-compat.h"
+
 enum
 {
     IEI_COLUMN,
@@ -445,7 +447,7 @@ gsm_a_stat_gtk_bssmap_cb(
      */
     if (dlg_bssmap.win)
     {
-    gdk_window_raise(dlg_bssmap.win->window);
+    gdk_window_raise(gtk_widget_get_window(dlg_bssmap.win));
     return;
     }
 
@@ -486,7 +488,7 @@ gsm_a_stat_gtk_dtap_cb(
      */
     if (dlg_dtap_p->win)
     {
-    gdk_window_raise(dlg_dtap_p->win->window);
+    gdk_window_raise(gtk_widget_get_window(dlg_dtap_p->win));
     return;
     }
 
@@ -724,7 +726,7 @@ gsm_a_stat_gtk_sacch_rr_cb(GtkAction *action _U_, gpointer user_data _U_ )
      */
     if (dlg_sacch_rr.win)
     {
-    gdk_window_raise(dlg_sacch_rr.win->window);
+    gdk_window_raise(gtk_widget_get_window(dlg_sacch_rr.win));
     return;
     }
 
index 21b3f51d9eb889b990c59f9bc1dba58e8f229802..5b1b4e31de478e2eeb06f400e223cfcc8e715dc4 100644 (file)
@@ -53,6 +53,8 @@
 #include "gtk/gtkglobals.h"
 #include "gtk/main.h"
 
+#include "gtk/old-gtk-compat.h"
+
 /* used to keep track of the statistics for an entire program interface */
 typedef struct _gtpstat_t {
        GtkWidget *win;
@@ -217,7 +219,7 @@ gtk_gtpstat_init(const char *optarg, void *userdata _U_)
        window_present(gtp->win);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(gtp->win->window);
+       gdk_window_raise(gtk_widget_get_window(gtp->win));
 }
 
 static tap_param gtp_stat_params[] = {
index df4c85d528bca9dc96a39dc38a206d1c53d0d11b..827612fcd015ada2bd1940267473f70e43a436df 100644 (file)
@@ -52,6 +52,7 @@
 #include "gtk/gui_utils.h"
 #include "gtk/main.h"
 
+#include "gtk/old-gtk-compat.h"
 
 static void gtk_h225counter_init(const char *optarg, void *userdata);
 
@@ -566,7 +567,7 @@ gtk_h225counter_init(const char *optarg, void *userdata _U_)
        window_present(hs->win);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(hs->win->window);
+       gdk_window_raise(gtk_widget_get_window(hs->win));
 }
 
 void
index d3ceaa47420577feb7baeaa69bc7250f2a4987a9..41cd12f99beda08547de128e451c665927d28a62 100644 (file)
@@ -53,6 +53,7 @@
 #include "gtk/gui_utils.h"
 #include "gtk/main.h"
 
+#include "gtk/old-gtk-compat.h"
 
 static void gtk_h225rassrt_init(const char *optarg, void *userdata);
 
@@ -333,7 +334,7 @@ gtk_h225rassrt_init(const char *optarg, void *userdata _U_)
        window_present(hs->win);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(hs->win->window);
+       gdk_window_raise(gtk_widget_get_window(hs->win));
 }
 
 void
index ebbad20cc8721db7b55ac97c267e45b353758af7..945d75ed9f1dfd9004a020c539e7fa23183462c6 100644 (file)
@@ -1272,7 +1272,7 @@ static void dialog_graph_draw(user_data_t* user_data)
        }
 
 
-       gdk_draw_pixmap(user_data->dlg.dialog_graph.draw_area->window,
+       gdk_draw_pixmap(gtk_widget_get_window(user_data->dlg.dialog_graph.draw_area),
 #if GTK_CHECK_VERSION(2,18,0)
                        gtk_widget_get_style(user_data->dlg.dialog_graph.draw_area)->fg_gc[gtk_widget_get_state(user_data->dlg.dialog_graph.draw_area)],
 #else
@@ -1320,7 +1320,7 @@ static gboolean draw_area_expose_event(GtkWidget *widget, GdkEventExpose *event,
 {
        user_data_t *user_data = data;
 
-       gdk_draw_pixmap(widget->window,
+       gdk_draw_pixmap(gtk_widget_get_window(widget),
 #if GTK_CHECK_VERSION(2,18,0)
                        gtk_widget_get_style(widget)->fg_gc[gtk_widget_get_state(widget)],
 #else
@@ -1345,7 +1345,7 @@ static gboolean draw_area_configure_event(GtkWidget *widget, GdkEventConfigure *
                user_data->dlg.dialog_graph.pixmap=NULL;
        }
 
-       user_data->dlg.dialog_graph.pixmap=gdk_pixmap_new(widget->window,
+       user_data->dlg.dialog_graph.pixmap=gdk_pixmap_new(gtk_widget_get_window(widget),
                        widget->allocation.width,
                        widget->allocation.height,
                        -1);
index 0a7005d16e7abf9431e5dfd49c281bc1c3f74bba..6571d2b8d5901f6308eab3d932f4d0f3cc118710 100644 (file)
@@ -1116,7 +1116,7 @@ io_stat_draw(io_stat_t *io)
 
 
 
-       gdk_draw_pixmap(io->draw_area->window,
+       gdk_draw_pixmap(gtk_widget_get_window(io->draw_area),
 #if GTK_CHECK_VERSION(2,18,0)
                        gtk_widget_get_style(io->draw_area)->fg_gc[gtk_widget_get_state(io->draw_area)],
 #else
@@ -1308,7 +1308,7 @@ iostat_init(const char *optarg _U_, void* userdata _U_)
        init_io_stat_window(io);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(io->window->window);
+       gdk_window_raise(gtk_widget_get_window(io->window));
        io_stat_redraw(io);
 }
 
@@ -1385,7 +1385,7 @@ draw_area_configure_event(GtkWidget *widget, GdkEventConfigure *event _U_, gpoin
                io->pixmap=NULL;
        }
 
-       io->pixmap=gdk_pixmap_new(widget->window,
+       io->pixmap=gdk_pixmap_new(gtk_widget_get_window(widget),
                        widget->allocation.width,
                        widget->allocation.height,
                        -1);
@@ -1440,7 +1440,7 @@ draw_area_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_d
 {
        io_stat_t *io = user_data;
 
-       gdk_draw_pixmap(widget->window,
+       gdk_draw_pixmap(gtk_widget_get_window(widget),
 #if GTK_CHECK_VERSION(2,18,0)
                        gtk_widget_get_style(widget)->fg_gc[gtk_widget_get_state(widget)],
 #else
@@ -1489,7 +1489,7 @@ tick_interval_select(GtkWidget *item, gpointer user_data)
 
        io->interval=tick_interval_values[i];
        cf_retap_packets(&cfile);
-       gdk_window_raise(io->window->window);
+       gdk_window_raise(gtk_widget_get_window(io->window));
        io_stat_redraw(io);
 }
 
@@ -1890,7 +1890,7 @@ filter_callback(GtkWidget *widget _U_, gpointer user_data)
        io_stat_reset(gio->io);
        enable_graph(gio, filter, field);
        cf_retap_packets(&cfile);
-       gdk_window_raise(gio->io->window->window);
+       gdk_window_raise(gtk_widget_get_window(gio->io->window));
        io_stat_redraw(gio->io);
 
        return;
index 8f235401e88bc7bbeca3e563268b5b03e5fa2597..109019fded04b380c22e16763b0c468d73c7ffe8 100644 (file)
@@ -52,6 +52,7 @@
 #include "gtk/gtkglobals.h"
 #include "gtk/main.h"
 
+#include "gtk/old-gtk-compat.h"
 
 /* used to keep track of the statistics for an entire program interface */
 typedef struct _ldapstat_t {
@@ -232,7 +233,7 @@ gtk_ldapstat_init(const char *optarg, void *userdata _U_)
        window_present(ldap->win);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(ldap->win->window);
+       gdk_window_raise(gtk_widget_get_window(ldap->win));
 }
 
 static tap_param ldap_stat_params[] = {
index 5255057f7dea09e454885e07f3491d8a495932ae..eb8734e9e08c6fe9f0b932eefd159e2ce1ace5d4 100644 (file)
@@ -57,6 +57,8 @@
 #include "gtk/help_dlg.h"
 #include "gtk/main.h"
 
+#include "gtk/old-gtk-compat.h"
+
 /**********************************************/
 /* Table column identifiers and title strings */
 
@@ -1294,7 +1296,7 @@ static void gtk_mac_lte_stat_init(const char *optarg, void *userdata _U_)
 
     /* Retap */
     cf_retap_packets(&cfile);
-    gdk_window_raise(hs->mac_lte_stat_dlg_w->window);
+    gdk_window_raise(gtk_widget_get_window(hs->mac_lte_stat_dlg_w));
 }
 
 
index 77fded7fb97536ec69a57ee27a15e04791b63b69..1ecc012dd0d3d7c5ad9aa50b51c5b192abe292de 100644 (file)
@@ -57,7 +57,7 @@
 
 #include "tap-megaco-common.h"
 
-
+#include "gtk/old-gtk-compat.h"
 
 static void
 megacostat_reset(void *pms)
@@ -213,7 +213,7 @@ gtk_megacostat_init(const char *optarg, void *userdata _U_)
        window_present(ms->win);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(ms->win->window);
+       gdk_window_raise(gtk_widget_get_window(ms->win));
 }
 
 static tap_param megaco_srt_params[] = {
index 5c96506544a805edea0b838aa1ff9cc6429e55ef..663d186a40548eec07c38adff1e831390636d55e 100644 (file)
@@ -52,6 +52,7 @@
 #include "gtk/gui_utils.h"
 #include "gtk/main.h"
 
+#include "gtk/old-gtk-compat.h"
 
 #define NUM_TIMESTATS 10
 
@@ -299,7 +300,7 @@ gtk_mgcpstat_init(const char *optarg, void *userdata _U_)
        window_present(ms->win);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(ms->win->window);
+       gdk_window_raise(gtk_widget_get_window(ms->win));
 }
 
 static tap_param mgcp_srt_params[] = {
index 65aede475d99afa7e03061610ac7ed1ce6fde489..fefc6ef0888d7aed8e9f5f7e700c60d05bbd9c74 100644 (file)
@@ -54,6 +54,7 @@
 #include "gtk/gui_utils.h"
 #include "gtk/mtp3_stat.h"
 
+#include "gtk/old-gtk-compat.h"
 
 enum
 {
@@ -405,7 +406,7 @@ mtp3_stat_gtk_cb(
      */
     if (dlg.win)
     {
-        gdk_window_raise(dlg.win->window);
+        gdk_window_raise(gtk_widget_get_window(dlg.win));
         return;
     }
 
index 353a00883e40084560618eb6e043e7a43273e832..dd6ff59e569bf8e0d092d12f8319d61c164fd87b 100644 (file)
@@ -52,6 +52,7 @@
 #include "gtk/gui_utils.h"
 #include "gtk/main.h"
 
+#include "gtk/old-gtk-compat.h"
 
 #define NUM_TIMESTATS 8
 #define NUM_COLUMNS 11
@@ -350,7 +351,7 @@ gtk_radiusstat_init(const char *optarg, void *userdata _U_)
        window_present(rs->win);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(rs->win->window);
+       gdk_window_raise(gtk_widget_get_window(rs->win));
 }
 
 static tap_param radius_stat_params[] = {
index 636374cef8e8391a4bb7b444847ab21cb354c628..fa070e466ef29ca6007d34d5d4a17a113f520bfb 100644 (file)
@@ -56,6 +56,8 @@
 #include "gtk/help_dlg.h"
 #include "gtk/main.h"
 
+#include "gtk/old-gtk-compat.h"
+
 /**********************************************/
 /* Table column identifiers and title strings */
 
@@ -1526,7 +1528,7 @@ static void gtk_rlc_lte_stat_init(const char *optarg, void *userdata _U_)
 
     /* Retap */
     cf_retap_packets(&cfile);
-    gdk_window_raise(hs->dlg_w->window);
+    gdk_window_raise(gtk_widget_get_window(hs->dlg_w));
 }
 
 
index 9fe5e17c032adcdb17d9804fd9e74d2b82ff543a..cd753708e1cc3dd5bacc3b5ae13a2bcf22f24afa 100644 (file)
@@ -50,6 +50,8 @@
 #include "gtk/dlg_utils.h"
 #include "gtk/main.h"
 
+#include "gtk/old-gtk-compat.h"
+
 #define NANOSECS_PER_SEC 1000000000
 
 static GtkWidget *win=NULL;
@@ -340,7 +342,7 @@ gtk_rpcprogs_init(const char *optarg _U_, void* userdata _U_)
        GtkWidget *bbox;
 
        if(win){
-               gdk_window_raise(win->window);
+               gdk_window_raise(gtk_widget_get_window(win));
                return;
        }
 
@@ -406,7 +408,7 @@ gtk_rpcprogs_init(const char *optarg _U_, void* userdata _U_)
        window_present(win);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(win->window);
+       gdk_window_raise(gtk_widget_get_window(win));
 }
 
 #ifdef MAIN_MENU_USE_UIMANAGER
index 47c6725e183b49be0d21fd5ab38ac52b7858a63b..10d4da62a831fd6485be21f768e1d531c0f51da3 100644 (file)
@@ -55,6 +55,7 @@
 #include "gtk/gtkglobals.h"
 #include "gtk/filter_autocomplete.h"
 
+#include "gtk/old-gtk-compat.h"
 
 /* used to keep track of the statistics for an entire program interface */
 typedef struct _rpcstat_t {
@@ -314,7 +315,7 @@ gtk_rpcstat_init(const char *optarg, void* userdata _U_)
        window_present(rs->win);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(rs->win->window);
+       gdk_window_raise(gtk_widget_get_window(rs->win));
 }
 
 
@@ -431,7 +432,7 @@ gtk_rpcstat_cb(GtkWidget *w _U_, gpointer d _U_)
 
        /* if the window is already open, bring it to front */
        if(dlg){
-               gdk_window_raise(dlg->window);
+               gdk_window_raise(gtk_widget_get_window(dlg));
                return;
        }
 
index 5ad092fb35d932850b0f9c0e217317a84ecd7cc9..987f52e2f3de545026dab3feb5e999dd09db7e5b 100644 (file)
@@ -1273,7 +1273,7 @@ static void dialog_graph_draw(user_data_t* user_data)
        }
 
 
-       gdk_draw_pixmap(user_data->dlg.dialog_graph.draw_area->window,
+       gdk_draw_pixmap(gtk_widget_get_window(user_data->dlg.dialog_graph.draw_area),
 #if GTK_CHECK_VERSION(2,18,0)
                        gtk_widget_get_style(user_data->dlg.dialog_graph.draw_area)->fg_gc[gtk_widget_get_state(user_data->dlg.dialog_graph.draw_area)],
 #else
@@ -1336,7 +1336,7 @@ static gint expose_event(GtkWidget *widget, GdkEventExpose *event)
        }
 
 
-       gdk_draw_pixmap(widget->window,
+       gdk_draw_pixmap(gtk_widget_get_window(widget),
 #if GTK_CHECK_VERSION(2,18,0)
                        gtk_widget_get_style(widget)->fg_gc[gtk_widget_get_state(widget)],
 #else
@@ -1368,7 +1368,7 @@ static gint configure_event(GtkWidget *widget, GdkEventConfigure *event _U_)
                user_data->dlg.dialog_graph.pixmap=NULL;
        }
 
-       user_data->dlg.dialog_graph.pixmap=gdk_pixmap_new(widget->window,
+       user_data->dlg.dialog_graph.pixmap=gdk_pixmap_new(gtk_widget_get_window(widget),
                                                          widget->allocation.width,
                                                          widget->allocation.height,
                                                          -1);
index 3b40a40382284960d8bb36bfed880777dcd42b3f..976a208da88e173475e3c3df54b33a3f3392c294 100644 (file)
@@ -968,7 +968,7 @@ draw_channel_cursor(rtp_channel_info_t *rci, guint32 start_index)
 
                gdk_draw_pixbuf(rci->pixmap, NULL, rci->cursor_pixbuf, 0, 0, (int) (rci->cursor_prev/MULT), 0, -1, -1, GDK_RGB_DITHER_NONE, 0 ,0);
 
-               gdk_draw_drawable(rci->draw_area->window,
+               gdk_draw_drawable(gtk_widget_get_window(rci->draw_area),
 #if GTK_CHECK_VERSION(2,18,0)
                        gtk_widget_get_style(rci->draw_area)->fg_gc[gtk_widget_get_state(rci->draw_area)],
 #else
@@ -992,7 +992,7 @@ draw_channel_cursor(rtp_channel_info_t *rci, guint32 start_index)
                        (int) (idx/MULT),
                        rci->draw_area->allocation.height-HEIGHT_TIME_LABEL);
 
-               gdk_draw_drawable(rci->draw_area->window,
+               gdk_draw_drawable(gtk_widget_get_window(rci->draw_area),
 #if GTK_CHECK_VERSION(2,18,0)
                        gtk_widget_get_style(rci->draw_area)->fg_gc[gtk_widget_get_state(rci->draw_area)],
 #else
@@ -1310,11 +1310,11 @@ static void channel_draw(rtp_channel_info_t* rci)
                   bump that value by this amount. */
                progbar_quantum = imax/100;
 
-               red_gc = gdk_gc_new(rci->draw_area->window);
+               red_gc = gdk_gc_new(gtk_widget_get_window(rci->draw_area));
                gdk_gc_set_rgb_fg_color(red_gc, &red_color);
-               amber_gc = gdk_gc_new(rci->draw_area->window);
+               amber_gc = gdk_gc_new(gtk_widget_get_window(rci->draw_area));
                gdk_gc_set_rgb_fg_color(amber_gc, &amber_color);
-               white_gc = gdk_gc_new(rci->draw_area->window);
+               white_gc = gdk_gc_new(gtk_widget_get_window(rci->draw_area));
                gdk_gc_set_rgb_fg_color(white_gc, &white_color);
 
                for (i=0; i< imax; i++) {
@@ -1426,8 +1426,8 @@ static gboolean expose_event_channels(GtkWidget *widget, GdkEventExpose *event,
 {
        rtp_channel_info_t *rci = user_data;
 
-       if (GDK_IS_DRAWABLE(widget->window))
-               gdk_draw_drawable(widget->window,
+       if (GDK_IS_DRAWABLE(gtk_widget_get_window(widget)))
+               gdk_draw_drawable(gtk_widget_get_window(widget),
 #if GTK_CHECK_VERSION(2,18,0)
                        gtk_widget_get_style(widget)->fg_gc[gtk_widget_get_state(widget)],
 #else
@@ -1471,7 +1471,7 @@ configure_event_channels(GtkWidget *widget, GdkEventConfigure *event _U_, gpoint
                rci->pixmap=NULL;
        }
 
-       rci->pixmap = gdk_pixmap_new(widget->window,
+       rci->pixmap = gdk_pixmap_new(gtk_widget_get_window(widget),
                                        widget->allocation.width,
                                        widget->allocation.height,
                                        -1);
index ca9e80aa1aa881f408685fca21d559814a2c5be9..ea21831b606903e35060b84095a69b6f7319cd88 100644 (file)
@@ -58,6 +58,7 @@
 #include "gtk/tap_param_dlg.h"
 #include "gtk/gtkglobals.h"
 
+#include "gtk/old-gtk-compat.h"
 
 /* used to keep track of the statistics for an entire scsi command set */
 typedef struct _scsistat_t {
@@ -277,7 +278,7 @@ gtk_scsistat_init(const char *optarg, void* userdata _U_)
        window_present(rs->win);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(rs->win->window);
+       gdk_window_raise(gtk_widget_get_window(rs->win));
 }
 
 static enum_val_t scsi_command_sets[] = {
index 52c718281c15d348eff0553499f4e9e579ee39ef..c375c4f15a78c56e4df76f28718a466f48153f78 100644 (file)
@@ -43,6 +43,7 @@
 #include "gtk/main.h"
 #include "gtk/sctp_stat.h"
 
+#include "gtk/old-gtk-compat.h"
 
 #define DEFAULT_PIXELS_PER_TICK 2
 #define MAX_PIXELS_PER_TICK     4
@@ -125,10 +126,10 @@ static void draw_sack_graph(struct sctp_udata *u_data)
        gboolean more = FALSE;
        gint width;
 
-       red_gc = gdk_gc_new(u_data->io->draw_area->window);
+       red_gc = gdk_gc_new(gtk_widget_get_window(u_data->io->draw_area));
        gdk_gc_set_rgb_fg_color(red_gc, &red_color);
 
-       green_gc = gdk_gc_new(u_data->io->draw_area->window);
+       green_gc = gdk_gc_new(gtk_widget_get_window(u_data->io->draw_area));
        gdk_gc_set_rgb_fg_color(green_gc, &green_color);
 
        if (u_data->dir == 1)
@@ -593,7 +594,7 @@ static void sctp_graph_redraw(struct sctp_udata *u_data)
        ios=(sctp_graph_t *)g_object_get_data(G_OBJECT(u_data->io->draw_area), "sctp_graph_t");
        g_assert(ios != NULL);
 
-       gdk_draw_pixmap(u_data->io->draw_area->window,
+       gdk_draw_pixmap(gtk_widget_get_window(u_data->io->draw_area),
 #if GTK_CHECK_VERSION(2,18,0)
                        gtk_widget_get_style(u_data->io->draw_area)->fg_gc[gtk_widget_get_state(u_data->io->draw_area)],
 #else
@@ -650,7 +651,7 @@ on_configure_event(GtkWidget *widget, GdkEventConfigure *event _U_, gpointer use
                u_data->io->pixmap = NULL;
        }
 
-       u_data->io->pixmap = gdk_pixmap_new(widget->window,
+       u_data->io->pixmap = gdk_pixmap_new(gtk_widget_get_window(widget),
                                            widget->allocation.width,
                                            widget->allocation.height,
                                            -1);
@@ -675,7 +676,7 @@ on_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data _U_
        ios=(sctp_graph_t *)g_object_get_data(G_OBJECT(widget), "sctp_graph_t");
        g_assert(ios != NULL);
 
-       gdk_draw_pixmap(widget->window,
+       gdk_draw_pixmap(gtk_widget_get_window(widget),
 #if GTK_CHECK_VERSION(2,18,0)
                        gtk_widget_get_style(widget)->fg_gc[gtk_widget_get_state(widget)],
 #else
@@ -829,7 +830,7 @@ on_button_press_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer us
                ios=(sctp_graph_t *)g_object_get_data(G_OBJECT(u_data->io->draw_area), "sctp_graph_t");
                g_assert(ios != NULL);
 
-               gdk_draw_pixmap(u_data->io->draw_area->window,
+               gdk_draw_pixmap(gtk_widget_get_window(u_data->io->draw_area),
 #if GTK_CHECK_VERSION(2,18,0)
                                gtk_widget_get_style(u_data->io->draw_area)->fg_gc[gtk_widget_get_state(u_data->io->draw_area)],
 #else
@@ -894,7 +895,7 @@ on_button_release_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer
                ios=(sctp_graph_t *)g_object_get_data(G_OBJECT(u_data->io->draw_area), "sctp_graph_t");
                g_assert(ios != NULL);
 
-               gdk_draw_pixmap(u_data->io->draw_area->window,
+               gdk_draw_pixmap(gtk_widget_get_window(u_data->io->draw_area),
 #if GTK_CHECK_VERSION(2,18,0)
                                gtk_widget_get_style(u_data->io->draw_area)->fg_gc[gtk_widget_get_state(u_data->io->draw_area)],
 #else
@@ -1026,7 +1027,7 @@ on_button_release_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer
                        ios=(sctp_graph_t *)g_object_get_data(G_OBJECT(u_data->io->draw_area), "sctp_graph_t");
                        g_assert(ios != NULL);
 
-                       gdk_draw_pixmap(u_data->io->draw_area->window,
+                       gdk_draw_pixmap(gtk_widget_get_window(u_data->io->draw_area),
 #if GTK_CHECK_VERSION(2,18,0)
                                    gtk_widget_get_style(u_data->io->draw_area)->fg_gc[gtk_widget_get_state(u_data->io->draw_area)],
 #else
index 4ccd670d3336f3cd0a81f1632d5359ba6c558f1e..057e3971fafd5a8b06868eb6a001b42b26118951 100644 (file)
@@ -44,6 +44,7 @@
 #include "gtk/main.h"
 #include "gtk/sctp_stat.h"
 
+#include "gtk/old-gtk-compat.h"
 
 #define DEFAULT_PIXELS_PER_TICK 2
 #define MAX_PIXELS_PER_TICK     4
@@ -157,13 +158,13 @@ draw_sack_graph(struct sctp_udata *u_data)
        guint32 /*max_num,*/ diff;
        guint32 *dup_list;
 
-       red_gc = gdk_gc_new(u_data->io->draw_area->window);
+       red_gc = gdk_gc_new(gtk_widget_get_window(u_data->io->draw_area));
        gdk_gc_set_rgb_fg_color(red_gc, &red_color);
 
-       green_gc = gdk_gc_new(u_data->io->draw_area->window);
+       green_gc = gdk_gc_new(gtk_widget_get_window(u_data->io->draw_area));
        gdk_gc_set_rgb_fg_color(green_gc, &green_color);
 
-       cyan_gc = gdk_gc_new(u_data->io->draw_area->window);
+       cyan_gc = gdk_gc_new(gtk_widget_get_window(u_data->io->draw_area));
        gdk_gc_set_rgb_fg_color(cyan_gc, &cyan_color);
 
        if (u_data->dir==2)
@@ -327,11 +328,11 @@ draw_nr_sack_graph(struct sctp_udata *u_data)
        /* This holds the sum of gap acks and nr gap acks */
        guint16 total_gaps = 0;
 
-       red_gc = gdk_gc_new(u_data->io->draw_area->window);
+       red_gc = gdk_gc_new(gtk_widget_get_window(u_data->io->draw_area));
        gdk_gc_set_rgb_fg_color(red_gc, &red_color);
-       blue_gc = gdk_gc_new(u_data->io->draw_area->window);
+       blue_gc = gdk_gc_new(gtk_widget_get_window(u_data->io->draw_area));
        gdk_gc_set_rgb_fg_color(blue_gc, &blue_color);
-       green_gc = gdk_gc_new(u_data->io->draw_area->window);
+       green_gc = gdk_gc_new(gtk_widget_get_window(u_data->io->draw_area));
        gdk_gc_set_rgb_fg_color(green_gc, &green_color);
 
 
@@ -909,7 +910,7 @@ sctp_graph_t *ios;
        ios=(sctp_graph_t *)g_object_get_data(G_OBJECT(u_data->io->draw_area), "sctp_graph_t");
        g_assert(ios != NULL);
 
-       gdk_draw_pixmap(u_data->io->draw_area->window,
+       gdk_draw_pixmap(gtk_widget_get_window(u_data->io->draw_area),
 #if GTK_CHECK_VERSION(2,18,0)
                        gtk_widget_get_style(u_data->io->draw_area)->fg_gc[gtk_widget_get_state(u_data->io->draw_area)],
 #else
@@ -972,7 +973,7 @@ configure_event(GtkWidget *widget, GdkEventConfigure *event _U_, gpointer user_d
                u_data->io->pixmap=NULL;
        }
 
-       u_data->io->pixmap=gdk_pixmap_new(widget->window,
+       u_data->io->pixmap=gdk_pixmap_new(gtk_widget_get_window(widget),
                        widget->allocation.width,
                        widget->allocation.height,
                        -1);
@@ -997,7 +998,7 @@ expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data _U_)
        ios=(sctp_graph_t *)g_object_get_data(G_OBJECT(widget), "sctp_graph_t");
        g_assert(ios != NULL);
 
-       gdk_draw_pixmap(widget->window,
+       gdk_draw_pixmap(gtk_widget_get_window(widget),
 #if GTK_CHECK_VERSION(2,18,0)
                        gtk_widget_get_style(widget)->fg_gc[gtk_widget_get_state(widget)],
 #else
@@ -1154,7 +1155,7 @@ on_button_press_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer us
 
                g_assert(ios != NULL);
 
-               gdk_draw_pixmap(u_data->io->draw_area->window,
+               gdk_draw_pixmap(gtk_widget_get_window(u_data->io->draw_area),
 #if GTK_CHECK_VERSION(2,18,0)
                                gtk_widget_get_style(u_data->io->draw_area)->fg_gc[gtk_widget_get_state(u_data->io->draw_area)],
 #else
@@ -1219,7 +1220,7 @@ on_button_release_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer
 
                g_assert(ios != NULL);
 
-               gdk_draw_pixmap(u_data->io->draw_area->window,
+               gdk_draw_pixmap(gtk_widget_get_window(u_data->io->draw_area),
 #if GTK_CHECK_VERSION(2,18,0)
                                gtk_widget_get_style(u_data->io->draw_area)->fg_gc[gtk_widget_get_state(u_data->io->draw_area)],
 #else
@@ -1377,7 +1378,7 @@ on_button_release_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer
                        ios=(sctp_graph_t *)g_object_get_data(G_OBJECT(u_data->io->draw_area), "sctp_graph_t");
                        g_assert(ios != NULL);
 
-                       gdk_draw_pixmap(u_data->io->draw_area->window,
+                       gdk_draw_pixmap(gtk_widget_get_window(u_data->io->draw_area),
 #if GTK_CHECK_VERSION(2,18,0)
                                        gtk_widget_get_style(u_data->io->draw_area)->fg_gc[gtk_widget_get_state(u_data->io->draw_area)],
 #else
index c2ed8973e96871231db7e0492905e4baf10f19f3..562e8ce579bb965b29f8fc26e11dc7bc07e92c36 100644 (file)
@@ -41,6 +41,8 @@
 #include "gtk/sctp_stat.h"
 #include "gtk/gtkglobals.h"
 
+#include "gtk/old-gtk-compat.h"
+
 static GtkWidget *sctp_stat_dlg=NULL;
 static GtkWidget *clist = NULL;
 static GList *last_list = NULL;
@@ -627,7 +629,7 @@ gtk_sctpstat_dlg(void)
 
        sctp_stat_dlg = sctp_stat_dlg_w;
        cf_retap_packets(&cfile);
-       gdk_window_raise(sctp_stat_dlg_w->window);
+       gdk_window_raise(gtk_widget_get_window(sctp_stat_dlg_w));
 
 }
 
index 5264be89899e4dd7a194ef5ce7fc9afbf0c090ac..a5e31da0edd6b944a0f70a6fb59b52157d244d07 100644 (file)
@@ -38,6 +38,8 @@
 #include "gtk/gui_utils.h"
 #include "gtk/stock_icons.h"
 
+#include "gtk/old-gtk-compat.h"
+
 static void simple_dialog_cancel_cb(GtkWidget *, gpointer);
 
 #define CALLBACK_FCT_KEY    "ESD_Callback_Fct"
@@ -306,7 +308,7 @@ vsimple_dialog(ESD_TYPE_E type, gint btn_mask, const gchar *msg_format, va_list
   message = g_strdup_vprintf(msg_format, ap);
 
   if (top_level != NULL) {
-    state = gdk_window_get_state(top_level->window);
+    state = gdk_window_get_state(gtk_widget_get_window(top_level));
   }
 
   /* If we don't yet have a main window or it's iconified, don't show the
index 9337eaceded87f3f93d126908d7c288fc2cf4318..09a0bcba3c3b7d25bc6491e98d7f3a42ff8054a6 100644 (file)
@@ -44,6 +44,7 @@
 #include "gtk/tap_param_dlg.h"
 #include "gtk/main.h"
 
+#include "gtk/old-gtk-compat.h"
 
 #define SUM_STR_MAX    1024
 
@@ -712,7 +713,7 @@ gtk_sipstat_init(const char *optarg, void *userdata _U_)
 
     sip_init_hash(sp);
     cf_retap_packets(&cfile);
-    gdk_window_raise(sp->win->window);
+    gdk_window_raise(gtk_widget_get_window(sp->win));
 }
 
 static tap_param sip_stat_params[] = {
index 88bae52262177306f41412c5c62b89f961d5a029..ddf8e4f3f0d1724da0aceb6187ff8f8e2fb47978 100644 (file)
@@ -52,6 +52,7 @@
 #include "gtk/gtkglobals.h"
 #include "gtk/main.h"
 
+#include "gtk/old-gtk-compat.h"
 
 /* used to keep track of the statistics for an entire program interface */
 typedef struct _smb2stat_t {
@@ -197,7 +198,7 @@ gtk_smb2stat_init(const char *optarg, void *userdata _U_)
        window_present(ss->win);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(ss->win->window);
+       gdk_window_raise(gtk_widget_get_window(ss->win));
 }
 
 static tap_param smb2_stat_params[] = {
index b4088b3452349aa4c8c9b2c4e775903aa8bcba1e..8fa3adb901f78aa0578894a630c9ce8c1da67de9 100644 (file)
@@ -52,6 +52,7 @@
 #include "gtk/gtkglobals.h"
 #include "gtk/main.h"
 
+#include "gtk/old-gtk-compat.h"
 
 /* used to keep track of the statistics for an entire program interface */
 typedef struct _smbstat_t {
@@ -235,7 +236,7 @@ gtk_smbstat_init(const char *optarg, void *userdata _U_)
        window_present(ss->win);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(ss->win->window);
+       gdk_window_raise(gtk_widget_get_window(ss->win));
 }
 
 static tap_param smb_stat_params[] = {
index 15fcb6444c5082e0b85de3cd88178427dbad899e..a8f55a87a4616bbf6ba6bc2a742b12b022a51928 100644 (file)
@@ -42,6 +42,7 @@
 #include "gtk/tap_param_dlg.h"
 #include "gtk/main.h"
 
+#include "gtk/old-gtk-compat.h"
 
 struct _st_node_pres {
        GtkTreeIter*    iter;
@@ -328,7 +329,7 @@ init_gtk_tree(const char* optarg, void *userdata _U_)
        window_present(st->pr->win);
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(st->pr->win->window);
+       gdk_window_raise(gtk_widget_get_window(st->pr->win));
 }
 
 static tap_param tree_stat_params[] = {
index 2da60019ffd02981627ebcb475c376d01952a0dc..4667d6b3360df0235acd7eb3bede3f94637b2152 100644 (file)
@@ -52,6 +52,7 @@
 #include "gtk/gtkglobals.h"
 #include "gtk/filter_autocomplete.h"
 
+#include "gtk/old-gtk-compat.h"
 
 typedef struct _tap_param_dlg_list_item {
     GtkWidget *dlg;
@@ -201,7 +202,7 @@ tap_param_dlg_cb(GtkWidget *w _U_, gpointer data)
 
     /* if the window is already open, bring it to front */
     if(current_dlg->dlg){
-        gdk_window_raise(current_dlg->dlg->window);
+        gdk_window_raise(gtk_widget_get_window(current_dlg->dlg));
         return;
     }
 
index 019341341e420aa75c77c996244e79a426ad652a..be82a06c99d7f2a71cc420e95ce1bef77cb298c0 100644 (file)
@@ -56,6 +56,7 @@
 #include "gtk/dlg_utils.h"
 #include "gtk/gui_stat_menu.h"
 
+#include "gtk/old-gtk-compat.h"
 
 #define TH_FIN    0x01
 #define TH_SYN    0x02
@@ -769,7 +770,7 @@ static void create_drawing_area (struct graph *g)
 
        colormap = gtk_widget_get_colormap(GTK_WIDGET(g->drawing_area));
        if (!xor_gc) {
-               xor_gc = gdk_gc_new (g->drawing_area->window);
+               xor_gc = gdk_gc_new (gtk_widget_get_window(g->drawing_area));
                gdk_gc_set_function (xor_gc, GDK_XOR);
                if (!gdk_color_parse ("gray15", &color)) {
                        /*
@@ -787,8 +788,8 @@ static void create_drawing_area (struct graph *g)
                }
                gdk_gc_set_foreground (xor_gc, &color);
        }
-       g->fg_gc = gdk_gc_new (g->drawing_area->window);
-       g->bg_gc = gdk_gc_new (g->drawing_area->window);
+       g->fg_gc = gdk_gc_new (gtk_widget_get_window(g->drawing_area));
+       g->bg_gc = gdk_gc_new (gtk_widget_get_window(g->drawing_area));
        if (!gdk_color_parse ("white", &color)) {
                /*
                 * XXX - do more than just warn.
@@ -1500,7 +1501,7 @@ static void callback_cross_on_off (GtkWidget *toggle, gpointer data)
        if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (toggle))) {
                int x, y;
                g->cross.draw = TRUE;
-               gdk_window_get_pointer (g->drawing_area->window, &x, &y, 0);
+               gdk_window_get_pointer (gtk_widget_get_window(g->drawing_area), &x, &y, 0);
                cross_draw (g, x, y);
        } else {
                g->cross.draw = FALSE;
@@ -2017,7 +2018,7 @@ static void graph_title_pixmap_create (struct graph *g)
        if (g->title_pixmap)
                g_object_unref (g->title_pixmap);
 
-       g->title_pixmap = gdk_pixmap_new (g->drawing_area->window,
+       g->title_pixmap = gdk_pixmap_new (gtk_widget_get_window(g->drawing_area),
                                                        g->x_axis->p.width, g->wp.y, -1);
 }
 
@@ -2041,7 +2042,7 @@ static void graph_title_pixmap_draw (struct graph *g)
 
 static void graph_title_pixmap_display (struct graph *g)
 {
-       gdk_draw_pixmap (g->drawing_area->window, g->fg_gc, g->title_pixmap,
+       gdk_draw_pixmap (gtk_widget_get_window(g->drawing_area), g->fg_gc, g->title_pixmap,
                          0, 0, g->wp.x, 0, g->x_axis->p.width, g->wp.y);
 }
 
@@ -2054,9 +2055,9 @@ static void graph_pixmaps_create (struct graph *g)
        if (g->pixmap[1])
                g_object_unref (g->pixmap[1]);
 
-       g->pixmap[0] = gdk_pixmap_new (g->drawing_area->window,
+       g->pixmap[0] = gdk_pixmap_new (gtk_widget_get_window(g->drawing_area),
                                                                        g->wp.width, g->wp.height, -1);
-       g->pixmap[1] = gdk_pixmap_new (g->drawing_area->window,
+       g->pixmap[1] = gdk_pixmap_new (gtk_widget_get_window(g->drawing_area),
                                                                        g->wp.width, g->wp.height, -1);
 
        g->displayed = 0;
@@ -2064,16 +2065,16 @@ static void graph_pixmaps_create (struct graph *g)
 
 static void graph_display (struct graph *g)
 {
-       set_busy_cursor (g->drawing_area->window);
+       set_busy_cursor (gtk_widget_get_window(g->drawing_area));
        graph_pixmap_draw (g);
-       unset_busy_cursor (g->drawing_area->window);
+       unset_busy_cursor (gtk_widget_get_window(g->drawing_area));
        graph_pixmaps_switch (g);
        graph_pixmap_display (g);
 }
 
 static void graph_pixmap_display (struct graph *g)
 {
-    gdk_draw_pixmap (g->drawing_area->window, g->fg_gc,
+    gdk_draw_pixmap (gtk_widget_get_window(g->drawing_area), g->fg_gc,
                                        g->pixmap[g->displayed], 0, 0, g->wp.x, g->wp.y,
                                        g->wp.width, g->wp.height);
     if (g->cross.erase_needed) {
@@ -2176,9 +2177,9 @@ static void axis_pixmaps_create (struct axis *axis)
        if (axis->pixmap[1])
                g_object_unref (axis->pixmap[1]);
 
-       axis->pixmap[0] = gdk_pixmap_new (axis->drawing_area->window,
+       axis->pixmap[0] = gdk_pixmap_new (gtk_widget_get_window(axis->drawing_area),
                                                        axis->p.width, axis->p.height, -1);
-       axis->pixmap[1] = gdk_pixmap_new (axis->drawing_area->window,
+       axis->pixmap[1] = gdk_pixmap_new (gtk_widget_get_window(axis->drawing_area),
                                                        axis->p.width, axis->p.height, -1);
 
        axis->displayed = 0;
@@ -2378,7 +2379,7 @@ static void axis_pixmaps_switch (struct axis *axis)
 
 static void axis_pixmap_display (struct axis *axis)
 {
-       gdk_draw_pixmap (axis->drawing_area->window, axis->g->fg_gc,
+       gdk_draw_pixmap (gtk_widget_get_window(axis->drawing_area), axis->g->fg_gc,
                        axis->pixmap[axis->displayed], 0, 0, axis->p.x, axis->p.y,
                        axis->p.width, axis->p.height);
 }
@@ -2552,7 +2553,7 @@ static void graph_select_segment (struct graph *g, int x, int y)
        x -= g->geom.x;
        y = g->geom.height-1 - (y - g->geom.y);
 
-       set_busy_cursor (g->drawing_area->window);
+       set_busy_cursor (gtk_widget_get_window(g->drawing_area));
 
        for (list=g->elists; list; list=list->next)
                for (e=list->elements; e->type != ELMT_NONE; e++) {
@@ -2578,7 +2579,7 @@ static void graph_select_segment (struct graph *g, int x, int y)
        if (num) {
                cf_goto_frame(&cfile, num);
        }
-       unset_busy_cursor (g->drawing_area->window);
+       unset_busy_cursor (gtk_widget_get_window(g->drawing_area));
 }
 
 static int line_detect_collision (struct element *e, int x, int y)
@@ -2629,9 +2630,9 @@ static void cross_xor (struct graph *g, int x, int y)
 {
        if (x > g->wp.x && x < g->wp.x+g->wp.width &&
                                y >= g->wp.y && y < g->wp.y+g->wp.height) {
-               gdk_draw_line (g->drawing_area->window, xor_gc, g->wp.x,
+               gdk_draw_line (gtk_widget_get_window(g->drawing_area), xor_gc, g->wp.x,
                                                y, g->wp.x + g->wp.width, y);
-               gdk_draw_line (g->drawing_area->window, xor_gc, x,
+               gdk_draw_line (gtk_widget_get_window(g->drawing_area), xor_gc, x,
                                                g->wp.y, x, g->wp.y + g->wp.height);
        }
 }
@@ -2690,7 +2691,7 @@ static void magnify_create (struct graph *g, int x, int y)
        }
        graph_element_lists_make (mg);
 
-       gdk_window_get_position (GTK_WIDGET (g->toplevel)->window, &pos.x, &pos.y);
+       gdk_window_get_position (gtk_widget_get_window(GTK_WIDGET (g->toplevel)), &pos.x, &pos.y);
        g->magnify.x = pos.x + x - g->magnify.width/2;
        g->magnify.y = pos.y + y - g->magnify.height/2;
        offsetpos.x = g->magnify.x + g->magnify.offset.x;
@@ -2725,7 +2726,7 @@ static void magnify_move (struct graph *g, int x, int y)
 {
        struct ipoint pos, offsetpos;
 
-       gdk_window_get_position (GTK_WIDGET (g->toplevel)->window, &pos.x, &pos.y);
+       gdk_window_get_position (gtk_widget_get_window(GTK_WIDGET (g->toplevel)), &pos.x, &pos.y);
        g->magnify.x = pos.x + x - g->magnify.width/2;
        g->magnify.y = pos.y + y - g->magnify.height/2;
        offsetpos.x = g->magnify.x + g->magnify.offset.x;
@@ -2762,7 +2763,7 @@ static void magnify_get_geom (struct graph *g, int x, int y)
 {
        int posx, posy;
 
-       gdk_window_get_position (GTK_WIDGET (g->toplevel)->window, &posx, &posy);
+       gdk_window_get_position (gtk_widget_get_window(GTK_WIDGET (g->toplevel)), &posx, &posy);
 
        g->magnify.g->geom.x = g->geom.x;
        g->magnify.g->geom.y = g->geom.y;
@@ -2869,10 +2870,10 @@ static gboolean expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer
                return TRUE;
 
        /* lower left corner */
-       gdk_draw_rectangle (g->drawing_area->window, g->bg_gc, TRUE, 0,
+       gdk_draw_rectangle (gtk_widget_get_window(g->drawing_area), g->bg_gc, TRUE, 0,
                        g->wp.y + g->wp.height, g->y_axis->p.width, g->x_axis->p.height);
        /* right margin */
-       gdk_draw_rectangle (g->drawing_area->window, g->bg_gc, TRUE,
+       gdk_draw_rectangle (gtk_widget_get_window(g->drawing_area), g->bg_gc, TRUE,
                        g->wp.x + g->wp.width, g->wp.y, RMARGIN_WIDTH, g->wp.height);
 
        graph_pixmap_display (g);
@@ -2952,7 +2953,7 @@ static void do_zoom_keyboard (struct graph *g)
        struct { double x, y; } factor;
        int pointer_x, pointer_y;
 
-       gdk_window_get_pointer (g->drawing_area->window, &pointer_x, &pointer_y, 0);
+       gdk_window_get_pointer (gtk_widget_get_window(g->drawing_area), &pointer_x, &pointer_y, 0);
 
        if (g->zoom.flags & ZOOM_OUT) {
                if (g->zoom.flags & ZOOM_HLOCK)
@@ -3030,7 +3031,7 @@ static void do_select_segment (struct graph *g)
 {
        int pointer_x, pointer_y;
 
-       gdk_window_get_pointer (g->drawing_area->window, &pointer_x, &pointer_y, 0);
+       gdk_window_get_pointer (gtk_widget_get_window(g->drawing_area), &pointer_x, &pointer_y, 0);
        graph_select_segment (g, pointer_x, pointer_y);
 }
 
@@ -3063,7 +3064,7 @@ static void do_magnify_create (struct graph *g)
 {
        int pointer_x, pointer_y;
 
-       gdk_window_get_pointer (g->drawing_area->window, &pointer_x, &pointer_y, 0);
+       gdk_window_get_pointer (gtk_widget_get_window(g->drawing_area), &pointer_x, &pointer_y, 0);
 
        magnify_create (g, (int )rint (pointer_x), (int )rint (pointer_y));
 }
@@ -3084,7 +3085,7 @@ static void do_key_motion (struct graph *g)
        axis_display (g->x_axis);
        if (g->cross.draw) {
                int pointer_x, pointer_y;
-               gdk_window_get_pointer (g->drawing_area->window, &pointer_x, &pointer_y, 0);
+               gdk_window_get_pointer (gtk_widget_get_window(g->drawing_area), &pointer_x, &pointer_y, 0);
                cross_draw (g, pointer_x, pointer_y);
        }
 }
@@ -3331,7 +3332,7 @@ static gboolean enter_notify_event (GtkWidget *widget, GdkEventCrossing *event _
        /* graph_pixmap_display (g); */
        if (g->cross.draw) {
                int x, y;
-               gdk_window_get_pointer (g->drawing_area->window, &x, &y, 0);
+               gdk_window_get_pointer (gtk_widget_get_window(g->drawing_area), &x, &y, 0);
                cross_draw (g, x, y);
        }
        return TRUE;
@@ -3343,7 +3344,7 @@ static void toggle_crosshairs (struct graph *g)
 #if 0
        if (g->cross.draw) {
                int x, y;
-               gdk_window_get_pointer (g->drawing_area->window, &x, &y, 0);
+               gdk_window_get_pointer (gtk_widget_get_window(g->drawing_area), &x, &y, 0);
                cross_draw (g);
        } else if (g->cross.erase_needed) {
                cross_erase (g);
@@ -3656,9 +3657,9 @@ static void tseq_tcptrace_read_config (struct graph *g)
        GdkColor color;
 
        g->s.tseq_tcptrace.flags = 0;
-       g->s.tseq_tcptrace.gc_seq = gdk_gc_new (g->drawing_area->window);
-       g->s.tseq_tcptrace.gc_ack[0] = gdk_gc_new (g->drawing_area->window);
-       g->s.tseq_tcptrace.gc_ack[1] = gdk_gc_new (g->drawing_area->window);
+       g->s.tseq_tcptrace.gc_seq = gdk_gc_new (gtk_widget_get_window(g->drawing_area));
+       g->s.tseq_tcptrace.gc_ack[0] = gdk_gc_new (gtk_widget_get_window(g->drawing_area));
+       g->s.tseq_tcptrace.gc_ack[1] = gdk_gc_new (gtk_widget_get_window(g->drawing_area));
        colormap = gtk_widget_get_colormap (GTK_WIDGET(g->drawing_area));
        if (!gdk_color_parse ("black", &color)) {
                /*
index 3f11cf11cde0ec84a6a77d873686cada3752e79a..e15fb17fedfe73903b3ac9ed0595082109f86d14 100644 (file)
@@ -72,6 +72,7 @@
 #include "gtk/rtp_player.h"
 #endif /* HAVE_LIBPORTAUDIO */
 
+#include "gtk/old-gtk-compat.h"
 
 /****************************************************************************/
 /* pointer to the one and only dialog window */
@@ -865,7 +866,7 @@ voip_calls_init_tap(const char *dummy _U_, void* userdata _U_)
 
        /* Scan for VoIP calls calls (redissect all packets) */
        cf_retap_packets(&cfile);
-       gdk_window_raise(voip_calls_dlg->window);
+       gdk_window_raise(gtk_widget_get_window(voip_calls_dlg));
        /* Tap listener will be removed and cleaned up in voip_calls_on_destroy */
 }
 
index 855ae035865853e73321a277f173b503b71d61aa..69a3858c435f585efef12c77668383a6e16153a9 100644 (file)
@@ -53,6 +53,8 @@
 #include "gtk/main.h"
 #include "gtk/utf8_entities.h"
 
+#include "gtk/old-gtk-compat.h"
+
 enum {
        BSSID_COLUMN,
        CHANNEL_COLUMN,
@@ -657,7 +659,7 @@ wlan_filter_toggle_dest(GtkWidget *widget, gpointer data)
        hs->use_dfilter = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (widget));
 
        cf_retap_packets(&cfile);
-       gdk_window_raise(wlanstat_dlg_w->window);
+       gdk_window_raise(gtk_widget_get_window(wlanstat_dlg_w));
 }
 
 static void
@@ -1946,7 +1948,7 @@ wlanstat_dlg_create (void)
        window_present (wlanstat_dlg_w);
 
        cf_retap_packets (&cfile);
-       gdk_window_raise(wlanstat_dlg_w->window);
+       gdk_window_raise(gtk_widget_get_window(wlanstat_dlg_w));
 }
 
 #ifdef MAIN_MENU_USE_UIMANAGER