2008-10-06 Alberto Garcia <agarcia@igalia.com>
authorAlberto Garcia <agarcia@igalia.com>
Mon, 6 Oct 2008 13:11:28 +0000 (13:11 +0000)
committerAlberto Garcia <agarcia@igalia.com>
Mon, 6 Oct 2008 13:11:28 +0000 (13:11 +0000)
* src/hildon-dialog.c (hildon_dialog_add_button):
Set fixed width to all buttons in the HildonDialog.

ChangeLog
src/hildon-dialog.c

index dd0ae98..65bd1bd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2008-10-06  Alberto Garcia  <agarcia@igalia.com>
 
+       * src/hildon-dialog.c (hildon_dialog_add_button):
+       Set fixed width to all buttons in the HildonDialog.
+
+2008-10-06  Alberto Garcia  <agarcia@igalia.com>
+
        Patch contributed by Daniel Borgmann (danielb@openismus.com)
 
        * src/hildon-gtk.c (hildon_gtk_widget_set_theme_size):
index 38fa822..8b88292 100644 (file)
@@ -61,6 +61,9 @@
 
 G_DEFINE_TYPE (HildonDialog, hildon_dialog, GTK_TYPE_DIALOG);
 
+/* Buttons on a HildonDialog have fixed size */
+#define                                         HILDON_DIALOG_BUTTON_WIDTH 174
+
 static void
 hildon_dialog_class_init                        (HildonDialogClass *dialog_class)
 {
@@ -171,6 +174,7 @@ hildon_dialog_add_button                        (HildonDialog *dialog,
     GtkWidget *button;
     button = gtk_dialog_add_button (GTK_DIALOG (dialog), button_text, response_id);
     hildon_gtk_widget_set_theme_size (button, HILDON_SIZE_AUTO_WIDTH | HILDON_SIZE_FINGER_HEIGHT);
+    g_object_set (button, "width-request", HILDON_DIALOG_BUTTON_WIDTH, NULL);
     return button;
 }