[gnome-contacts] Make GtkNotification a grid instead of a box



commit 9cb77dc3fa472b46f4e238cc2a546d16f7198c95
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Dec 20 14:19:47 2011 +0100

    Make GtkNotification a grid instead of a box
    
    Grid is the more modern widget, even though it doesn't make
    a difference as is, lets not use old stuff for new stuff.

 src/gtk-notification.c |   11 +++++------
 src/gtk-notification.h |    4 ++--
 2 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/gtk-notification.c b/src/gtk-notification.c
index 175af97..abe1a80 100644
--- a/src/gtk-notification.c
+++ b/src/gtk-notification.c
@@ -102,7 +102,7 @@ static void     gtk_notification_close_button_clicked_cb        (GtkWidget
 static void     gtk_notification_action_button_clicked_cb       (GtkWidget       *widget,
 																 gpointer         user_data);
 
-G_DEFINE_TYPE(GtkNotification, gtk_notification, GTK_TYPE_BOX);
+G_DEFINE_TYPE(GtkNotification, gtk_notification, GTK_TYPE_GRID);
 
 static void
 gtk_notification_init(GtkNotification *notification)
@@ -145,9 +145,9 @@ gtk_notification_init(GtkNotification *notification)
 	close_button_image = gtk_image_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_BUTTON);
 	gtk_button_set_image (GTK_BUTTON (notification->priv->close_button), close_button_image);
 
-	gtk_box_pack_start (GTK_BOX (notification), notification->priv->message, FALSE, FALSE, 0);
-	gtk_box_pack_end (GTK_BOX (notification), notification->priv->close_button, FALSE, TRUE, 0);
-	gtk_box_pack_end (GTK_BOX (notification), notification->priv->action_button, FALSE, TRUE, 0);
+	gtk_container_add (GTK_CONTAINER (notification), notification->priv->message);
+	gtk_container_add (GTK_CONTAINER (notification), notification->priv->action_button);
+	gtk_container_add (GTK_CONTAINER (notification), notification->priv->close_button);
 
 	gtk_widget_pop_composite_child ();
 
@@ -560,7 +560,6 @@ gtk_notification_new (gchar *message, gchar *action)
 						 "message", message,
 						 "button-label", action,
 						 "orientation", GTK_ORIENTATION_HORIZONTAL,
-						 "homogeneous", FALSE,
-						 "spacing", 8,
+						 "column-spacing", 8,
 						 NULL);
 }
diff --git a/src/gtk-notification.h b/src/gtk-notification.h
index f9f9ce4..5f6519c 100644
--- a/src/gtk-notification.h
+++ b/src/gtk-notification.h
@@ -36,14 +36,14 @@ typedef struct _GtkNotificationClass GtkNotificationClass;
 typedef struct _GtkNotification GtkNotification;
 
 struct _GtkNotificationClass {
-	GtkBoxClass parent_class;
+	GtkGridClass parent_class;
 
 	/* Signals */
 	void (*actioned) (GtkNotification *self);
 };
 
 struct _GtkNotification {
-	GtkBox parent_instance;
+	GtkGrid parent_instance;
 
 	/*< private > */
 	GtkNotificationPrivate *priv;



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