Commit 83baa914 authored by William Jon McCann's avatar William Jon McCann

keyboard: make the shortcut dialog a bit more like the mockups

 - No horizontal scroll
 - No info icon
 - Use toolbar for add/remove
parent b7c658c0
......@@ -548,13 +548,15 @@
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkHBox" id="hbox2">
<object class="GtkTable" id="table11">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<child>
<object class="GtkScrolledWindow" id="sections_swindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">automatic</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
......@@ -566,15 +568,14 @@
</child>
</object>
<packing>
<property name="padding">3</property>
<property name="position">0</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="actions_swindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">automatic</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
......@@ -587,44 +588,77 @@
</child>
</object>
<packing>
<property name="padding">3</property>
<property name="position">1</property>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
<object class="GtkToolbar" id="shortcut-toolbar">
<property name="visible">True</property>
<property name="icon_size">1</property>
<child>
<object class="GtkToolButton" id="add-toolbutton">
<property name="visible">True</property>
<property name="label" translatable="yes">add-toolbutton</property>
<property name="use_underline">True</property>
<property name="icon_name">list-add-symbolic</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="remove-toolbutton">
<property name="visible">True</property>
<property name="label" translatable="yes">remove-toolbutton</property>
<property name="use_underline">True</property>
<property name="icon_name">list-remove-symbolic</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
</object>
<packing>
<property name="padding">3</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="border_width">5</property>
<property name="spacing">12</property>
<child>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="yalign">0</property>
<property name="stock">gtk-dialog-info</property>
<property name="icon-size">6</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label12">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">To edit a shortcut key, click on the corresponding row and type a new key combination, or press backspace to clear.</property>
<property name="label" translatable="yes">To edit a shortcut, click the row and hold down the new keys or press Backspace to clear.</property>
<property name="justify">fill</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="position">1</property>
<property name="position">0</property>
</packing>
</child>
</object>
......@@ -638,48 +672,6 @@
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHButtonBox" id="hbuttonbox1">
<property name="visible">True</property>
<property name="spacing">6</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="add-button">
<property name="label">gtk-add</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="remove-button">
<property name="label">gtk-remove</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="position">1</property>
......
......@@ -1788,7 +1788,7 @@ setup_dialog (CcPanel *panel, GtkBuilder *builder)
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
g_signal_connect (selection, "changed",
G_CALLBACK (shortcut_selection_changed),
WID (builder, "remove-button"));
WID (builder, "remove-toolbutton"));
allowed_keys = gconf_client_get_list (client,
GCONF_BINDING_DIR "/allowed_keys",
......@@ -1798,7 +1798,7 @@ setup_dialog (CcPanel *panel, GtkBuilder *builder)
{
g_slist_foreach (allowed_keys, (GFunc)g_free, NULL);
g_slist_free (allowed_keys);
gtk_widget_set_sensitive (WID (builder, "add-button"),
gtk_widget_set_sensitive (WID (builder, "add-toolbutton"),
FALSE);
}
......@@ -1811,9 +1811,9 @@ setup_dialog (CcPanel *panel, GtkBuilder *builder)
"custom-shortcut-name-entry");
custom_shortcut_command_entry = WID (builder,
"custom-shortcut-command-entry");
g_signal_connect (WID (builder, "add-button"),
g_signal_connect (WID (builder, "add-toolbutton"),
"clicked", G_CALLBACK (add_button_clicked), builder);
g_signal_connect (WID (builder, "remove-button"),
g_signal_connect (WID (builder, "remove-toolbutton"),
"clicked", G_CALLBACK (remove_button_clicked), builder);
gtk_dialog_set_default_response (GTK_DIALOG (custom_shortcut_dialog),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment