diff options
author | Jonathan Blandford <jrb@gnome.org> | 2002-05-18 22:40:21 +0000 |
---|---|---|
committer | Jonathan Blandford <jrb@src.gnome.org> | 2002-05-18 22:40:21 +0000 |
commit | e445f169e3e243c57bc5fbd0d35e8453b2e9e4d8 (patch) | |
tree | 2e599714fd54532e5c5a27aa22c6f6fde9544f28 | |
parent | 679d15153add05ebc3a92f3c452697b47846dcb6 (diff) | |
download | gnome-control-center-e445f169e3e243c57bc5fbd0d35e8453b2e9e4d8.tar.gz |
Add default icon. Don't disalow closing expanders. Implement ui-review
Sat May 18 18:25:02 2002 Jonathan Blandford <jrb@gnome.org>
* gnome-keybinding-properties.c: (append_keys_to_tree),
(setup_dialog): Add default icon. Don't disalow closing
expanders. Implement ui-review suggestions.
* gnome-keybinding-properties.glade: Implement ui-review
suggestions.
-rw-r--r-- | capplets/keybindings/ChangeLog | 9 | ||||
-rw-r--r-- | capplets/keybindings/gnome-keybinding-properties.c | 27 | ||||
-rw-r--r-- | capplets/keybindings/gnome-keybinding-properties.glade | 171 |
3 files changed, 102 insertions, 105 deletions
diff --git a/capplets/keybindings/ChangeLog b/capplets/keybindings/ChangeLog index a4668efe0..a495ad62f 100644 --- a/capplets/keybindings/ChangeLog +++ b/capplets/keybindings/ChangeLog @@ -1,3 +1,12 @@ +Sat May 18 18:25:02 2002 Jonathan Blandford <jrb@gnome.org> + + * gnome-keybinding-properties.c: (append_keys_to_tree), + (setup_dialog): Add default icon. Don't disalow closing + expanders. Implement ui-review suggestions. + + * gnome-keybinding-properties.glade: Implement ui-review + suggestions. + Thu May 16 19:49:26 2002 Jonathan Blandford <jrb@redhat.com> * gnome-keybinding-properties.c (start_editing_cb): evil, evil diff --git a/capplets/keybindings/gnome-keybinding-properties.c b/capplets/keybindings/gnome-keybinding-properties.c index 08abc9c79..e583f2f3f 100644 --- a/capplets/keybindings/gnome-keybinding-properties.c +++ b/capplets/keybindings/gnome-keybinding-properties.c @@ -580,11 +580,13 @@ append_keys_to_tree (GladeXML *dialog, if (i == 0) { - gtk_widget_hide (WID ("shortcuts_frame")); + gtk_widget_hide (WID ("shortcuts_vbox")); + gtk_widget_hide (WID ("shortcuts_hbox")); } else { - gtk_widget_show (WID ("shortcuts_frame")); + gtk_widget_show (WID ("shortcuts_vbox")); + gtk_widget_show (WID ("shortcuts_hbox")); } } @@ -749,12 +751,6 @@ theme_changed_func (gpointer uri, key_theme_changed (client, 0, entry, omenu); } -static gboolean -disable_collapsing_cb (GtkTreeView *tree_view, GtkTreeIter *iter, GtkTreePath *path, gpointer data) -{ - return TRUE; -} - typedef struct { @@ -818,6 +814,8 @@ setup_dialog (GladeXML *dialog) GtkWidget *widget; gboolean found_keys = FALSE; GList *list; + GdkPixbuf *icon_pixbuf; + gchar *filename; client = gconf_client_get_default (); @@ -857,15 +855,13 @@ setup_dialog (GladeXML *dialog) } - g_signal_connect (WID ("shortcut_treeview"), "test_collapse_row", - G_CALLBACK (disable_collapsing_cb), NULL), g_signal_connect (GTK_TREE_VIEW (WID ("shortcut_treeview")), "button_press_event", G_CALLBACK (start_editing_cb), dialog), gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (WID ("shortcut_treeview")), -1, - _("_Action"), + _("Action"), gtk_cell_renderer_text_new (), "text", DESCRIPTION_COLUMN, NULL); @@ -877,7 +873,7 @@ setup_dialog (GladeXML *dialog) G_CALLBACK (accel_edited_callback), WID ("shortcut_treeview")); gtk_tree_view_insert_column_with_data_func (GTK_TREE_VIEW (WID ("shortcut_treeview")), - -1, _("_Shortcut"), + -1, _("Shortcut"), renderer, accel_set_func, NULL, NULL); gconf_client_add_dir (client, "/apps/gnome_keybinding_properties", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); @@ -886,11 +882,16 @@ setup_dialog (GladeXML *dialog) "/apps/metacity/general/num_workspaces", (GConfClientNotifyFunc) &key_entry_controlling_key_changed, dialog, NULL, NULL); - + /* set up the dialog */ reload_key_entries (dialog); widget = WID ("gnome-keybinding-dialog"); + filename = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_APP_PIXMAP, "keyboard-shortcut.png", TRUE, NULL); + icon_pixbuf = gdk_pixbuf_new_from_file ("keyboard-shortcut.png", NULL); + gtk_window_set_icon (GTK_WINDOW (widget), icon_pixbuf); + g_free (filename); + g_object_unref (icon_pixbuf); gtk_widget_show (widget); g_signal_connect (G_OBJECT (widget), "response", gtk_main_quit, NULL); diff --git a/capplets/keybindings/gnome-keybinding-properties.glade b/capplets/keybindings/gnome-keybinding-properties.glade index c918c4dfc..71031deea 100644 --- a/capplets/keybindings/gnome-keybinding-properties.glade +++ b/capplets/keybindings/gnome-keybinding-properties.glade @@ -10,8 +10,7 @@ <property name="modal">False</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> - <property name="has_separator">False</property> - <property name="visible">False</property> + <property name="has_separator">True</property> <child internal-child="vbox"> <widget class="GtkVBox" id="shortcut_dialog"> @@ -31,6 +30,7 @@ <widget class="GtkButton" id="closebutton1"> <property name="visible">True</property> <property name="can_default">True</property> + <property name="has_default">True</property> <property name="can_focus">True</property> <property name="label">gtk-close</property> <property name="use_stock">True</property> @@ -106,121 +106,108 @@ </child> <child> - <widget class="GtkFrame" id="shortcuts_frame"> + <widget class="GtkVBox" id="shortcuts_vbox"> <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> + <property name="homogeneous">False</property> + <property name="spacing">4</property> + + <child> + <widget class="GtkLabel" id="label11"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Desktop shortcuts:</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="mnemonic_widget">shortcut_treeview</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> <child> - <widget class="GtkVBox" id="vbox4"> - <property name="border_width">4</property> + <widget class="GtkScrolledWindow" id="actions_swindow"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">4</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">GTK_POLICY_NEVER</property> + <property name="vscrollbar_policy">GTK_POLICY_NEVER</property> + <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> + <property name="window_placement">GTK_CORNER_TOP_LEFT</property> <child> - <widget class="GtkScrolledWindow" id="actions_swindow"> + <widget class="GtkTreeView" id="shortcut_treeview"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="hscrollbar_policy">GTK_POLICY_NEVER</property> - <property name="vscrollbar_policy">GTK_POLICY_NEVER</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> - <property name="window_placement">GTK_CORNER_TOP_LEFT</property> - - <child> - <widget class="GtkTreeView" id="shortcut_treeview"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="headers_visible">True</property> - <property name="rules_hint">False</property> - <property name="reorderable">False</property> - <property name="enable_search">True</property> - <accessibility> - <atkproperty name="AtkObject::accessible_description" translatable="yes">The list of keybindings.</atkproperty> - </accessibility> - </widget> - </child> + <property name="headers_visible">True</property> + <property name="rules_hint">False</property> + <property name="reorderable">False</property> + <property name="enable_search">True</property> </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> - <child> - <widget class="GtkHBox" id="hbox1"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">8</property> - - <child> - <widget class="GtkImage" id="image1"> - <property name="visible">True</property> - <property name="stock">gtk-dialog-info</property> - <property name="icon_size">6</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <accessibility> - <atkrelation target="shortcut_treeview" type="label-for"/> - </accessibility> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label10"> - <property name="visible">True</property> - <property name="label" translatable="yes">To assign a shortcut to an action, click in the shortcut column and press the key combination you want to associate with it.</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">True</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <child> + <widget class="GtkHBox" id="shortcuts_hbox"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">8</property> + + <child> + <widget class="GtkImage" id="image1"> + <property name="visible">True</property> + <property name="stock">gtk-dialog-info</property> + <property name="icon_size">6</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> </child> <child> - <widget class="GtkLabel" id="label9"> + <widget class="GtkLabel" id="label10"> <property name="visible">True</property> - <property name="label" translatable="yes">Desktop Shortcuts:</property> + <property name="label" translatable="yes">To assign a shortcut to an action, click in the shortcut column and press the key combination you want to associate with it.</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> + <property name="wrap">True</property> <property name="selectable">False</property> - <property name="xalign">0.5</property> + <property name="xalign">0</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> <packing> - <property name="type">label_item</property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> </widget> |