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>
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)
#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);
#include <wsutil/filesystem.h>
#include "extcap_gtk.h"
+#include "ui/gtk/old-gtk-compat.h"
#include "log.h"
#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);
#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);
#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);
#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);
#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);
#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);
#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);
#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);
#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);
#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);
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
{
#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;
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();
}
#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);
#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);
#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);
#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);
#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);
#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);
#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
#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);
#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);
#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);
#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,
#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);
#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);
#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);
#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);
#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
#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);
#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);
#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);
#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);
#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);
#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
#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);
#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);
#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);
#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);
#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);
#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);
#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);
#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);