From: Christian Dywan Date: Fri, 29 Jan 2010 21:44:34 +0000 (+0100) Subject: Use gtk_widget_is_toplevel if available instead of the macro X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a0573e2f3350d0fb817b6c09fe954623b802892;p=midori Use gtk_widget_is_toplevel if available instead of the macro --- diff --git a/midori/midori-view.c b/midori/midori-view.c index 071cf9d8..2b3635ab 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -2901,7 +2901,7 @@ midori_view_web_inspector_construct_window (gpointer inspector, g_free (title); toplevel = gtk_widget_get_toplevel (GTK_WIDGET (view)); - if (GTK_WIDGET_TOPLEVEL (toplevel)) + if (gtk_widget_is_toplevel (toplevel)) { screen = gtk_window_get_screen (GTK_WINDOW (toplevel)); width = gdk_screen_get_width (screen) / 1.7; @@ -4391,7 +4391,7 @@ midori_view_print (MidoriView* view) { GtkWidget* window = gtk_widget_get_toplevel (GTK_WIDGET (view)); GtkWidget* dialog = gtk_message_dialog_new ( - GTK_WIDGET_TOPLEVEL (window) ? GTK_WINDOW (window) : NULL, + gtk_widget_is_toplevel (window) ? GTK_WINDOW (window) : NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", error->message); g_error_free (error); diff --git a/midori/sokoke.h b/midori/sokoke.h index a164230d..6435f6f7 100644 --- a/midori/sokoke.h +++ b/midori/sokoke.h @@ -30,7 +30,8 @@ #endif #if !GTK_CHECK_VERSION (2, 18, 0) -#define gtk_widget_has_focus(widget) GTK_WIDGET_HAS_FOCUS (widget) + #define gtk_widget_is_toplevel(widget) GTK_WIDGET_TOPLEVEL (widget) + #define gtk_widget_has_focus(widget) GTK_WIDGET_HAS_FOCUS (widget) #endif #if !GTK_CHECK_VERSION(2, 12, 0)