Hide 'Tabs and Spaces: Hard tab width' preference - it should

always be 8. (Hidden setting kept in case users have modified it).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4866 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2010-04-28 13:08:15 +00:00
parent 5a20dacdec
commit 1b51823339
7 changed files with 44 additions and 253 deletions

View File

@ -1,3 +1,11 @@
2010-04-28 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/interface.c, src/project.c, src/keyfile.c, geany.glade,
doc/geany.txt, doc/geany.html:
Hide 'Tabs and Spaces: Hard tab width' preference - it should
always be 8. (Hidden setting kept in case users have modified it).
2010-04-28 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> 2010-04-28 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* doc/geany.txt, doc/geany.html: * doc/geany.txt, doc/geany.html:

View File

@ -6,7 +6,7 @@
<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" /> <meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
<title>Geany</title> <title>Geany</title>
<meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" /> <meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" />
<meta name="date" content="2010-04-22" /> <meta name="date" content="2010-04-28" />
<style type="text/css"> <style type="text/css">
/* /*
@ -139,7 +139,7 @@ Stylesheet for Geany's documentation based on a version of John Gabriele.
<br />Nick Treleaven <br />Nick Treleaven
<br />Frank Lanitz</td></tr> <br />Frank Lanitz</td></tr>
<tr><th class="docinfo-name">Date:</th> <tr><th class="docinfo-name">Date:</th>
<td>2010-04-22</td></tr> <td>2010-04-28</td></tr>
<tr><th class="docinfo-name">Version:</th> <tr><th class="docinfo-name">Version:</th>
<td>0.19</td></tr> <td>0.19</td></tr>
</tbody> </tbody>
@ -2204,10 +2204,6 @@ support</em> in some other editors.</p>
<dt>Width</dt> <dt>Width</dt>
<dd>The width of a single indent size in spaces. By default the indent <dd>The width of a single indent size in spaces. By default the indent
size is equivalent to 4 spaces.</dd> size is equivalent to 4 spaces.</dd>
<dt>Hard tab width</dt>
<dd>When the <em>Tabs and Spaces</em> indent type is enabled, this is the
display size of a tab. Otherwise this is ignored. Although
configurable, this should usually be set to 8.</dd>
<dt>Detect from file</dt> <dt>Detect from file</dt>
<dd>Try to detect and set the indent type based on file content, when <dd>Try to detect and set the indent type based on file content, when
a file is opened.</dd> a file is opened.</dd>
@ -6012,7 +6008,7 @@ USE OR PERFORMANCE OF THIS SOFTWARE.</p>
<div class="footer"> <div class="footer">
<hr class="footer" /> <hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>. <a class="reference" href="geany.txt">View document source</a>.
Generated on: 2010-04-28 12:47 UTC. Generated on: 2010-04-28 13:05 UTC.
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div> </div>

View File

@ -1889,11 +1889,6 @@ Width
The width of a single indent size in spaces. By default the indent The width of a single indent size in spaces. By default the indent
size is equivalent to 4 spaces. size is equivalent to 4 spaces.
Hard tab width
When the *Tabs and Spaces* indent type is enabled, this is the
display size of a tab. Otherwise this is ignored. Although
configurable, this should usually be set to 8.
Detect from file Detect from file
Try to detect and set the indent type based on file content, when Try to detect and set the indent type based on file content, when
a file is opened. a file is opened.

View File

@ -18,6 +18,7 @@
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property> <property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>
<accessibility> <accessibility>
<atkproperty name="AtkObject::accessible_name" translatable="yes">Geany</atkproperty> <atkproperty name="AtkObject::accessible_name" translatable="yes">Geany</atkproperty>
</accessibility> </accessibility>
@ -37,6 +38,8 @@
<child> <child>
<widget class="GtkMenuBar" id="menubar1"> <widget class="GtkMenuBar" id="menubar1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
<property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
<child> <child>
<widget class="GtkMenuItem" id="file1"> <widget class="GtkMenuItem" id="file1">
@ -2712,6 +2715,7 @@
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property> <property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>
<property name="has_separator">True</property> <property name="has_separator">True</property>
<child internal-child="vbox"> <child internal-child="vbox">
@ -5713,7 +5717,7 @@ Bottom
<child> <child>
<widget class="GtkTable" id="table13"> <widget class="GtkTable" id="table13">
<property name="visible">True</property> <property name="visible">True</property>
<property name="n_rows">7</property> <property name="n_rows">6</property>
<property name="n_columns">2</property> <property name="n_columns">2</property>
<property name="homogeneous">False</property> <property name="homogeneous">False</property>
<property name="row_spacing">3</property> <property name="row_spacing">3</property>
@ -5740,8 +5744,8 @@ Bottom
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="right_attach">1</property> <property name="right_attach">1</property>
<property name="top_attach">6</property> <property name="top_attach">5</property>
<property name="bottom_attach">7</property> <property name="bottom_attach">6</property>
<property name="x_options">fill</property> <property name="x_options">fill</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
@ -5760,8 +5764,8 @@ Match braces</property>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">6</property> <property name="top_attach">5</property>
<property name="bottom_attach">7</property> <property name="bottom_attach">6</property>
<property name="x_options">fill</property> <property name="x_options">fill</property>
<property name="y_options">fill</property> <property name="y_options">fill</property>
</packing> </packing>
@ -5916,80 +5920,6 @@ Match braces</property>
</packing> </packing>
</child> </child>
<child>
<widget class="GtkAlignment" id="alignment41">
<property name="visible">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xscale">1</property>
<property name="yscale">1</property>
<property name="top_padding">0</property>
<property name="bottom_padding">0</property>
<property name="left_padding">24</property>
<property name="right_padding">0</property>
<child>
<widget class="GtkHBox" id="hbox13">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">12</property>
<child>
<widget class="GtkLabel" id="label221">
<property name="visible">True</property>
<property name="label" translatable="yes">Hard tab width:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spin_tab_width">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">The width of a tab when Tabs &amp; Spaces is set for a document</property>
<property name="can_focus">True</property>
<property name="climb_rate">1</property>
<property name="digits">0</property>
<property name="numeric">True</property>
<property name="update_policy">GTK_UPDATE_IF_VALID</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">True</property>
<property name="adjustment">8 1 99 1 10 0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">fill</property>
</packing>
</child>
<child> <child>
<widget class="GtkCheckButton" id="check_detect_indent"> <widget class="GtkCheckButton" id="check_detect_indent">
<property name="visible">True</property> <property name="visible">True</property>
@ -6006,8 +5936,8 @@ Match braces</property>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">5</property> <property name="top_attach">4</property>
<property name="bottom_attach">6</property> <property name="bottom_attach">5</property>
<property name="x_options">fill</property> <property name="x_options">fill</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
@ -9645,6 +9575,7 @@ Match braces</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property> <property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>
<property name="has_separator">True</property> <property name="has_separator">True</property>
<child internal-child="vbox"> <child internal-child="vbox">
@ -9706,7 +9637,7 @@ Match braces</property>
<widget class="GtkTable" id="table17"> <widget class="GtkTable" id="table17">
<property name="border_width">6</property> <property name="border_width">6</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="n_rows">7</property> <property name="n_rows">6</property>
<property name="n_columns">2</property> <property name="n_columns">2</property>
<property name="homogeneous">False</property> <property name="homogeneous">False</property>
<property name="row_spacing">3</property> <property name="row_spacing">3</property>
@ -9733,8 +9664,8 @@ Match braces</property>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="right_attach">1</property> <property name="right_attach">1</property>
<property name="top_attach">6</property> <property name="top_attach">5</property>
<property name="bottom_attach">7</property> <property name="bottom_attach">6</property>
<property name="x_options">fill</property> <property name="x_options">fill</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
@ -9753,8 +9684,8 @@ Match braces</property>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">6</property> <property name="top_attach">5</property>
<property name="bottom_attach">7</property> <property name="bottom_attach">6</property>
<property name="x_options">fill</property> <property name="x_options">fill</property>
<property name="y_options">fill</property> <property name="y_options">fill</property>
</packing> </packing>
@ -9922,88 +9853,13 @@ Match braces</property>
<property name="inconsistent">False</property> <property name="inconsistent">False</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
</widget> </widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment44">
<property name="visible">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xscale">1</property>
<property name="yscale">1</property>
<property name="top_padding">0</property>
<property name="bottom_padding">0</property>
<property name="left_padding">24</property>
<property name="right_padding">0</property>
<child>
<widget class="GtkHBox" id="hbox14">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">12</property>
<child>
<widget class="GtkLabel" id="label231">
<property name="visible">True</property>
<property name="label" translatable="yes">Hard tab width:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spin_tab_width">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">The width of a tab when Tabs &amp; Spaces is set for a document</property>
<property name="can_focus">True</property>
<property name="climb_rate">1</property>
<property name="digits">0</property>
<property name="numeric">True</property>
<property name="update_policy">GTK_UPDATE_IF_VALID</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">True</property>
<property name="adjustment">8 1 99 1 10 0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">4</property> <property name="top_attach">4</property>
<property name="bottom_attach">5</property> <property name="bottom_attach">5</property>
<property name="x_options">fill</property> <property name="x_options">fill</property>
<property name="y_options">fill</property> <property name="y_options"></property>
</packing> </packing>
</child> </child>
</widget> </widget>

View File

@ -2449,11 +2449,6 @@ create_prefs_dialog (void)
GSList *radio_indent_spaces_group = NULL; GSList *radio_indent_spaces_group = NULL;
GtkWidget *radio_indent_tabs; GtkWidget *radio_indent_tabs;
GtkWidget *radio_indent_both; GtkWidget *radio_indent_both;
GtkWidget *alignment41;
GtkWidget *hbox13;
GtkWidget *label221;
GtkObject *spin_tab_width_adj;
GtkWidget *spin_tab_width;
GtkWidget *check_detect_indent; GtkWidget *check_detect_indent;
GtkWidget *check_tab_key_indents; GtkWidget *check_tab_key_indents;
GtkWidget *label195; GtkWidget *label195;
@ -3555,7 +3550,7 @@ create_prefs_dialog (void)
gtk_widget_show (vbox25); gtk_widget_show (vbox25);
gtk_container_add (GTK_CONTAINER (alignment30), vbox25); gtk_container_add (GTK_CONTAINER (alignment30), vbox25);
table13 = gtk_table_new (7, 2, FALSE); table13 = gtk_table_new (6, 2, FALSE);
gtk_widget_show (table13); gtk_widget_show (table13);
gtk_box_pack_start (GTK_BOX (vbox25), table13, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox25), table13, FALSE, TRUE, 0);
gtk_table_set_row_spacings (GTK_TABLE (table13), 3); gtk_table_set_row_spacings (GTK_TABLE (table13), 3);
@ -3563,14 +3558,14 @@ create_prefs_dialog (void)
label183 = gtk_label_new (_("Auto-indent mode:")); label183 = gtk_label_new (_("Auto-indent mode:"));
gtk_widget_show (label183); gtk_widget_show (label183);
gtk_table_attach (GTK_TABLE (table13), label183, 0, 1, 6, 7, gtk_table_attach (GTK_TABLE (table13), label183, 0, 1, 5, 6,
(GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0); (GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label183), 0, 0.5); gtk_misc_set_alignment (GTK_MISC (label183), 0, 0.5);
combo_auto_indent_mode = gtk_combo_box_new_text (); combo_auto_indent_mode = gtk_combo_box_new_text ();
gtk_widget_show (combo_auto_indent_mode); gtk_widget_show (combo_auto_indent_mode);
gtk_table_attach (GTK_TABLE (table13), combo_auto_indent_mode, 1, 2, 6, 7, gtk_table_attach (GTK_TABLE (table13), combo_auto_indent_mode, 1, 2, 5, 6,
(GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0); (GtkAttachOptions) (GTK_FILL), 0, 0);
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_auto_indent_mode), _("None")); gtk_combo_box_append_text (GTK_COMBO_BOX (combo_auto_indent_mode), _("None"));
@ -3630,33 +3625,9 @@ create_prefs_dialog (void)
gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_indent_both), radio_indent_spaces_group); gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_indent_both), radio_indent_spaces_group);
radio_indent_spaces_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_indent_both)); radio_indent_spaces_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_indent_both));
alignment41 = gtk_alignment_new (0.5, 0.5, 1, 1);
gtk_widget_show (alignment41);
gtk_table_attach (GTK_TABLE (table13), alignment41, 1, 2, 4, 5,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment41), 0, 0, 24, 0);
hbox13 = gtk_hbox_new (FALSE, 12);
gtk_widget_show (hbox13);
gtk_container_add (GTK_CONTAINER (alignment41), hbox13);
label221 = gtk_label_new (_("Hard tab width:"));
gtk_widget_show (label221);
gtk_box_pack_start (GTK_BOX (hbox13), label221, FALSE, FALSE, 0);
spin_tab_width_adj = gtk_adjustment_new (8, 1, 99, 1, 10, 0);
spin_tab_width = gtk_spin_button_new (GTK_ADJUSTMENT (spin_tab_width_adj), 1, 0);
gtk_widget_show (spin_tab_width);
gtk_box_pack_start (GTK_BOX (hbox13), spin_tab_width, TRUE, TRUE, 0);
gtk_tooltips_set_tip (tooltips, spin_tab_width, _("The width of a tab when Tabs & Spaces is set for a document"), NULL);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin_tab_width), TRUE);
gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spin_tab_width), GTK_UPDATE_IF_VALID);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spin_tab_width), TRUE);
check_detect_indent = gtk_check_button_new_with_mnemonic (_("Detect from file")); check_detect_indent = gtk_check_button_new_with_mnemonic (_("Detect from file"));
gtk_widget_show (check_detect_indent); gtk_widget_show (check_detect_indent);
gtk_table_attach (GTK_TABLE (table13), check_detect_indent, 1, 2, 5, 6, gtk_table_attach (GTK_TABLE (table13), check_detect_indent, 1, 2, 4, 5,
(GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0); (GtkAttachOptions) (0), 0, 0);
gtk_tooltips_set_tip (tooltips, check_detect_indent, _("Whether to detect the indentation type from file contents when a file is opened"), NULL); gtk_tooltips_set_tip (tooltips, check_detect_indent, _("Whether to detect the indentation type from file contents when a file is opened"), NULL);
@ -4930,10 +4901,6 @@ create_prefs_dialog (void)
GLADE_HOOKUP_OBJECT (prefs_dialog, radio_indent_spaces, "radio_indent_spaces"); GLADE_HOOKUP_OBJECT (prefs_dialog, radio_indent_spaces, "radio_indent_spaces");
GLADE_HOOKUP_OBJECT (prefs_dialog, radio_indent_tabs, "radio_indent_tabs"); GLADE_HOOKUP_OBJECT (prefs_dialog, radio_indent_tabs, "radio_indent_tabs");
GLADE_HOOKUP_OBJECT (prefs_dialog, radio_indent_both, "radio_indent_both"); GLADE_HOOKUP_OBJECT (prefs_dialog, radio_indent_both, "radio_indent_both");
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment41, "alignment41");
GLADE_HOOKUP_OBJECT (prefs_dialog, hbox13, "hbox13");
GLADE_HOOKUP_OBJECT (prefs_dialog, label221, "label221");
GLADE_HOOKUP_OBJECT (prefs_dialog, spin_tab_width, "spin_tab_width");
GLADE_HOOKUP_OBJECT (prefs_dialog, check_detect_indent, "check_detect_indent"); GLADE_HOOKUP_OBJECT (prefs_dialog, check_detect_indent, "check_detect_indent");
GLADE_HOOKUP_OBJECT (prefs_dialog, check_tab_key_indents, "check_tab_key_indents"); GLADE_HOOKUP_OBJECT (prefs_dialog, check_tab_key_indents, "check_tab_key_indents");
GLADE_HOOKUP_OBJECT (prefs_dialog, label195, "label195"); GLADE_HOOKUP_OBJECT (prefs_dialog, label195, "label195");
@ -5158,11 +5125,6 @@ create_project_dialog (void)
GtkWidget *radio_indent_tabs; GtkWidget *radio_indent_tabs;
GtkWidget *radio_indent_both; GtkWidget *radio_indent_both;
GtkWidget *check_detect_indent; GtkWidget *check_detect_indent;
GtkWidget *alignment44;
GtkWidget *hbox14;
GtkWidget *label231;
GtkObject *spin_tab_width_adj;
GtkWidget *spin_tab_width;
GtkWidget *label227; GtkWidget *label227;
GtkWidget *vbox47; GtkWidget *vbox47;
GtkWidget *frame40; GtkWidget *frame40;
@ -5196,7 +5158,7 @@ create_project_dialog (void)
gtk_widget_show (project_notebook); gtk_widget_show (project_notebook);
gtk_box_pack_start (GTK_BOX (dialog_vbox4), project_notebook, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (dialog_vbox4), project_notebook, TRUE, TRUE, 0);
table17 = gtk_table_new (7, 2, FALSE); table17 = gtk_table_new (6, 2, FALSE);
gtk_widget_show (table17); gtk_widget_show (table17);
gtk_container_add (GTK_CONTAINER (project_notebook), table17); gtk_container_add (GTK_CONTAINER (project_notebook), table17);
gtk_container_set_border_width (GTK_CONTAINER (table17), 6); gtk_container_set_border_width (GTK_CONTAINER (table17), 6);
@ -5205,14 +5167,14 @@ create_project_dialog (void)
label228 = gtk_label_new (_("Auto-indent mode:")); label228 = gtk_label_new (_("Auto-indent mode:"));
gtk_widget_show (label228); gtk_widget_show (label228);
gtk_table_attach (GTK_TABLE (table17), label228, 0, 1, 6, 7, gtk_table_attach (GTK_TABLE (table17), label228, 0, 1, 5, 6,
(GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0); (GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label228), 0, 0.5); gtk_misc_set_alignment (GTK_MISC (label228), 0, 0.5);
combo_auto_indent_mode = gtk_combo_box_new_text (); combo_auto_indent_mode = gtk_combo_box_new_text ();
gtk_widget_show (combo_auto_indent_mode); gtk_widget_show (combo_auto_indent_mode);
gtk_table_attach (GTK_TABLE (table17), combo_auto_indent_mode, 1, 2, 6, 7, gtk_table_attach (GTK_TABLE (table17), combo_auto_indent_mode, 1, 2, 5, 6,
(GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0); (GtkAttachOptions) (GTK_FILL), 0, 0);
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_auto_indent_mode), _("None")); gtk_combo_box_append_text (GTK_COMBO_BOX (combo_auto_indent_mode), _("None"));
@ -5274,35 +5236,11 @@ create_project_dialog (void)
check_detect_indent = gtk_check_button_new_with_mnemonic (_("Detect from file")); check_detect_indent = gtk_check_button_new_with_mnemonic (_("Detect from file"));
gtk_widget_show (check_detect_indent); gtk_widget_show (check_detect_indent);
gtk_table_attach (GTK_TABLE (table17), check_detect_indent, 1, 2, 5, 6, gtk_table_attach (GTK_TABLE (table17), check_detect_indent, 1, 2, 4, 5,
(GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0); (GtkAttachOptions) (0), 0, 0);
gtk_tooltips_set_tip (tooltips, check_detect_indent, _("Whether to detect the indentation type from file contents when a file is opened"), NULL); gtk_tooltips_set_tip (tooltips, check_detect_indent, _("Whether to detect the indentation type from file contents when a file is opened"), NULL);
alignment44 = gtk_alignment_new (0.5, 0.5, 1, 1);
gtk_widget_show (alignment44);
gtk_table_attach (GTK_TABLE (table17), alignment44, 1, 2, 4, 5,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0);
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment44), 0, 0, 24, 0);
hbox14 = gtk_hbox_new (FALSE, 12);
gtk_widget_show (hbox14);
gtk_container_add (GTK_CONTAINER (alignment44), hbox14);
label231 = gtk_label_new (_("Hard tab width:"));
gtk_widget_show (label231);
gtk_box_pack_start (GTK_BOX (hbox14), label231, FALSE, FALSE, 0);
spin_tab_width_adj = gtk_adjustment_new (8, 1, 99, 1, 10, 0);
spin_tab_width = gtk_spin_button_new (GTK_ADJUSTMENT (spin_tab_width_adj), 1, 0);
gtk_widget_show (spin_tab_width);
gtk_box_pack_start (GTK_BOX (hbox14), spin_tab_width, TRUE, TRUE, 0);
gtk_tooltips_set_tip (tooltips, spin_tab_width, _("The width of a tab when Tabs & Spaces is set for a document"), NULL);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin_tab_width), TRUE);
gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spin_tab_width), GTK_UPDATE_IF_VALID);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spin_tab_width), TRUE);
label227 = gtk_label_new (_("Indentation")); label227 = gtk_label_new (_("Indentation"));
gtk_widget_show (label227); gtk_widget_show (label227);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (project_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (project_notebook), 0), label227); gtk_notebook_set_tab_label (GTK_NOTEBOOK (project_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (project_notebook), 0), label227);
@ -5412,10 +5350,6 @@ create_project_dialog (void)
GLADE_HOOKUP_OBJECT (project_dialog, radio_indent_tabs, "radio_indent_tabs"); GLADE_HOOKUP_OBJECT (project_dialog, radio_indent_tabs, "radio_indent_tabs");
GLADE_HOOKUP_OBJECT (project_dialog, radio_indent_both, "radio_indent_both"); GLADE_HOOKUP_OBJECT (project_dialog, radio_indent_both, "radio_indent_both");
GLADE_HOOKUP_OBJECT (project_dialog, check_detect_indent, "check_detect_indent"); GLADE_HOOKUP_OBJECT (project_dialog, check_detect_indent, "check_detect_indent");
GLADE_HOOKUP_OBJECT (project_dialog, alignment44, "alignment44");
GLADE_HOOKUP_OBJECT (project_dialog, hbox14, "hbox14");
GLADE_HOOKUP_OBJECT (project_dialog, label231, "label231");
GLADE_HOOKUP_OBJECT (project_dialog, spin_tab_width, "spin_tab_width");
GLADE_HOOKUP_OBJECT (project_dialog, label227, "label227"); GLADE_HOOKUP_OBJECT (project_dialog, label227, "label227");
GLADE_HOOKUP_OBJECT (project_dialog, vbox47, "vbox47"); GLADE_HOOKUP_OBJECT (project_dialog, vbox47, "vbox47");
GLADE_HOOKUP_OBJECT (project_dialog, frame40, "frame40"); GLADE_HOOKUP_OBJECT (project_dialog, frame40, "frame40");

View File

@ -144,8 +144,6 @@ static void init_pref_groups(void)
"use_tab_to_indent", TRUE, "check_tab_key_indents"); "use_tab_to_indent", TRUE, "check_tab_key_indents");
stash_group_add_spin_button_integer(group, &editor_prefs.indentation->width, stash_group_add_spin_button_integer(group, &editor_prefs.indentation->width,
"pref_editor_tab_width", 4, "spin_indent_width"); "pref_editor_tab_width", 4, "spin_indent_width");
stash_group_add_spin_button_integer(group, &editor_prefs.indentation->hard_tab_width,
"indent_hard_tab_width", 8, "spin_tab_width");
stash_group_add_combo_box(group, (gint*)(void*)&editor_prefs.indentation->auto_indent_mode, stash_group_add_combo_box(group, (gint*)(void*)&editor_prefs.indentation->auto_indent_mode,
"indent_mode", GEANY_AUTOINDENT_CURRENTCHARS, "combo_auto_indent_mode"); "indent_mode", GEANY_AUTOINDENT_CURRENTCHARS, "combo_auto_indent_mode");
stash_group_add_radio_buttons(group, (gint*)(void*)&editor_prefs.indentation->type, stash_group_add_radio_buttons(group, (gint*)(void*)&editor_prefs.indentation->type,
@ -180,6 +178,7 @@ static void init_pref_groups(void)
group = stash_group_new(PACKAGE); group = stash_group_new(PACKAGE);
configuration_add_pref_group(group, FALSE); configuration_add_pref_group(group, FALSE);
stash_group_set_write_once(group, TRUE); stash_group_set_write_once(group, TRUE);
stash_group_add_boolean(group, &editor_prefs.show_scrollbars, stash_group_add_boolean(group, &editor_prefs.show_scrollbars,
"show_editor_scrollbars", TRUE); "show_editor_scrollbars", TRUE);
stash_group_add_boolean(group, &editor_prefs.brace_match_ltgt, stash_group_add_boolean(group, &editor_prefs.brace_match_ltgt,
@ -194,6 +193,9 @@ static void init_pref_groups(void)
"allow_always_save", FALSE); "allow_always_save", FALSE);
stash_group_add_boolean(group, &file_prefs.use_safe_file_saving, stash_group_add_boolean(group, &file_prefs.use_safe_file_saving,
"use_safe_file_saving", FALSE); "use_safe_file_saving", FALSE);
/* for backwards-compatibility */
stash_group_add_integer(group, &editor_prefs.indentation->hard_tab_width,
"indent_hard_tab_width", 8);
} }

View File

@ -406,7 +406,6 @@ static void create_properties_dialog(PropertyDialogElements *e)
gtk_widget_set_name(e->dialog, "GeanyDialogProject"); gtk_widget_set_name(e->dialog, "GeanyDialogProject");
ui_entry_add_clear_icon(GTK_ENTRY(ui_lookup_widget(e->dialog, "spin_indent_width"))); ui_entry_add_clear_icon(GTK_ENTRY(ui_lookup_widget(e->dialog, "spin_indent_width")));
ui_entry_add_clear_icon(GTK_ENTRY(ui_lookup_widget(e->dialog, "spin_tab_width")));
table = gtk_table_new(6, 2, FALSE); table = gtk_table_new(6, 2, FALSE);
gtk_container_set_border_width(GTK_CONTAINER(table), 6); gtk_container_set_border_width(GTK_CONTAINER(table), 6);
@ -1209,8 +1208,9 @@ void project_init(void)
"radio_indent_tabs", GEANY_INDENT_TYPE_TABS, "radio_indent_tabs", GEANY_INDENT_TYPE_TABS,
"radio_indent_both", GEANY_INDENT_TYPE_BOTH, "radio_indent_both", GEANY_INDENT_TYPE_BOTH,
NULL); NULL);
stash_group_add_spin_button_integer(group, &indentation.hard_tab_width, /* This is a 'hidden' pref for backwards-compatibility */
"indent_hard_tab_width", 8, "spin_tab_width"); stash_group_add_integer(group, &indentation.hard_tab_width,
"indent_hard_tab_width", 8);
stash_group_add_toggle_button(group, &indentation.detect_type, stash_group_add_toggle_button(group, &indentation.detect_type,
"detect_indent", FALSE, "check_detect_indent"); "detect_indent", FALSE, "check_detect_indent");
stash_group_add_combo_box(group, (gint*)(gpointer)&indentation.auto_indent_mode, stash_group_add_combo_box(group, (gint*)(gpointer)&indentation.auto_indent_mode,