Commit 6af9e3e8 authored by Jonh Wendell's avatar Jonh Wendell
Browse files

Reording of preferences item that toggles menu accelerators.

Also, put a help button in that dialog.
parent 8dc55a6f
......@@ -879,10 +879,11 @@
</child>
<child>
<object class="GtkCheckButton" id="show_accels_check">
<property name="label" translatable="yes">_Show menu shortcuts</property>
<property name="label" translatable="yes">Allow _keyboard shortcuts</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes" comments="This is a tooltip in preferences dialog">This option enables menu accelerators and keyboard shortcuts. For more info on why you may want to disable them, check the documentation.</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
......@@ -914,7 +915,21 @@
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area5">
<property name="visible">True</property>
<property name="layout_style">end</property>
<property name="layout_style">edge</property>
<child>
<object class="GtkButton" id="preferences_help_button">
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">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="button9">
<property name="label">gtk-close</property>
......@@ -926,7 +941,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
<property name="position">1</property>
</packing>
</child>
</object>
......@@ -939,6 +954,7 @@
</object>
</child>
<action-widgets>
<action-widget response="1">preferences_help_button</action-widget>
<action-widget response="0">button9</action-widget>
</action-widgets>
</object>
......
......@@ -497,6 +497,7 @@ typedef struct {
GtkWidget *dialog;
GtkWidget *show_tabs;
GtkWidget *show_accels;
GtkWindow *parent;
} VinagrePrefsDialog;
static void
......@@ -514,8 +515,14 @@ vinagre_prefs_dialog_setup (VinagrePrefsDialog *dialog)
}
static void
vinagre_prefs_dialog_quit (VinagrePrefsDialog *dialog)
vinagre_prefs_dialog_response (GtkDialog *d, gint response_id, VinagrePrefsDialog *dialog)
{
if (response_id > 0)
{
vinagre_utils_help_contents (dialog->parent, "preferences");
return;
}
gtk_widget_destroy (dialog->dialog);
g_object_unref (dialog->xml);
g_free (dialog);
......@@ -547,17 +554,18 @@ vinagre_prefs_dialog_show (VinagreWindow *window)
dialog->xml = vinagre_utils_get_builder (NULL, NULL);
dialog->dialog = GTK_WIDGET (gtk_builder_get_object (dialog->xml, "preferences_dialog"));
gtk_window_set_transient_for (GTK_WINDOW (dialog->dialog), GTK_WINDOW (window));
dialog->parent = GTK_WINDOW (window);
gtk_window_set_transient_for (GTK_WINDOW (dialog->dialog), dialog->parent);
dialog->show_tabs = GTK_WIDGET (gtk_builder_get_object (dialog->xml, "always_show_tabs_check"));
dialog->show_accels = GTK_WIDGET (gtk_builder_get_object (dialog->xml, "show_accels_check"));
vinagre_prefs_dialog_setup (dialog);
g_signal_connect_swapped (dialog->dialog,
"response",
G_CALLBACK (vinagre_prefs_dialog_quit),
dialog);
g_signal_connect (dialog->dialog,
"response",
G_CALLBACK (vinagre_prefs_dialog_response),
dialog);
g_signal_connect_swapped (dialog->show_tabs,
"toggled",
......
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