]> spindle.queued.net Git - midori/commitdiff
Use gtk_widget_is_toplevel if available instead of the macro
authorChristian Dywan <christian@twotoasts.de>
Fri, 29 Jan 2010 21:44:34 +0000 (22:44 +0100)
committerChristian Dywan <christian@twotoasts.de>
Fri, 29 Jan 2010 21:54:42 +0000 (22:54 +0100)
midori/midori-view.c
midori/sokoke.h

index 071cf9d8fc8233ee2d0cc9b9e9a77b56093b9aa9..2b3635abfe790756e42e2b6d8e14852931ba71f5 100644 (file)
@@ -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);
index a164230ddf11af3b7d29d13441d96348980220b0..6435f6f7b403fc1563370f2d594217758e2b0714 100644 (file)
@@ -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)