[gnome-control-center] Update to GTK+ api changes



commit bd7cd034a4955e639781019a9c883dfe3a1da061
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Nov 15 14:01:24 2010 -0500

    Update to GTK+ api changes
    
    Implement get_preferred_width/height instead of size_request.
    Also, don't pretend that we have a changed signal when we don't.

 panels/user-accounts/um-lockbutton.c |   30 ++++++++++++++++--------------
 panels/user-accounts/um-lockbutton.h |    2 --
 2 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/panels/user-accounts/um-lockbutton.c b/panels/user-accounts/um-lockbutton.c
index 82ccc34..74f770b 100644
--- a/panels/user-accounts/um-lockbutton.c
+++ b/panels/user-accounts/um-lockbutton.c
@@ -286,12 +286,23 @@ um_lock_button_constructed (GObject *object)
 }
 
 static void
-um_lock_button_size_request (GtkWidget      *widget,
-                             GtkRequisition *requisition)
+um_lock_button_get_preferred_width (GtkWidget *widget,
+                                    gint      *minimum,
+                                    gint      *natural)
 {
   UmLockButtonPrivate *priv = UM_LOCK_BUTTON (widget)->priv;
 
-  gtk_widget_get_preferred_size (priv->box, requisition, NULL);
+  gtk_widget_get_preferred_width (priv->box, minimum, natural);
+}
+
+static void
+um_lock_button_get_preferred_height (GtkWidget *widget,
+                                     gint      *minimum,
+                                     gint      *natural)
+{
+  UmLockButtonPrivate *priv = UM_LOCK_BUTTON (widget)->priv;
+
+  gtk_widget_get_preferred_height (priv->box, minimum, natural);
 }
 
 static void
@@ -322,7 +333,8 @@ um_lock_button_class_init (UmLockButtonClass *klass)
   gobject_class->set_property = um_lock_button_set_property;
   gobject_class->constructed  = um_lock_button_constructed;
 
-  widget_class->size_request = um_lock_button_size_request;
+  widget_class->get_preferred_width = um_lock_button_get_preferred_width;
+  widget_class->get_preferred_height = um_lock_button_get_preferred_height;
   widget_class->size_allocate = um_lock_button_size_allocate;
 
   g_type_class_add_private (klass, sizeof (UmLockButtonPrivate));
@@ -389,16 +401,6 @@ um_lock_button_class_init (UmLockButtonClass *klass)
                          G_PARAM_READWRITE |
                          G_PARAM_CONSTRUCT |
                          G_PARAM_STATIC_STRINGS));
-
-  signals[CHANGED_SIGNAL] = g_signal_new ("changed",
-                                          G_TYPE_FROM_CLASS (klass),
-                                          G_SIGNAL_RUN_LAST,
-                                          G_STRUCT_OFFSET (UmLockButtonClass, changed),
-                                          NULL,
-                                          NULL,
-                                          g_cclosure_marshal_VOID__VOID,
-                                          G_TYPE_NONE,
-                                          0);
 }
 
 /**
diff --git a/panels/user-accounts/um-lockbutton.h b/panels/user-accounts/um-lockbutton.h
index 6becfbc..3b5c6e9 100644
--- a/panels/user-accounts/um-lockbutton.h
+++ b/panels/user-accounts/um-lockbutton.h
@@ -48,8 +48,6 @@ struct _UmLockButtonClass
 {
   GtkBinClass parent_class;
 
-  void (*changed) (UmLockButton *button);
-
   void (*reserved0) (void);
   void (*reserved1) (void);
   void (*reserved2) (void);



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