[gnome-control-center] Reinstate popup arrows



commit 24b5fb73c193328e500de7e9b9053e9b20ce8693
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Nov 15 14:59:31 2010 -0500

    Reinstate popup arrows

 panels/user-accounts/um-password-dialog.c |    9 +++------
 panels/user-accounts/um-photo-dialog.c    |   13 +++++--------
 2 files changed, 8 insertions(+), 14 deletions(-)
---
diff --git a/panels/user-accounts/um-password-dialog.c b/panels/user-accounts/um-password-dialog.c
index bd6ad8c..1e4aaa6 100644
--- a/panels/user-accounts/um-password-dialog.c
+++ b/panels/user-accounts/um-password-dialog.c
@@ -81,19 +81,16 @@ generate_draw (GtkWidget        *widget,
                cairo_t          *cr,
                UmPasswordDialog *um)
 {
-        GtkAllocation allocation;
-
         if (!gtk_widget_is_sensitive (widget))
                 return;
 
-        gtk_widget_get_allocation (widget, &allocation);
         gtk_paint_expander (gtk_widget_get_style (widget),
                             cr,
                             gtk_widget_get_state (widget),
                             widget,
                             NULL,
-                            allocation.x + allocation.width,
-                            allocation.y + allocation.height,
+                            gtk_widget_get_allocated_width (widget) - 12,
+                            gtk_widget_get_allocated_height (widget) - 12,
                             GTK_EXPANDER_EXPANDED);
 }
 
@@ -708,7 +705,7 @@ um_password_dialog_new (void)
                           G_CALLBACK (generate_state_changed), um);
 #endif
         um->generate_button = widget;
-        g_signal_connect_after (gtk_bin_get_child (GTK_BIN (widget)), "draw",
+        g_signal_connect_after (widget, "draw",
                                 G_CALLBACK (generate_draw), um);
 
         um->normal_hint_entry = (GtkWidget *) gtk_builder_get_object (builder, "normal-hint-entry");
diff --git a/panels/user-accounts/um-photo-dialog.c b/panels/user-accounts/um-photo-dialog.c
index 06a91e2..18819f4 100644
--- a/panels/user-accounts/um-photo-dialog.c
+++ b/panels/user-accounts/um-photo-dialog.c
@@ -501,21 +501,18 @@ popup_button_draw (GtkWidget      *widget,
                    cairo_t        *cr,
                    UmPhotoDialog  *um)
 {
-        GtkAllocation allocation;
-
-        if (gtk_widget_get_state (widget) != GTK_STATE_PRELIGHT &&
-            !gtk_widget_is_focus (gtk_widget_get_parent (widget))) {
+        if (gtk_widget_get_state (gtk_bin_get_child (GTK_BIN (widget))) != GTK_STATE_PRELIGHT &&
+            !gtk_widget_is_focus (widget)) {
                 return;
         }
 
-        gtk_widget_get_allocation (widget, &allocation);
         gtk_paint_expander (gtk_widget_get_style (widget),
                             cr,
                             gtk_widget_get_state (widget),
                             widget,
                             NULL,
-                            allocation.x + allocation.width,
-                            allocation.y + allocation.height,
+                            gtk_widget_get_allocated_width (widget) - 12,
+                            gtk_widget_get_allocated_height (widget) - 12,
                             GTK_EXPANDER_EXPANDED);
 }
 
@@ -545,7 +542,7 @@ um_photo_dialog_new (GtkWidget *button)
                           G_CALLBACK (on_popup_button_button_pressed), um);
         g_signal_connect (button, "notify::is-focus",
                           G_CALLBACK (popup_button_focus_changed), um);
-        g_signal_connect_after (gtk_bin_get_child (GTK_BIN (button)), "draw",
+        g_signal_connect_after (button, "draw",
                                 G_CALLBACK (popup_button_draw), um);
 
         g_signal_connect (um->photo_popup, "unmap",



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]