[gnome-disk-utility] Make the Apply button in edit-name dialogs default.



commit 1271ca9b6af2e15345981194440165738b9ff3d9
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Apr 1 16:33:01 2010 -0400

    Make the Apply button in edit-name dialogs default.
    
    And make the entry activate it.

 src/gdu-gtk/gdu-edit-name-dialog.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/gdu-gtk/gdu-edit-name-dialog.c b/src/gdu-gtk/gdu-edit-name-dialog.c
index 8fb70aa..b52c2e7 100644
--- a/src/gdu-gtk/gdu-edit-name-dialog.c
+++ b/src/gdu-gtk/gdu-edit-name-dialog.c
@@ -195,6 +195,11 @@ gdu_edit_name_dialog_constructed (GObject *object)
                                GTK_STOCK_APPLY,
                                GTK_RESPONSE_APPLY);
 
+        gtk_dialog_set_default_response (GTK_DIALOG (dialog),
+                                         GTK_RESPONSE_APPLY);
+        gtk_entry_set_activates_default (GTK_ENTRY (dialog->priv->name_entry),
+                                         TRUE);
+
         content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
 
         icon = gdu_presentable_get_icon (gdu_dialog_get_presentable (GDU_DIALOG (dialog)));



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