Pacify GTK checkAPIs.pl warnings.
authorMichael Mann <mmann78@netscape.net>
Sun, 24 Jul 2016 18:16:19 +0000 (14:16 -0400)
committerMichael Mann <mmann78@netscape.net>
Sun, 24 Jul 2016 20:03:29 +0000 (20:03 +0000)
Add "Wireshark" macros to old-gtk-compat.h for GTK APIs that have been deprecated.
The macros are setup by version number to limit their proliferation (not that I
suspect much development will really be done there since GTK is deprecated).
Just want to make buildbots happy for the time being.

Change-Id: I095f850065166a0bc2e2456fb2e886ab64fdd97d
Reviewed-on: https://code.wireshark.org/review/16635
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Reviewed-by: Michael Mann <mmann78@netscape.net>
15 files changed:
ui/gtk/bytes_view.c
ui/gtk/capture_dlg.c
ui/gtk/extcap_gtk.c
ui/gtk/graph_analysis.c
ui/gtk/gui_utils.c
ui/gtk/iax2_analysis.c
ui/gtk/io_stat.c
ui/gtk/memory_dlg.c
ui/gtk/old-gtk-compat.h
ui/gtk/rlc_lte_graph.c
ui/gtk/rtp_analysis.c
ui/gtk/rtp_player.c
ui/gtk/sctp_byte_graph_dlg.c
ui/gtk/sctp_graph_dlg.c
ui/gtk/tcp_graph.c

index 911c77183832f7e6c0852bd6f1723f268af1ab41..6847fdea8d63a346279796f078a285be0a009380 100644 (file)
@@ -818,7 +818,7 @@ bytes_view_render(BytesView *bv, cairo_t *cr, GdkRectangle *area)
        width = gdk_window_get_width(gtk_widget_get_window(GTK_WIDGET(bv)));
        height = gdk_window_get_height(gtk_widget_get_window(GTK_WIDGET(bv)));
 #else
-       gdk_drawable_get_size(gtk_widget_get_window(GTK_WIDGET(bv)), &width, &height);
+       ws_gdk_drawable_get_size(gtk_widget_get_window(GTK_WIDGET(bv)), &width, &height);
 #endif
 
        if (width < 32 + MARGIN || height < bv->fontsize)
index 175e6854d7b9efefb00feed7f8cf54002cb307cd..59589874562a951181cc818780ae416e287b22a4 100644 (file)
@@ -2533,7 +2533,7 @@ static GtkWidget *build_extcap_options(const gchar *name, GHashTable *hash) {
 #if GTK_CHECK_VERSION(3, 0, 0)
       ret_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 3);
 #else
-      ret_box = gtk_vbox_new(FALSE, 3);
+      ret_box = ws_gtk_vbox_new(FALSE, 3);
 #endif
       widget_list = extcap_populate_gtk_vbox((GList *) elem->data, ret_box, hash);
       g_object_set_data(G_OBJECT(ret_box), EXTCAP_GTK_DATA_KEY_WIDGETLIST, widget_list);
index 6d7c068db9013966464ed445863ba7c2da19bac3..a1353c0c5de4598efa9d1bf84c309444010f4a86 100644 (file)
@@ -29,6 +29,7 @@
 #include <wsutil/filesystem.h>
 
 #include "extcap_gtk.h"
+#include "ui/gtk/old-gtk-compat.h"
 
 #include "log.h"
 
index 43c15d47decfde060bcc672e0dae3ba36908e417..5662ea0755255ae5fab9389408962d4a45e97438 100644 (file)
@@ -922,7 +922,7 @@ static void dialog_graph_draw(graph_analysis_data_t *user_data)
 #if GTK_CHECK_VERSION(2,22,0)
                cairo_set_source_surface (cr, user_data->dlg.surface_time, 0, 0);
 #else
-               gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_time, 0, 0);
+               ws_gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_time, 0, 0);
 #endif
                cairo_rectangle (cr, 0, 0, draw_area_time_alloc.width, draw_area_time_alloc.height);
                cairo_fill (cr);
