[gnome-control-center] Make the custom keybinding UI smoother
- From: Matthias Clasen <matthiasc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-control-center] Make the custom keybinding UI smoother
- Date: Thu, 7 May 2009 20:09:40 -0400 (EDT)
commit 59380c29e4e30f14cf52036a766868d83bdedb91
Author: Matthias Clasen <mclasen redhat com>
Date: Thu May 7 20:02:37 2009 -0400
Make the custom keybinding UI smoother
These changes were proposed in bug 580792:
- Make the apply button the default
- Don't let the cancel button grab the default
- Make both entries activate the default widget
- Grab the focus to the first entry when presenting the dialog
---
capplets/keybindings/gnome-keybinding-properties.c | 1 +
.../keybindings/gnome-keybinding-properties.glade | 6 ++++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/capplets/keybindings/gnome-keybinding-properties.c b/capplets/keybindings/gnome-keybinding-properties.c
index b6127bb..97ca6c4 100644
--- a/capplets/keybindings/gnome-keybinding-properties.c
+++ b/capplets/keybindings/gnome-keybinding-properties.c
@@ -1376,6 +1376,7 @@ edit_custom_shortcut (KeyEntry *key)
gtk_entry_set_text (GTK_ENTRY (custom_shortcut_name_entry), key->description ? key->description : "");
gtk_widget_set_sensitive (custom_shortcut_name_entry, key->desc_editable);
+ gtk_widget_grab_focus (custom_shortcut_name_entry);
gtk_entry_set_text (GTK_ENTRY (custom_shortcut_command_entry), key->command ? key->command : "");
gtk_widget_set_sensitive (custom_shortcut_command_entry, key->cmd_editable);
diff --git a/capplets/keybindings/gnome-keybinding-properties.glade b/capplets/keybindings/gnome-keybinding-properties.glade
index 79cd4a3..4bf39b2 100644
--- a/capplets/keybindings/gnome-keybinding-properties.glade
+++ b/capplets/keybindings/gnome-keybinding-properties.glade
@@ -238,7 +238,8 @@
<child>
<widget class="GtkButton" id="cancelbutton1">
<property name="visible">True</property>
- <property name="can_default">True</property>
+ <property name="can_default">False</property>
+ <property name="receives_default">False</property>
<property name="can_focus">True</property>
<property name="label">gtk-cancel</property>
<property name="use_stock">True</property>
@@ -252,6 +253,7 @@
<widget class="GtkButton" id="okbutton1">
<property name="visible">True</property>
<property name="can_default">True</property>
+ <property name="receives_default">False</property>
<property name="can_focus">True</property>
<property name="label">gtk-apply</property>
<property name="use_stock">True</property>
@@ -372,7 +374,7 @@
<property name="max_length">0</property>
<property name="has_frame">True</property>
<property name="invisible_char">â?¢</property>
- <property name="activates_default">False</property>
+ <property name="activates_default">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]