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>
This commit is contained in:
parent
688d055acd
commit
ee7f9c33f6
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <wsutil/filesystem.h>
|
||||
|
||||
#include "extcap_gtk.h"
|
||||
#include "ui/gtk/old-gtk-compat.h"
|
||||
|
||||
#include "log.h"
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue