[gedit] Bug 590166 - Update preferences dialog
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Bug 590166 - Update preferences dialog
- Date: Mon, 17 May 2010 00:18:43 +0000 (UTC)
commit 03371c4eb7e82f97f3fb0f32eec7111356f77792
Author: Garrett Regier <alias301 gmail com>
Date: Sun May 16 17:18:31 2010 -0700
Bug 590166 - Update preferences dialog
gedit/dialogs/gedit-preferences-dialog.c | 30 +--
gedit/dialogs/gedit-preferences-dialog.ui | 331 ++++++-----------------------
2 files changed, 74 insertions(+), 287 deletions(-)
---
diff --git a/gedit/dialogs/gedit-preferences-dialog.c b/gedit/dialogs/gedit-preferences-dialog.c
index 8475110..0e41726 100644
--- a/gedit/dialogs/gedit-preferences-dialog.c
+++ b/gedit/dialogs/gedit-preferences-dialog.c
@@ -110,19 +110,15 @@ struct _GeditPreferencesDialogPrivate
GtkWidget *auto_save_spinbutton;
GtkWidget *autosave_hbox;
- /* Line numbers */
GtkWidget *display_line_numbers_checkbutton;
-
- /* Highlight current line */
- GtkWidget *highlight_current_line_checkbutton;
-
- /* Highlight matching bracket */
- GtkWidget *bracket_matching_checkbutton;
/* Right margin */
GtkWidget *right_margin_checkbutton;
GtkWidget *right_margin_position_spinbutton;
- GtkWidget *right_margin_position_hbox;
+
+ /* Highlighting */
+ GtkWidget *highlight_current_line_checkbutton;
+ GtkWidget *bracket_matching_checkbutton;
/* Plugins manager */
GtkWidget *plugin_manager_place_holder;
@@ -311,7 +307,7 @@ right_margin_checkbutton_toggled (GtkToggleButton *button,
g_settings_set_boolean (dlg->priv->editor, GEDIT_SETTINGS_DISPLAY_RIGHT_MARGIN,
active);
- gtk_widget_set_sensitive (dlg->priv->right_margin_position_hbox,
+ gtk_widget_set_sensitive (dlg->priv->right_margin_position_spinbutton,
active);
}
@@ -363,11 +359,10 @@ setup_view_page (GeditPreferencesDialog *dlg)
display_right_margin);
/* Set widgets sensitivity */
- gtk_widget_set_sensitive (dlg->priv->split_checkbutton,
+ gtk_widget_set_sensitive (dlg->priv->split_checkbutton,
(wrap_mode != GTK_WRAP_NONE));
- gtk_widget_set_sensitive (dlg->priv->right_margin_position_hbox,
+ gtk_widget_set_sensitive (dlg->priv->right_margin_position_spinbutton,
display_right_margin);
-
/* Connect signals */
g_settings_bind (dlg->priv->editor,
GEDIT_SETTINGS_DISPLAY_LINE_NUMBERS,
@@ -973,19 +968,18 @@ gedit_preferences_dialog_init (GeditPreferencesDialog *dlg)
"notebook", &dlg->priv->notebook,
"display_line_numbers_checkbutton", &dlg->priv->display_line_numbers_checkbutton,
+ "right_margin_checkbutton", &dlg->priv->right_margin_checkbutton,
+ "right_margin_position_spinbutton", &dlg->priv->right_margin_position_spinbutton,
+
"highlight_current_line_checkbutton", &dlg->priv->highlight_current_line_checkbutton,
"bracket_matching_checkbutton", &dlg->priv->bracket_matching_checkbutton,
+
"wrap_text_checkbutton", &dlg->priv->wrap_text_checkbutton,
"split_checkbutton", &dlg->priv->split_checkbutton,
- "right_margin_checkbutton", &dlg->priv->right_margin_checkbutton,
- "right_margin_position_spinbutton", &dlg->priv->right_margin_position_spinbutton,
- "right_margin_position_hbox", &dlg->priv->right_margin_position_hbox,
-
"tabs_width_spinbutton", &dlg->priv->tabs_width_spinbutton,
"tabs_width_hbox", &dlg->priv->tabs_width_hbox,
"insert_spaces_checkbutton", &dlg->priv->insert_spaces_checkbutton,
-
"auto_indent_checkbutton", &dlg->priv->auto_indent_checkbutton,
"autosave_hbox", &dlg->priv->autosave_hbox,
@@ -1002,8 +996,8 @@ gedit_preferences_dialog_init (GeditPreferencesDialog *dlg)
"uninstall_scheme_button", &dlg->priv->uninstall_scheme_button,
"plugin_manager_place_holder", &dlg->priv->plugin_manager_place_holder,
-
NULL);
+
g_free (file);
if (!ret)
diff --git a/gedit/dialogs/gedit-preferences-dialog.ui b/gedit/dialogs/gedit-preferences-dialog.ui
index 9c14170..a721a61 100644
--- a/gedit/dialogs/gedit-preferences-dialog.ui
+++ b/gedit/dialogs/gedit-preferences-dialog.ui
@@ -48,32 +48,22 @@
<property name="orientation">vertical</property>
<property name="spacing">18</property>
<child>
- <object class="GtkVBox" id="vbox226">
+ <object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label848">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Text Wrapping</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
<child>
- <object class="GtkHBox" id="hbox142">
+ <object class="GtkVBox" id="vbox222">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label849">
+ <object class="GtkCheckButton" id="display_line_numbers_checkbutton">
+ <property name="label" translatable="yes">_Display line numbers</property>
<property name="visible">True</property>
- <property name="label" translatable="yes"> </property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -82,13 +72,12 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="wrap_mode_frame">
+ <object class="GtkHBox" id="right_margin_position_hbox">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkCheckButton" id="wrap_text_checkbutton">
- <property name="label" translatable="yes">Enable text _wrapping</property>
+ <object class="GtkCheckButton" id="right_margin_checkbutton">
+ <property name="label" translatable="yes">Display right _margin at column:</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -102,13 +91,14 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="split_checkbutton">
- <property name="label" translatable="yes">Do not _split words over two lines</property>
+ <object class="GtkSpinButton" id="right_margin_position_spinbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="invisible_char">●</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="climb_rate">1</property>
+ <property name="snap_to_ticks">True</property>
+ <property name="numeric">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -118,12 +108,14 @@
</child>
</object>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
- <property name="position">1</property>
+ <property name="position">0</property>
</packing>
</child>
</object>
@@ -132,15 +124,15 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox217">
+ <object class="GtkVBox" id="vbox226">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label854">
+ <object class="GtkLabel" id="label848">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Line Numbers</property>
+ <property name="label" translatable="yes">Text Wrapping</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -152,10 +144,10 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox137">
+ <object class="GtkHBox" id="hbox142">
<property name="visible">True</property>
<child>
- <object class="GtkLabel" id="label843">
+ <object class="GtkLabel" id="label849">
<property name="visible">True</property>
<property name="label" translatable="yes"> </property>
</object>
@@ -166,12 +158,13 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox222">
+ <object class="GtkVBox" id="wrap_mode_frame">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkCheckButton" id="display_line_numbers_checkbutton">
- <property name="label" translatable="yes">_Display line numbers</property>
+ <object class="GtkCheckButton" id="wrap_text_checkbutton">
+ <property name="label" translatable="yes">Enable text _wrapping</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -184,65 +177,9 @@
<property name="position">0</property>
</packing>
</child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox244">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label876">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Current Line</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox161">
- <property name="visible">True</property>
- <child>
- <object class="GtkLabel" id="label877">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox245">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
<child>
- <object class="GtkCheckButton" id="highlight_current_line_checkbutton">
- <property name="label" translatable="yes">Highlight current _line</property>
+ <object class="GtkCheckButton" id="split_checkbutton">
+ <property name="label" translatable="yes">Do not _split words over two lines</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -252,7 +189,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>
@@ -267,20 +204,19 @@
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox230">
+ <object class="GtkVBox" id="vbox244">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label855">
+ <object class="GtkLabel" id="label876">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Right Margin</property>
+ <property name="label" translatable="yes">Highlighting</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -292,10 +228,10 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox145">
+ <object class="GtkHBox" id="hbox161">
<property name="visible">True</property>
<child>
- <object class="GtkLabel" id="label856">
+ <object class="GtkLabel" id="label877">
<property name="visible">True</property>
<property name="label" translatable="yes"> </property>
</object>
@@ -306,13 +242,13 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox231">
+ <object class="GtkVBox" id="vbox245">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkCheckButton" id="right_margin_checkbutton">
- <property name="label" translatable="yes">Display right _margin</property>
+ <object class="GtkCheckButton" id="highlight_current_line_checkbutton">
+ <property name="label" translatable="yes">Highlight current _line</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -326,102 +262,6 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="right_margin_position_hbox">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label857">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Right margin at column:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">right_margin_position_spinbutton</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="right_margin_position_spinbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">adjustment1</property>
- <property name="climb_rate">1</property>
- <property name="snap_to_ticks">True</property>
- <property name="numeric">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="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox249">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label881">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Bracket Matching</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox163">
- <property name="visible">True</property>
- <child>
- <object class="GtkLabel" id="label882">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox250">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
<object class="GtkCheckButton" id="bracket_matching_checkbutton">
<property name="label" translatable="yes">Highlight matching _bracket</property>
<property name="visible">True</property>
@@ -433,7 +273,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>
@@ -448,7 +288,8 @@
</child>
</object>
<packing>
- <property name="position">4</property>
+ <property name="expand">False</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -559,6 +400,21 @@
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="auto_indent_checkbutton">
+ <property name="label" translatable="yes">_Enable automatic indentation</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -581,69 +437,6 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox227">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label851">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Automatic Indentation</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox143">
- <property name="visible">True</property>
- <child>
- <object class="GtkLabel" id="label852">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="auto_indent_checkbutton">
- <property name="label" translatable="yes">_Enable automatic indentation</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">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="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
<object class="GtkVBox" id="vbox232">
<property name="visible">True</property>
<property name="orientation">vertical</property>
@@ -765,7 +558,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]