Updating branch refs/heads/master to 0f39601d17822d3122e866048be826d3e53ea7be (commit) from 011b036801c2e8fbb92558bc0a4f88cb064eabc5 (commit)
commit 0f39601d17822d3122e866048be826d3e53ea7be Author: Mike Massonnet <mmasson...@gmail.com> Date: Sat Apr 10 19:40:39 2010 +0200 Add reset button for double click options (bug #6352). Terminal.glade | 24 +++++++++++++++++++++++- terminal/terminal-preferences-dialog.c | 27 +++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletions(-) diff --git a/Terminal.glade b/Terminal.glade index f4ed117..b148b35 100644 --- a/Terminal.glade +++ b/Terminal.glade @@ -1787,6 +1787,28 @@ when double clicking:</property> <property name="position">1</property> </packing> </child> + <child> + <object class="GtkAlignment" id="alignment8"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <child> + <object class="GtkButton" id="reset-word-chars"> + <property name="label" translatable="yes">Rese_t double click options to defaults</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">2</property> + </packing> + </child> </object> </child> </object> @@ -1984,8 +2006,8 @@ when double clicking:</property> </object> <object class="GtkSizeGroup" id="sizegroup1"> <widgets> - <widget name="opacity-label"/> <widget name="style-label"/> + <widget name="opacity-label"/> </widgets> </object> </interface> diff --git a/terminal/terminal-preferences-dialog.c b/terminal/terminal-preferences-dialog.c index 8f33628..e980222 100644 --- a/terminal/terminal-preferences-dialog.c +++ b/terminal/terminal-preferences-dialog.c @@ -38,6 +38,8 @@ static void terminal_preferences_dialog_response (GtkWidget TerminalPreferencesDialog *dialog); static void terminal_preferences_dialog_reset_compat (GtkWidget *button, TerminalPreferencesDialog *dialog); +static void terminal_preferences_dialog_reset_word_chars (GtkWidget *button, + TerminalPreferencesDialog *dialog); static void terminal_preferences_dialog_background_mode (GtkWidget *combobox, TerminalPreferencesDialog *dialog); static void terminal_preferences_dialog_background_notify (GObject *object, @@ -178,6 +180,12 @@ error: g_signal_connect (G_OBJECT (object), "clicked", G_CALLBACK (terminal_preferences_dialog_reset_compat), dialog); + /* reset word-chars button */ + object = gtk_builder_get_object (GTK_BUILDER (dialog), "reset-word-chars"); + terminal_return_if_fail (G_IS_OBJECT (object)); + g_signal_connect (G_OBJECT (object), "clicked", + G_CALLBACK (terminal_preferences_dialog_reset_word_chars), dialog); + /* add shortcuts editor */ editor = g_object_new (TERMINAL_TYPE_SHORTCUT_EDITOR, NULL); object = gtk_builder_get_object (GTK_BUILDER (dialog), "editor-container"); @@ -300,6 +308,25 @@ terminal_preferences_dialog_reset_compat (GtkWidget *button, static void +terminal_preferences_dialog_reset_word_chars (GtkWidget *button, + TerminalPreferencesDialog *dialog) +{ + GParamSpec *spec; + GValue value = { 0, }; + + spec = g_object_class_find_property (G_OBJECT_GET_CLASS (dialog->preferences), "word-chars"); + if (G_LIKELY (spec != NULL)) + { + g_value_init (&value, spec->value_type); + g_param_value_set_default (spec, &value); + g_object_set_property (G_OBJECT (dialog->preferences), "word-chars", &value); + g_value_unset (&value); + } +} + + + +static void terminal_preferences_dialog_background_mode (GtkWidget *combobox, TerminalPreferencesDialog *dialog) { _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits