ui-review

This commit is contained in:
Jody Goldberg 2002-07-10 17:02:59 +00:00
parent 6f4eb48226
commit 71b67b6586
33 changed files with 126 additions and 138 deletions

View file

@ -306,7 +306,7 @@ egg_cell_renderer_keys_get_size (GtkCellRenderer *cell,
GtkRequisition requisition;
if (keys->sizing_label == NULL)
keys->sizing_label = gtk_label_new (_("Type a new accelerator, or press Backspace to clear"));
keys->sizing_label = gtk_label_new (_("Type a new shortcut"));
gtk_widget_size_request (keys->sizing_label, &requisition);
(* GTK_CELL_RENDERER_CLASS (parent_class)->get_size) (cell, widget, cell_area, x_offset, y_offset, width, height);
@ -503,10 +503,10 @@ egg_cell_renderer_keys_start_editing (GtkCellRenderer *cell,
if (keys->accel_key != 0)
gtk_label_set_text (GTK_LABEL (label),
_("Type a new accelerator, or press Backspace to clear"));
_("Type a new shortcut"));
else
gtk_label_set_text (GTK_LABEL (label),
_("Type a new accelerator"));
_("Type a new shortcut"));
gtk_container_add (GTK_CONTAINER (eventbox), label);

View file

@ -136,8 +136,16 @@ make_key_theme_menu_item (const gchar *key_theme)
{
GtkWidget *retval;
retval = gtk_menu_item_new_with_label (key_theme);
g_object_set_data_full (G_OBJECT (retval), LABEL_DATA, g_strdup (key_theme), g_free);
if (!strcmp (key_theme, "Default"))
{
retval = gtk_menu_item_new_with_label ("GNOME Default");
g_object_set_data_full (G_OBJECT (retval), LABEL_DATA, g_strdup ("Default"), g_free);
}
else
{
retval = gtk_menu_item_new_with_label (key_theme);
g_object_set_data_full (G_OBJECT (retval), LABEL_DATA, g_strdup (key_theme), g_free);
}
g_signal_connect (G_OBJECT (retval), "activate", G_CALLBACK (menu_item_activate), NULL);
gtk_widget_show (retval);
@ -438,15 +446,9 @@ append_keys_to_tree (GladeXML *dialog,
}
if (i == 0)
{
gtk_widget_hide (WID ("shortcuts_vbox"));
gtk_widget_hide (WID ("shortcuts_hbox"));
}
else
{
gtk_widget_show (WID ("shortcuts_vbox"));
gtk_widget_show (WID ("shortcuts_hbox"));
}
}
static void
@ -594,10 +596,10 @@ theme_changed_func (gpointer uri,
menu_item = make_key_theme_menu_item (info->name);
if (!strcmp (info->name, "Default"))
/* Put default first, always */
gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), menu_item);
/* Put default first, always */
gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), menu_item);
else
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
}
gtk_widget_show (menu);
@ -682,6 +684,7 @@ setup_dialog (GladeXML *dialog)
GConfClient *client;
GList *key_theme_list;
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
GtkWidget *widget;
gboolean found_keys = FALSE;
GList *list;
@ -710,7 +713,6 @@ setup_dialog (GladeXML *dialog)
gtk_dialog_run (GTK_DIALOG (msg_dialog));
gtk_widget_destroy (msg_dialog);
gtk_widget_hide (WID ("shortcut_hbox"));
}
else
{
@ -728,12 +730,14 @@ setup_dialog (GladeXML *dialog)
"button_press_event",
G_CALLBACK (start_editing_cb), dialog),
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (WID ("shortcut_treeview")),
-1,
_("Action"),
gtk_cell_renderer_text_new (),
"text", DESCRIPTION_COLUMN,
NULL);
column = gtk_tree_view_column_new_with_attributes (_("Action"),
gtk_cell_renderer_text_new (),
"text", DESCRIPTION_COLUMN,
NULL);
gtk_tree_view_column_set_resizable (column, TRUE);
gtk_tree_view_append_column (GTK_TREE_VIEW (WID ("shortcut_treeview")), column);
renderer = (GtkCellRenderer *) g_object_new (EGG_TYPE_CELL_RENDERER_KEYS,
"editable", TRUE,
NULL);
@ -741,10 +745,13 @@ setup_dialog (GladeXML *dialog)
"keys_edited",
G_CALLBACK (accel_edited_callback),
WID ("shortcut_treeview"));
gtk_tree_view_insert_column_with_data_func (GTK_TREE_VIEW (WID ("shortcut_treeview")),
-1, _("Shortcut"),
renderer,
accel_set_func, NULL, NULL);
column = gtk_tree_view_column_new_with_attributes (_("Shortcut"), renderer, NULL);
gtk_tree_view_column_set_cell_data_func (column, renderer, accel_set_func, NULL, NULL);
gtk_tree_view_column_set_resizable (column, TRUE);
gtk_tree_view_append_column (GTK_TREE_VIEW (WID ("shortcut_treeview")), column);
gconf_client_add_dir (client, "/apps/gnome_keybinding_properties", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
gconf_client_add_dir (client, "/apps/metacity/general", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
gconf_client_notify_add (client,

View file

@ -26,18 +26,17 @@
<property name="layout_style">GTK_BUTTONBOX_END</property>
<property name="spacing">10</property>
<child>
<widget class="GtkButton" id="helpbutton1">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-help</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">-11</property>
</widget>
</child>
<child>
<widget class="GtkButton" id="helpbutton1">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-help</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">-11</property>
</widget>
</child>
<child>
<widget class="GtkButton" id="closebutton1">
@ -76,7 +75,7 @@
<child>
<widget class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="label" translatable="yes">Keyboard _Navigation scheme for use in applications:</property>
<property name="label" translatable="yes">_Text editing shortcuts:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@ -103,18 +102,23 @@
<accessibility>
<atkproperty name="AtkObject::accessible_description" translatable="yes">Click for a list of keyboard navigation schemes.</atkproperty>
</accessibility>
<child>
<widget class="GtkMenu" id="menu1">
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</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">True</property>
<property name="fill">False</property>
</packing>
</child>
@ -179,57 +183,6 @@
<property name="fill">True</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="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">True</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>

View file

@ -1,6 +1,6 @@
[Desktop Entry]
_Name=Keyboard Shortcuts
_Comment=Associate keyboard shortcuts with panel actions
_Comment=Assign shortcut keys to commands
Exec=gnome-keybinding-properties
Icon=keyboard-shortcut.png
Terminal=0