[Xfce4-commits] <midori:master> Use gtk_widget_is_toplevel if available instead of the macro
Christian Dywan
noreply at xfce.org
Sat Jan 30 01:58:02 CET 2010
Updating branch refs/heads/master
to 1a0573e2f3350d0fb817b6c09fe954623b802892 (commit)
from cc6bb8fddb6ad5447f07953fc58d9dc74851511c (commit)
commit 1a0573e2f3350d0fb817b6c09fe954623b802892
Author: Christian Dywan <christian at twotoasts.de>
Date: Fri Jan 29 22:44:34 2010 +0100
Use gtk_widget_is_toplevel if available instead of the macro
midori/midori-view.c | 4 ++--
midori/sokoke.h | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 071cf9d..2b3635a 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 a164230..6435f6f 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)
More information about the Xfce4-commits
mailing list