aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-07-24 14:16:19 -0400
committerMichael Mann <mmann78@netscape.net>2016-07-24 20:03:29 +0000
commitee7f9c33f63532bc69899a0750177756be53c0c1 (patch)
tree54f64291385d28b8f013f2c869bd1aa1d2923bf1 /ui/gtk
parent688d055acd523e645c1e87267dcf4a0a9867adbd (diff)
Pacify GTK checkAPIs.pl warnings.
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>
Diffstat (limited to 'ui/gtk')
-rw-r--r--ui/gtk/bytes_view.c2
-rw-r--r--ui/gtk/capture_dlg.c2
-rw-r--r--ui/gtk/extcap_gtk.c1
-rw-r--r--ui/gtk/graph_analysis.c20
-rw-r--r--ui/gtk/gui_utils.c8
-rw-r--r--ui/gtk/iax2_analysis.c4
-rw-r--r--ui/gtk/io_stat.c4
-rw-r--r--ui/gtk/memory_dlg.c4
-rw-r--r--ui/gtk/old-gtk-compat.h15
-rw-r--r--ui/gtk/rlc_lte_graph.c6
-rw-r--r--ui/gtk/rtp_analysis.c4
-rw-r--r--ui/gtk/rtp_player.c6
-rw-r--r--ui/gtk/sctp_byte_graph_dlg.c11
-rw-r--r--ui/gtk/sctp_graph_dlg.c11
-rw-r--r--ui/gtk/tcp_graph.c6
15 files changed, 61 insertions, 43 deletions
diff --git a/ui/gtk/bytes_view.c b/ui/gtk/bytes_view.c
index 911c771838..6847fdea8d 100644
--- a/ui/gtk/bytes_view.c
+++ b/ui/gtk/bytes_view.c
@@ -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)
diff --git a/ui/gtk/capture_dlg.c b/ui/gtk/capture_dlg.c
index 175e6854d7..5958987456 100644
--- a/ui/gtk/capture_dlg.c
+++ b/ui/gtk/capture_dlg.c
@@ -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);
diff --git a/ui/gtk/extcap_gtk.c b/ui/gtk/extcap_gtk.c
index 6d7c068db9..a1353c0c5d 100644
--- a/ui/gtk/extcap_gtk.c
+++ b/ui/gtk/extcap_gtk.c
@@ -29,6 +29,7 @@
#include <wsutil/filesystem.h>
#include "extcap_gtk.h"
+#include "ui/gtk/old-gtk-compat.h"
#include "log.h"
diff --git a/ui/gtk/graph_analysis.c b/ui/gtk/graph_analysis.c
index 43c15d47de..5662ea0755 100644
--- a/ui/gtk/graph_analysis.c
+++ b/ui/gtk/graph_analysis.c
@@ -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);
diff --git a/ui/gtk/gui_utils.c b/ui/gtk/gui_utils.c
index 2e4a4b6b2a..32ba5205d7 100644
--- a/ui/gtk/gui_utils.c
+++ b/ui/gtk/gui_utils.c
@@ -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();
}
diff --git a/ui/gtk/iax2_analysis.c b/ui/gtk/iax2_analysis.c
index 604f721ba3..f8b45d1c75 100644
--- a/ui/gtk/iax2_analysis.c
+++ b/ui/gtk/iax2_analysis.c
@@ -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);
diff --git a/ui/gtk/io_stat.c b/ui/gtk/io_stat.c
index b077429d56..7f3f4eee7c 100644
--- a/ui/gtk/io_stat.c
+++ b/ui/gtk/io_stat.c
@@ -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);
diff --git a/ui/gtk/memory_dlg.c b/ui/gtk/memory_dlg.c
index 93f428303b..af06667076 100644
--- a/ui/gtk/memory_dlg.c
+++ b/ui/gtk/memory_dlg.c
@@ -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);
diff --git a/ui/gtk/old-gtk-compat.h b/ui/gtk/old-gtk-compat.h
index bc645d5754..634a85933c 100644
--- a/ui/gtk/old-gtk-compat.h
+++ b/ui/gtk/old-gtk-compat.h
@@ -68,6 +68,10 @@
#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)
@@ -79,6 +83,10 @@
# 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)
@@ -100,6 +108,13 @@
# 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
diff --git a/ui/gtk/rlc_lte_graph.c b/ui/gtk/rlc_lte_graph.c
index b3590c91e3..0fc380894d 100644
--- a/ui/gtk/rlc_lte_graph.c
+++ b/ui/gtk/rlc_lte_graph.c
@@ -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);
diff --git a/ui/gtk/rtp_analysis.c b/ui/gtk/rtp_analysis.c
index daaa6d38e8..239f8569da 100644
--- a/ui/gtk/rtp_analysis.c
+++ b/ui/gtk/rtp_analysis.c
@@ -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);
diff --git a/ui/gtk/rtp_player.c b/ui/gtk/rtp_player.c
index 178e9f8a35..7d051093ad 100644
--- a/ui/gtk/rtp_player.c
+++ b/ui/gtk/rtp_player.c
@@ -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);
diff --git a/ui/gtk/sctp_byte_graph_dlg.c b/ui/gtk/sctp_byte_graph_dlg.c
index c55c1f14a4..3deb23b5a6 100644
--- a/ui/gtk/sctp_byte_graph_dlg.c
+++ b/ui/gtk/sctp_byte_graph_dlg.c
@@ -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);
diff --git a/ui/gtk/sctp_graph_dlg.c b/ui/gtk/sctp_graph_dlg.c
index b0ddcc5dfc..cc3b2cc013 100644
--- a/ui/gtk/sctp_graph_dlg.c
+++ b/ui/gtk/sctp_graph_dlg.c
@@ -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);
diff --git a/ui/gtk/tcp_graph.c b/ui/gtk/tcp_graph.c
index 66e4ff0412..5dec596645 100644
--- a/ui/gtk/tcp_graph.c
+++ b/ui/gtk/tcp_graph.c
@@ -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);