@@ -935,7 +935,7 @@ static void dialog_graph_draw(graph_analysis_data_t *user_data)
 #if GTK_CHECK_VERSION(2,22,0)
                cairo_set_source_surface (cr, user_data->dlg.surface_main, 0, 0);
 #else
-               gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_main, 0, 0);
+               ws_gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_main, 0, 0);
 #endif
                cairo_rectangle (cr, 0, 0, draw_area_alloc.width, draw_area_alloc.height);
                cairo_fill (cr);
@@ -948,7 +948,7 @@ static void dialog_graph_draw(graph_analysis_data_t *user_data)
 #if GTK_CHECK_VERSION(2,22,0)
                cairo_set_source_surface (cr, user_data->dlg.surface_comments, 0, 0);
 #else
-               gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_comments, 0, 0);
+               ws_gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_comments, 0, 0);
 #endif
                cairo_rectangle (cr, 0, 0, draw_area_comments_alloc.width, draw_area_comments_alloc.height);
                cairo_fill (cr);
@@ -1044,7 +1044,7 @@ static gboolean draw_area_draw(GtkWidget *widget, cairo_t *cr, gpointer data)
 #if GTK_CHECK_VERSION(2,22,0)
        cairo_set_source_surface (cr, user_data->dlg.surface_main, 0, 0);
 #else
-       gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_main, 0, 0);
+       ws_gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_main, 0, 0);
 #endif
        cairo_rectangle (cr, 0, 0, allocation.width, allocation.height);
        cairo_fill (cr);
@@ -1066,7 +1066,7 @@ static gboolean expose_event(GtkWidget *widget, GdkEventExpose *event _U_, gpoin
 #if GTK_CHECK_VERSION(2,22,0)
                cairo_set_source_surface (cr, user_data->dlg.surface_main, 0, 0);
 #else
-               gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_main, 0, 0);
+               ws_gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_main, 0, 0);
 #endif
                cairo_rectangle (cr, 0, 0, allocation.width, allocation.height);
                cairo_fill (cr);
@@ -1175,7 +1175,7 @@ static gboolean draw_comments(GtkWidget *widget, cairo_t *cr, gpointer data)
 #if GTK_CHECK_VERSION(2,22,0)
        cairo_set_source_surface (cr, user_data->dlg.surface_comments, 0, 0);
 #else
-       gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_comments, 0, 0);
+       ws_gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_comments, 0, 0);
 #endif
        cairo_rectangle (cr, 0, 0, allocation.width, allocation.height);
        cairo_fill (cr);
@@ -1196,7 +1196,7 @@ static gboolean expose_event_comments(GtkWidget *widget, GdkEventExpose *event _
 #if GTK_CHECK_VERSION(2,22,0)
                cairo_set_source_surface (cr, user_data->dlg.surface_comments, 0, 0);
 #else
-               gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_comments, 0, 0);
+               ws_gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_comments, 0, 0);
 #endif
                cairo_rectangle (cr, 0, 0, allocation.width, allocation.height);
                cairo_fill (cr);
@@ -1248,7 +1248,7 @@ static gboolean expose_event_time(GtkWidget *widget, GdkEventExpose *event _U_,
 #if GTK_CHECK_VERSION(2,22,0)
                cairo_set_source_surface (cr, user_data->dlg.surface_time, 0, 0);
 #else
-               gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_time, 0, 0);
+               ws_gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_time, 0, 0);
 #endif
                cairo_rectangle (cr, 0, 0, allocation.width, allocation.height);
                cairo_fill (cr);
@@ -1440,7 +1440,7 @@ static gboolean pane_callback(GtkWidget *widget _U_, GParamSpec *pspec _U_, gpoi
 #if GTK_CHECK_VERSION(2,22,0)
                cairo_set_source_surface (cr, user_data->dlg.surface_comments, 0, 0);
 #else
-               gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_comments, 0, 0);
+               ws_gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_comments, 0, 0);
 #endif
                cairo_rectangle (cr, 0, 0, draw_area_comments_alloc.width, draw_area_comments_alloc.height);
                cairo_fill (cr);
@@ -1455,7 +1455,7 @@ static gboolean pane_callback(GtkWidget *widget _U_, GParamSpec *pspec _U_, gpoi
 #if GTK_CHECK_VERSION(2,22,0)
         cairo_set_source_surface (cr, user_data->dlg.surface_main, 0, 0);
 #else
-        gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_main, 0, 0);
+        ws_gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_main, 0, 0);
 #endif
         cairo_rectangle (cr, 0, 0, draw_area_alloc.width, draw_area_alloc.height);
         cairo_fill (cr);
index 2e4a4b6b2af3d7a9152b3731ffe8c8cc301f3be9..32ba5205d73f850ad261f781f4ef4c7d16c0b862 100644 (file)
@@ -383,7 +383,7 @@ window_get_geometry(GtkWidget         *widget,
     geom->width = gdk_window_get_width(widget_window);
     geom->height = gdk_window_get_height(widget_window);
 #else
-    gdk_drawable_get_size(widget_window,
+    ws_gdk_drawable_get_size(widget_window,
                           &geom->width,
                           &geom->height);
 #endif
@@ -1904,9 +1904,9 @@ ws_gtk_box_new(GtkOrientation orientation,
 {
 #if !GTK_CHECK_VERSION(3,0,0)
     if (orientation == GTK_ORIENTATION_HORIZONTAL)
-        return gtk_hbox_new(homogeneous, spacing);
+        return ws_gtk_hbox_new(homogeneous, spacing);
     else
-        return gtk_vbox_new(homogeneous, spacing);
+        return ws_gtk_vbox_new(homogeneous, spacing);
 #else
     GtkWidget *widget;
 
@@ -1922,7 +1922,7 @@ GtkWidget *
 gtk_button_box_new(GtkOrientation orientation)
 {
     if (orientation == GTK_ORIENTATION_HORIZONTAL) {
-        return gtk_hbutton_box_new();
+        return ws_gtk_hbutton_box_new();
     } else {
         return gtk_vbutton_box_new();
     }
index 604f721ba37d3721d5c665d25695df6df7a52a14..f8b45d1c75058a92b8a103d398b108b5e2189b9b 100644 (file)
@@ -1316,7 +1316,7 @@ dialog_graph_draw(user_data_t* user_data)
 #if GTK_CHECK_VERSION(2,22,0)
        cairo_set_source_surface (cr, user_data->dlg.dialog_graph.surface, 0, 0);
 #else
-       gdk_cairo_set_source_pixmap (cr, user_data->dlg.dialog_graph.pixmap, 0, 0);
+       ws_gdk_cairo_set_source_pixmap (cr, user_data->dlg.dialog_graph.pixmap, 0, 0);
 #endif
        cairo_rectangle (cr, 0, 0, user_data->dlg.dialog_graph.surface_width, user_data->dlg.dialog_graph.surface_height);
        cairo_fill (cr);
@@ -1390,7 +1390,7 @@ draw_area_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data)
 #if GTK_CHECK_VERSION(2,22,0)
        cairo_set_source_surface (cr, user_data->dlg.dialog_graph.surface, 0, 0);
 #else
-       gdk_cairo_set_source_pixmap (cr, user_data->dlg.dialog_graph.pixmap, 0, 0);
+       ws_gdk_cairo_set_source_pixmap (cr, user_data->dlg.dialog_graph.pixmap, 0, 0);
 #endif
        cairo_rectangle (cr, event->area.x, event->area.y, event->area.width, event->area.height);
        cairo_fill (cr);
index b077429d5692a574af873f64d8adfe8a8d6fc813..7f3f4eee7c99aad03a5d880b8fc9b4c0abc30aae 100644 (file)
@@ -1022,7 +1022,7 @@ io_stat_draw(io_stat_t *io)
 #if GTK_CHECK_VERSION(2,22,0)
     cairo_set_source_surface (cr, io->surface, 0, 0);
 #else
-    gdk_cairo_set_source_pixmap (cr, io->pixmap, 0, 0);
+    ws_gdk_cairo_set_source_pixmap (cr, io->pixmap, 0, 0);
 #endif
     cairo_rectangle (cr, 0, 0, io->surface_width, io->surface_height);
     cairo_fill (cr);
@@ -1453,7 +1453,7 @@ draw_area_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_d
 #if GTK_CHECK_VERSION(2,22,0)
     cairo_set_source_surface (cr, io->surface, 0, 0);
 #else
-    gdk_cairo_set_source_pixmap (cr, io->pixmap, 0, 0);
+    ws_gdk_cairo_set_source_pixmap (cr, io->pixmap, 0, 0);
 #endif
     cairo_rectangle (cr, event->area.x, event->area.y, event->area.width, event->area.height);
     cairo_fill (cr);
index 93f428303bc3de6f542913ba50b6281752b344a8..af06667076308cbf723976628a41235fe318fadf 100644 (file)
@@ -407,7 +407,7 @@ io_stat_draw(io_stat_t *io)
 #if GTK_CHECK_VERSION(2,22,0)
     cairo_set_source_surface(cr, io->surface, 0, 0);
 #else
-    gdk_cairo_set_source_pixmap(cr, io->pixmap, 0, 0);
+    ws_gdk_cairo_set_source_pixmap(cr, io->pixmap, 0, 0);
 #endif
     cairo_rectangle(cr, 0, 0, io->surface_width, io->surface_height);
     cairo_fill (cr);
@@ -519,7 +519,7 @@ draw_area_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_d
 #if GTK_CHECK_VERSION(2,22,0)
     cairo_set_source_surface (cr, io->surface, 0, 0);
 #else
-    gdk_cairo_set_source_pixmap (cr, io->pixmap, 0, 0);
+    ws_gdk_cairo_set_source_pixmap (cr, io->pixmap, 0, 0);
 #endif
     cairo_rectangle (cr, event->area.x, event->area.y, event->area.width, event->area.height);
     cairo_fill (cr);
index bc645d5754139385ed2b1eb4d7f99658a780208a..634a85933c429be73eede451ae6f4a8282d5f5d3 100644 (file)
 #endif
 
 #if !GTK_CHECK_VERSION (2, 22, 0)
+/* Make checkAPIs.pl happy by providing "Wireshark" macros for
+ * GTK APIs that have been deprecated
+ */
+#define ws_gdk_cairo_set_source_pixmap gdk_cairo_set_source_pixmap
 #endif
 
 #if !GTK_CHECK_VERSION (2, 24, 0)
 #      define gtk_combo_box_text_remove(x,y) gtk_combo_box_remove_text(x,y)
 #      define gtk_combo_box_text_new_with_entry() gtk_combo_box_entry_new_text()
 #      define gtk_combo_box_text_prepend_text(x,y) gtk_combo_box_prepend_text(x,y)
+/* Make checkAPIs.pl happy by providing "Wireshark" macros for
+ * GTK APIs that have been deprecated
+ */
+#define ws_gdk_drawable_get_size gdk_drawable_get_size
 #endif
 
 #if !GTK_CHECK_VERSION (3, 0, 0)
 #      else
 #              define gtk_tree_view_column_get_button(x) x->button
 #      endif
+
+/* Make checkAPIs.pl happy by providing "Wireshark" macros for
+ * GTK APIs that have been deprecated
+ */
+#define ws_gtk_hbox_new gtk_hbox_new
+#define ws_gtk_vbox_new gtk_vbox_new
+#define ws_gtk_hbutton_box_new gtk_hbutton_box_new
 #endif
 
 #endif
index b3590c91e3008b8dfa866a7d248f8e3f9dd86974..0fc380894d4de079b28658d0e6be5b6401ec9586 100644 (file)
@@ -784,7 +784,7 @@ static void graph_title_pixmap_display(struct gtk_rlc_graph *g)
 #if GTK_CHECK_VERSION(2,22,0)
     cairo_set_source_surface(cr, g->title_surface, g->wp.x, 0);
 #else
-    gdk_cairo_set_source_pixmap(cr, g->title_pixmap, g->wp.x, 0);
+    ws_gdk_cairo_set_source_pixmap(cr, g->title_pixmap, g->wp.x, 0);
 #endif
     cairo_rectangle(cr, g->wp.x, 0, g->x_axis->p.width, g->wp.y);
     cairo_fill(cr);
@@ -849,7 +849,7 @@ static void graph_pixmap_display(struct gtk_rlc_graph *g)
 #if GTK_CHECK_VERSION(2,22,0)
     cairo_set_source_surface(cr, g->surface[g->displayed], g->wp.x, g->wp.y);
 #else
-    gdk_cairo_set_source_pixmap(cr, g->pixmap[g->displayed], g->wp.x, g->wp.y);
+    ws_gdk_cairo_set_source_pixmap(cr, g->pixmap[g->displayed], g->wp.x, g->wp.y);
 #endif /* GTK_CHECK_VERSION(2,22,0) */
     cairo_rectangle(cr, g->wp.x, g->wp.y, g->wp.width, g->wp.height);
     cairo_fill(cr);
@@ -1287,7 +1287,7 @@ static void axis_pixmap_display(struct axis *axis)
 #if GTK_CHECK_VERSION(2,22,0)
     cairo_set_source_surface(cr, axis->surface[axis->displayed], axis->p.x, axis->p.y);
 #else
-    gdk_cairo_set_source_pixmap(cr, axis->pixmap[axis->displayed], axis->p.x, axis->p.y);
+    ws_gdk_cairo_set_source_pixmap(cr, axis->pixmap[axis->displayed], axis->p.x, axis->p.y);
 #endif
     cairo_rectangle(cr, axis->p.x, axis->p.y, axis->p.width, axis->p.height);
     cairo_fill(cr);
index daaa6d38e88d7fe8d0f420dddf805bbffdf6abda..239f8569da50051bc457cc99e1e1e6a113a4661a 100644 (file)
@@ -1461,7 +1461,7 @@ dialog_graph_draw(user_data_t* user_data)
 #if GTK_CHECK_VERSION(2,22,0)
        cairo_set_source_surface (cr, user_data->dlg.dialog_graph.surface, 0, 0);
 #else
-       gdk_cairo_set_source_pixmap (cr, user_data->dlg.dialog_graph.pixmap, 0, 0);
+       ws_gdk_cairo_set_source_pixmap (cr, user_data->dlg.dialog_graph.pixmap, 0, 0);
 #endif
        cairo_rectangle (cr, 0, 0,
                         user_data->dlg.dialog_graph.surface_width,
@@ -1538,7 +1538,7 @@ expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data)
 #if GTK_CHECK_VERSION(2,22,0)
        cairo_set_source_surface (cr, user_data->dlg.dialog_graph.surface, 0, 0);
 #else
-       gdk_cairo_set_source_pixmap (cr, user_data->dlg.dialog_graph.pixmap, 0, 0);
+       ws_gdk_cairo_set_source_pixmap (cr, user_data->dlg.dialog_graph.pixmap, 0, 0);
 #endif
        cairo_rectangle (cr, event->area.x, event->area.y, event->area.width, event->area.height);
        cairo_fill (cr);
index 178e9f8a3595e24bf641a46fad9d2e33cde3bdbc..7d051093ad4819c06b4f33c8f0d28c32e5ef81fc 100644 (file)
@@ -864,7 +864,7 @@ draw_channel_cursor(rtp_channel_info_t *rci, guint32 start_index)
 #if GTK_CHECK_VERSION(2,22,0)
                cairo_set_source_surface (cr, rci->surface, idx/MULT, 0);
 #else
-               gdk_cairo_set_source_pixmap (cr, rci->pixmap,idx/MULT, 0);
+               ws_gdk_cairo_set_source_pixmap (cr, rci->pixmap,idx/MULT, 0);
 #endif
                cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT);
                cairo_rectangle (cr, rci->cursor_prev/MULT, 0, 1, widget_alloc.height-HEIGHT_TIME_LABEL);
@@ -896,7 +896,7 @@ draw_channel_cursor(rtp_channel_info_t *rci, guint32 start_index)
 #if GTK_CHECK_VERSION(2,22,0)
                        cairo_set_source_surface (cr, rci->surface, idx/MULT, 0);
 #else
-                       gdk_cairo_set_source_pixmap (cr, rci->pixmap, idx/MULT, 0);
+                       ws_gdk_cairo_set_source_pixmap (cr, rci->pixmap, idx/MULT, 0);
 #endif
                        cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT);
                        cairo_rectangle (cr, idx/MULT, 0, 1, widget_alloc.height-HEIGHT_TIME_LABEL);
@@ -1508,7 +1508,7 @@ static gboolean expose_event_channels(GtkWidget *widget, GdkEventExpose *event,
 #if GTK_CHECK_VERSION(2,22,0)
                cairo_set_source_surface (cr, rci->surface, 0, 0);
 #else
-               gdk_cairo_set_source_pixmap (cr, rci->pixmap, event->area.x, event->area.y);
+               ws_gdk_cairo_set_source_pixmap (cr, rci->pixmap, event->area.x, event->area.y);
 #endif
                cairo_rectangle (cr, event->area.x,event->area.y, event->area.width, event->area.height);
                cairo_fill (cr);
index c55c1f14a45487aa430c3dadf164ebd9254417ab..3deb23b5a6299b305c823268f86a407b28ad2022 100644 (file)
@@ -37,6 +37,7 @@
 #include "ui/gtk/sctp_stat_gtk.h"
 
 #include "ui/gtk/stock_icons.h"
+#include "ui/gtk/old-gtk-compat.h"
 
 #define DEFAULT_PIXELS_PER_TICK 2
 #define MAX_PIXELS_PER_TICK     4
@@ -700,7 +701,7 @@ static void sctp_graph_redraw(struct sctp_udata *u_data)
 #if GTK_CHECK_VERSION(2,22,0)
        cairo_set_source_surface (cr, ios->surface, 0, 0);
 #else
-       gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
+       ws_gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
 #endif
        gtk_widget_get_allocation(u_data->io->draw_area, &widget_alloc);
        cairo_rectangle (cr, 0, 0, widget_alloc.width, widget_alloc.height);
@@ -815,7 +816,7 @@ on_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
 #if GTK_CHECK_VERSION(2,22,0)
        cairo_set_source_surface (cr, ios->surface, 0, 0);
 #else
-       gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
+       ws_gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
 #endif
        cairo_rectangle (cr, event->area.x, event->area.y, event->area.width, event->area.height);
        cairo_fill (cr);
@@ -979,7 +980,7 @@ on_button_press_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer us
 #if GTK_CHECK_VERSION(2,22,0)
                cairo_set_source_surface (cr, ios->surface, 0, 0);
 #else
-               gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
+               ws_gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
 #endif
                cairo_rectangle (cr, 0, 0, abs((int)(u_data->io->x_new-u_data->io->x_old)), abs((int)(u_data->io->y_new-u_data->io->y_old)));
                cairo_fill (cr);
@@ -1056,7 +1057,7 @@ on_button_release_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer
 #if GTK_CHECK_VERSION(2,22,0)
                cairo_set_source_surface (cr, ios->surface, 0, 0);
 #else
-               gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
+               ws_gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
 #endif
                gtk_widget_get_allocation(u_data->io->draw_area, &widget_alloc);
                cairo_rectangle (cr, 0, 0, widget_alloc.width, widget_alloc.height);
@@ -1221,7 +1222,7 @@ on_button_release_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer
 #if GTK_CHECK_VERSION(2,22,0)
                        cairo_set_source_surface (cr, ios->surface, 0, 0);
 #else
-                       gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
+                       ws_gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
 #endif
                        gtk_widget_get_allocation(u_data->io->draw_area, &widget_alloc);
                        cairo_rectangle (cr, 0, 0, widget_alloc.width, widget_alloc.height);
index b0ddcc5dfcafd28dc721088bf580657af048ddbb..cc3b2cc0138fd2a050f56aaf08f08be6115c92e4 100644 (file)
@@ -37,6 +37,7 @@
 #include "ui/gtk/sctp_stat_gtk.h"
 #include "ui/gtk/gui_utils.h"
 #include "ui/gtk/stock_icons.h"
+#include "ui/gtk/old-gtk-compat.h"
 
 #define DEFAULT_PIXELS_PER_TICK 2
 #define MAX_PIXELS_PER_TICK     4
@@ -1088,7 +1089,7 @@ sctp_graph_redraw(struct sctp_udata *u_data)
 #if GTK_CHECK_VERSION(2,22,0)
        cairo_set_source_surface (cr, ios->surface, 0, 0);
 #else
-       gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
+       ws_gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
 #endif
        gtk_widget_get_allocation(u_data->io->draw_area, &widget_alloc);
        cairo_rectangle (cr, 0, 0, widget_alloc.width, widget_alloc.height);
@@ -1211,7 +1212,7 @@ expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
 #if GTK_CHECK_VERSION(2,22,0)
        cairo_set_source_surface (cr, ios->surface, 0, 0);
 #else
-       gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
+       ws_gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
 #endif
        cairo_rectangle (cr, event->area.x, event->area.y, event->area.width, event->area.height);
        cairo_fill (cr);
@@ -1378,7 +1379,7 @@ on_button_press_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer us
 #if GTK_CHECK_VERSION(2,22,0)
                cairo_set_source_surface (cr, ios->surface, 0, 0);
 #else
-               gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
+               ws_gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
 #endif
                cairo_rectangle (cr, 0, 0, abs((int)(u_data->io->x_new-u_data->io->x_old)), abs((int)(u_data->io->y_new-u_data->io->y_old)));
                cairo_fill (cr);
@@ -1454,7 +1455,7 @@ on_button_release_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer
 #if GTK_CHECK_VERSION(2,22,0)
                cairo_set_source_surface (cr, ios->surface, 0, 0);
 #else
-               gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
+               ws_gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
 #endif
                gtk_widget_get_allocation(u_data->io->draw_area, &widget_alloc);
                cairo_rectangle (cr, 0, 0, widget_alloc.width, widget_alloc.height);
@@ -1647,7 +1648,7 @@ on_button_release_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer
 #if GTK_CHECK_VERSION(2,22,0)
                        cairo_set_source_surface (cr, ios->surface, 0, 0);
 #else
-                       gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
+                       ws_gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0);
 #endif
                        gtk_widget_get_allocation(u_data->io->draw_area, &widget_alloc);
                        cairo_rectangle (cr, 0, 0, widget_alloc.width, widget_alloc.height);
index 66e4ff04124211bf415139f14da477719b1dac42..5dec59664595be9a3d952afd3fec02340de90529 100644 (file)
@@ -1862,7 +1862,7 @@ static void graph_title_pixmap_display(struct gtk_graph *g)
 #if GTK_CHECK_VERSION(2,22,0)
     cairo_set_source_surface(cr, g->title_surface, g->wp.x, 0);
 #else
-    gdk_cairo_set_source_pixmap(cr, g->title_pixmap, g->wp.x, 0);
+    ws_gdk_cairo_set_source_pixmap(cr, g->title_pixmap, g->wp.x, 0);
 #endif
     cairo_rectangle(cr, g->wp.x, 0, g->x_axis->p.width, g->wp.y);
     cairo_fill(cr);
@@ -1926,7 +1926,7 @@ static void graph_pixmap_display(struct gtk_graph *g)
 #if GTK_CHECK_VERSION(2,22,0)
     cairo_set_source_surface(cr, g->surface[g->displayed], g->wp.x, g->wp.y);
 #else
-    gdk_cairo_set_source_pixmap(cr, g->pixmap[g->displayed], g->wp.x, g->wp.y);
+    ws_gdk_cairo_set_source_pixmap(cr, g->pixmap[g->displayed], g->wp.x, g->wp.y);
 #endif /* GTK_CHECK_VERSION(2,22,0) */
     cairo_rectangle(cr, g->wp.x, g->wp.y, g->wp.width, g->wp.height);
     cairo_fill(cr);
@@ -2344,7 +2344,7 @@ static void axis_pixmap_display(struct axis *axis)
 #if GTK_CHECK_VERSION(2,22,0)
     cairo_set_source_surface(cr, axis->surface[axis->displayed], axis->p.x, axis->p.y);
 #else
-    gdk_cairo_set_source_pixmap(cr, axis->pixmap[axis->displayed], axis->p.x, axis->p.y);
+    ws_gdk_cairo_set_source_pixmap(cr, axis->pixmap[axis->displayed], axis->p.x, axis->p.y);
 #endif
     cairo_rectangle(cr, axis->p.x, axis->p.y, axis->p.width, axis->p.height);
     cairo_fill(cr);