[Xfce4-commits] <midori:master> Use new GTK+ 3 API to align coords of throbber

Christian Dywan noreply at xfce.org
Wed Dec 14 02:24:01 CET 2011


Updating branch refs/heads/master
         to 4af93301e31bd402433a80e6007744932726d381 (commit)
       from 9a45f8976ea817cf35c2cd0bdb72ef2a53fdbe44 (commit)

commit 4af93301e31bd402433a80e6007744932726d381
Author: Christian Dywan <christian at twotoasts.de>
Date:   Wed Dec 14 02:14:54 2011 +0100

    Use new GTK+ 3 API to align coords of throbber
    
    Once again existing API is no longer reliable.

 katze/katze-throbber.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/katze/katze-throbber.c b/katze/katze-throbber.c
index 0ffc74a..d8c71b9 100644
--- a/katze/katze-throbber.c
+++ b/katze/katze-throbber.c
@@ -901,8 +901,14 @@ katze_throbber_aligned_coords (GtkWidget* widget,
     gtk_misc_get_padding (GTK_MISC (widget), &xpad, &ypad);
     #endif
 
+    #if GTK_CHECK_VERSION (3, 0, 0)
+    allocation.width = gtk_widget_get_allocated_width (widget);
+    allocation.height = gtk_widget_get_allocated_height (widget);
+    gtk_widget_get_preferred_size (widget, &requisition, NULL);
+    #else
     gtk_widget_get_allocation (widget, &allocation);
     gtk_widget_size_request (widget, &requisition);
+    #endif
     *ax = floor (allocation.x + xpad
         + ((allocation.width - requisition.width) * xalign));
     *ay = floor (allocation.y + ypad


More information about the Xfce4-commits mailing list