From 39209643d05fb2f54cbdbe7d301b2d8369d0c4b5 Mon Sep 17 00:00:00 2001 From: Rob Kendrick Date: Tue, 13 Apr 2010 17:13:52 +0000 Subject: Add gtk_compat.c, which provides implementations of newer GTK functions that we require. This is needed because some macros we were using have been deprecated and replaced with functions, and we build without deprecated features due to it spewing warnings everywhere. svn path=/trunk/netsurf/; revision=10392 --- gtk/sexy_icon_entry.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'gtk/sexy_icon_entry.c') diff --git a/gtk/sexy_icon_entry.c b/gtk/sexy_icon_entry.c index 1dce22e31..adf4abc2c 100644 --- a/gtk/sexy_icon_entry.c +++ b/gtk/sexy_icon_entry.c @@ -26,6 +26,7 @@ #include "gtk/sexy_icon_entry.h" #include #include +#include "gtk/gtk_compat.h" #define ICON_MARGIN 2 #define MAX_ICONS 2 @@ -209,7 +210,7 @@ sexy_icon_entry_destroy(GtkObject *obj) static void sexy_icon_entry_map(GtkWidget *widget) { - if (GTK_WIDGET_REALIZED(widget) && !GTK_WIDGET_MAPPED(widget)) + if (nsgtk_widget_get_realized(widget) && !nsgtk_widget_get_mapped(widget)) { SexyIconEntry *entry = SEXY_ICON_ENTRY(widget); int i; @@ -227,7 +228,7 @@ sexy_icon_entry_map(GtkWidget *widget) static void sexy_icon_entry_unmap(GtkWidget *widget) { - if (GTK_WIDGET_MAPPED(widget)) + if (nsgtk_widget_get_mapped(widget)) { SexyIconEntry *entry = SEXY_ICON_ENTRY(widget); int i; @@ -374,7 +375,7 @@ sexy_icon_entry_realize(GtkWidget *widget) gdk_window_set_user_data(icon_info->window, widget); gdk_window_set_background(icon_info->window, - &widget->style->base[GTK_WIDGET_STATE(widget)]); + &widget->style->base[nsgtk_widget_get_state(widget)]); } gtk_widget_queue_resize(widget); @@ -471,7 +472,7 @@ sexy_icon_entry_size_allocate(GtkWidget *widget, GtkAllocation *allocation) GTK_WIDGET_CLASS(parent_class)->size_allocate(widget, allocation); - if (GTK_WIDGET_REALIZED(widget)) + if (nsgtk_widget_get_realized(widget)) place_windows(SEXY_ICON_ENTRY(widget), allocation); } @@ -558,7 +559,7 @@ draw_icon(GtkWidget *widget, SexyIconEntryPosition icon_pos) GdkPixbuf *pixbuf; gint x, y, width, height; - if (icon_info->icon == NULL || !GTK_WIDGET_REALIZED(widget)) + if (icon_info->icon == NULL || !nsgtk_widget_get_realized(widget)) return; if ((pixbuf = get_pixbuf_from_icon(entry, icon_pos)) == NULL) @@ -622,7 +623,7 @@ sexy_icon_entry_expose(GtkWidget *widget, GdkEventExpose *event) entry = SEXY_ICON_ENTRY(widget); - if (GTK_WIDGET_DRAWABLE(widget)) + if (nsgtk_widget_is_drawable(widget)) { gboolean found = FALSE; int i; @@ -640,7 +641,7 @@ sexy_icon_entry_expose(GtkWidget *widget, GdkEventExpose *event) gdk_drawable_get_size(icon_info->window, &width, NULL); gtk_paint_flat_box(widget->style, icon_info->window, - GTK_WIDGET_STATE(widget), GTK_SHADOW_NONE, + nsgtk_widget_get_state(widget), GTK_SHADOW_NONE, NULL, widget, "entry_bg", 0, 0, width, text_area_alloc.height); -- cgit v1.2.3