SF.net SVN: geany:[2827] branches/custom-tab-width
ntrel at users.sourceforge.net
ntrel at xxxxx
Mon Jul 28 11:52:19 UTC 2008
Revision: 2827
http://geany.svn.sourceforge.net/geany/?rev=2827&view=rev
Author: ntrel
Date: 2008-07-28 11:52:19 +0000 (Mon, 28 Jul 2008)
Log Message:
-----------
Replace 'Custom tab width' option with a 'Tabs & Spaces' Indent Type
radio option, and a Tab Width spin entry.
Replace GeanyIndentPrefs::use_tabs with GeanyIndentType field 'type'.
(Still won't compile ;-)).
Modified Paths:
--------------
branches/custom-tab-width/ChangeLog
branches/custom-tab-width/geany.glade
branches/custom-tab-width/src/editor.h
branches/custom-tab-width/src/interface.c
Modified: branches/custom-tab-width/ChangeLog
===================================================================
--- branches/custom-tab-width/ChangeLog 2008-07-27 18:42:21 UTC (rev 2826)
+++ branches/custom-tab-width/ChangeLog 2008-07-28 11:52:19 UTC (rev 2827)
@@ -1,3 +1,12 @@
+2008-07-28 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/interface.c, src/editor.h, geany.glade:
+ Replace 'Custom tab width' option with a 'Tabs & Spaces' Indent Type
+ radio option, and a Tab Width spin entry.
+ Replace GeanyIndentPrefs::use_tabs with GeanyIndentType field 'type'.
+ (Still won't compile ;-)).
+
+
2008-07-25 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/plugindata.h, src/main.c, src/editor.c, src/editor.h:
Modified: branches/custom-tab-width/geany.glade
===================================================================
--- branches/custom-tab-width/geany.glade 2008-07-27 18:42:21 UTC (rev 2826)
+++ branches/custom-tab-width/geany.glade 2008-07-28 11:52:19 UTC (rev 2827)
@@ -5354,7 +5354,7 @@
<child>
<widget class="GtkTable" id="table13">
<property name="visible">True</property>
- <property name="n_rows">5</property>
+ <property name="n_rows">7</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
<property name="row_spacing">3</property>
@@ -5369,7 +5369,7 @@
<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="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
@@ -5381,8 +5381,8 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@@ -5401,70 +5401,14 @@
<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="top_attach">6</property>
+ <property name="bottom_attach">7</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox8">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkRadioButton" id="radio_indent_tabs">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Whether to use tabs or spaces when indentation is inserted.</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Tabs</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="radio_indent_spaces">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Whether to use tabs or spaces when indentation is inserted.</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Spaces</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">radio_indent_tabs</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- </packing>
- </child>
-
- <child>
<widget class="GtkLabel" id="label200">
<property name="visible">True</property>
<property name="label" translatable="yes">Type:</property>
@@ -5485,29 +5429,6 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="check_detect_indent">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Whether to detect the indentation type from file contents when a file is opened.</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Detect from file</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <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="x_options">fill</property>
@@ -5536,8 +5457,8 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@@ -5559,56 +5480,179 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="radio_indent_spaces">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Use spaces when inserting indentation</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Spaces</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="check_custom_tab_width">
+ <widget class="GtkRadioButton" id="radio_indent_tabs">
<property name="visible">True</property>
- <property name="tooltip" translatable="yes">Make tabs have a different size from the indent width</property>
+ <property name="tooltip" translatable="yes">Use one tab per indent</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">Custom tab width:</property>
+ <property name="label" translatable="yes">_Tabs</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
+ <property name="group">radio_indent_spaces</property>
</widget>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <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="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkSpinButton" id="spin_tab_width">
+ <widget class="GtkRadioButton" id="radio_indent_both">
<property name="visible">True</property>
- <property name="tooltip" translatable="yes">The width in chars, which one tab character will take</property>
+ <property name="tooltip" translatable="yes">Use spaces if the total indent is less than the tab width, otherwise use both</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">1 1 99 1 10 10</property>
+ <property name="label" translatable="yes">T_abs & Spaces</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">radio_indent_spaces</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
+ <property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</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="hbox12">
+ <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">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 & 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 10</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>
+ <widget class="GtkCheckButton" id="check_detect_indent">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Whether to detect the indentation type from file contents when a file is opened.</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Detect from file</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </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>
</widget>
<packing>
<property name="padding">0</property>
Modified: branches/custom-tab-width/src/editor.h
===================================================================
--- branches/custom-tab-width/src/editor.h 2008-07-27 18:42:21 UTC (rev 2826)
+++ branches/custom-tab-width/src/editor.h 2008-07-28 11:52:19 UTC (rev 2827)
@@ -45,22 +45,32 @@
#define SSM(s, m, w, l) scintilla_send_message(s, m, w, l)
+/** Whether to use tabs, spaces or both to indent. */
typedef enum
{
- INDENT_NONE = 0,
- INDENT_BASIC,
- INDENT_CURRENTCHARS,
- INDENT_MATCHBRACES
-} GeanyIndentMode;
+ GEANY_INDENT_TYPE_TABS /**< Tabs. */
+ GEANY_INDENT_TYPE_SPACES /**< Spaces. */
+ GEANY_INDENT_TYPE_BOTH /**< Both. */
+}
+GeanyIndentType;
+typedef enum
+{
+ GEANY_AUTOINDENT_NONE = 0,
+ GEANY_AUTOINDENT_BASIC,
+ GEANY_AUTOINDENT_CURRENTCHARS,
+ GEANY_AUTOINDENT_MATCHBRACES
+}
+GeanyAutoIndent;
+
+
typedef struct GeanyIndentPrefs
{
- gint width; /**< Indent width. */
- gint tab_width; /**< Width of a tab, if @c custom_tab_width is set. */
- gboolean custom_tab_width; /**< Whether a tab is a different size from an indent. */
- gboolean use_tabs; /**< Whether to (mainly) use tabs or spaces to indent. */
- gboolean use_tab_to_indent; /* hidden pref */
- GeanyIndentMode mode;
+ gint width; /**< Indent width. */
+ GeanyIndentType type; /**< Whether to use tabs, spaces or both to indent. */
+ gint tab_width; /**< Width of a tab, when using GEANY_INDENT_TYPE_BOTH. */
+ gboolean use_tab_to_indent; /* hidden pref makes pressing Tab key like Ctrl-I */
+ GeanyAutoIndent auto_indent_mode;
}
GeanyIndentPrefs;
Modified: branches/custom-tab-width/src/interface.c
===================================================================
--- branches/custom-tab-width/src/interface.c 2008-07-27 18:42:21 UTC (rev 2826)
+++ branches/custom-tab-width/src/interface.c 2008-07-28 11:52:19 UTC (rev 2827)
@@ -2669,18 +2669,20 @@
GtkWidget *table13;
GtkWidget *label183;
GtkWidget *combo_auto_indent_mode;
- GtkWidget *hbox8;
- GtkWidget *radio_indent_tabs;
- GSList *radio_indent_tabs_group = NULL;
- GtkWidget *radio_indent_spaces;
GtkWidget *label200;
- GtkWidget *check_detect_indent;
GtkWidget *label220;
GtkObject *spin_indent_width_adj;
GtkWidget *spin_indent_width;
- GtkWidget *check_custom_tab_width;
+ GtkWidget *radio_indent_spaces;
+ GSList *radio_indent_spaces_group = NULL;
+ GtkWidget *radio_indent_tabs;
+ GtkWidget *radio_indent_both;
+ GtkWidget *alignment41;
+ GtkWidget *hbox12;
+ GtkWidget *label221;
GtkObject *spin_tab_width_adj;
GtkWidget *spin_tab_width;
+ GtkWidget *check_detect_indent;
GtkWidget *label195;
GtkWidget *frame14;
GtkWidget *alignment17;
@@ -3591,7 +3593,7 @@
gtk_widget_show (vbox25);
gtk_container_add (GTK_CONTAINER (alignment30), vbox25);
- table13 = gtk_table_new (5, 2, FALSE);
+ table13 = gtk_table_new (7, 2, FALSE);
gtk_widget_show (table13);
gtk_box_pack_start (GTK_BOX (vbox25), table13, FALSE, TRUE, 0);
gtk_table_set_row_spacings (GTK_TABLE (table13), 3);
@@ -3599,13 +3601,14 @@
label183 = gtk_label_new (_("Auto-indent mode:"));
gtk_widget_show (label183);
- gtk_table_attach (GTK_TABLE (table13), label183, 0, 1, 4, 5,
+ gtk_table_attach (GTK_TABLE (table13), label183, 0, 1, 6, 7,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label183), 0, 0.5);
combo_auto_indent_mode = gtk_combo_box_new_text ();
gtk_widget_show (combo_auto_indent_mode);
- gtk_table_attach (GTK_TABLE (table13), combo_auto_indent_mode, 1, 2, 4, 5,
+ gtk_table_attach (GTK_TABLE (table13), combo_auto_indent_mode, 1, 2, 6, 7,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0);
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_auto_indent_mode), _("None"));
@@ -3613,43 +3616,16 @@
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_auto_indent_mode), _("Current chars"));
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_auto_indent_mode), _("Match braces"));
- hbox8 = gtk_hbox_new (FALSE, 12);
- gtk_widget_show (hbox8);
- gtk_table_attach (GTK_TABLE (table13), hbox8, 1, 2, 0, 1,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
-
- radio_indent_tabs = gtk_radio_button_new_with_mnemonic (NULL, _("_Tabs"));
- gtk_widget_show (radio_indent_tabs);
- gtk_box_pack_start (GTK_BOX (hbox8), radio_indent_tabs, FALSE, FALSE, 0);
- gtk_tooltips_set_tip (tooltips, radio_indent_tabs, _("Whether to use tabs or spaces when indentation is inserted."), NULL);
- gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_indent_tabs), radio_indent_tabs_group);
- radio_indent_tabs_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_indent_tabs));
-
- radio_indent_spaces = gtk_radio_button_new_with_mnemonic (NULL, _("_Spaces"));
- gtk_widget_show (radio_indent_spaces);
- gtk_box_pack_start (GTK_BOX (hbox8), radio_indent_spaces, FALSE, FALSE, 0);
- gtk_tooltips_set_tip (tooltips, radio_indent_spaces, _("Whether to use tabs or spaces when indentation is inserted."), NULL);
- gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_indent_spaces), radio_indent_tabs_group);
- radio_indent_tabs_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_indent_spaces));
-
label200 = gtk_label_new (_("Type:"));
gtk_widget_show (label200);
- gtk_table_attach (GTK_TABLE (table13), label200, 0, 1, 0, 1,
+ gtk_table_attach (GTK_TABLE (table13), label200, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label200), 0, 0.5);
- check_detect_indent = gtk_check_button_new_with_mnemonic (_("Detect from file"));
- gtk_widget_show (check_detect_indent);
- gtk_table_attach (GTK_TABLE (table13), check_detect_indent, 1, 2, 1, 2,
- (GtkAttachOptions) (GTK_FILL),
- (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);
-
label220 = gtk_label_new (_("Width:"));
gtk_widget_show (label220);
- gtk_table_attach (GTK_TABLE (table13), label220, 0, 1, 2, 3,
+ gtk_table_attach (GTK_TABLE (table13), label220, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label220), 0, 0.5);
@@ -3657,7 +3633,7 @@
spin_indent_width_adj = gtk_adjustment_new (1, 1, 99, 1, 10, 10);
spin_indent_width = gtk_spin_button_new (GTK_ADJUSTMENT (spin_indent_width_adj), 1, 0);
gtk_widget_show (spin_indent_width);
- gtk_table_attach (GTK_TABLE (table13), spin_indent_width, 1, 2, 2, 3,
+ gtk_table_attach (GTK_TABLE (table13), spin_indent_width, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_tooltips_set_tip (tooltips, spin_indent_width, _("The width in chars of a single indent"), NULL);
@@ -3665,24 +3641,64 @@
gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spin_indent_width), GTK_UPDATE_IF_VALID);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spin_indent_width), TRUE);
- check_custom_tab_width = gtk_check_button_new_with_mnemonic (_("Custom tab width:"));
- gtk_widget_show (check_custom_tab_width);
- gtk_table_attach (GTK_TABLE (table13), check_custom_tab_width, 0, 1, 3, 4,
+ radio_indent_spaces = gtk_radio_button_new_with_mnemonic (NULL, _("_Spaces"));
+ gtk_widget_show (radio_indent_spaces);
+ gtk_table_attach (GTK_TABLE (table13), radio_indent_spaces, 1, 2, 2, 3,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
- gtk_tooltips_set_tip (tooltips, check_custom_tab_width, _("Make tabs have a different size from the indent width"), NULL);
+ gtk_tooltips_set_tip (tooltips, radio_indent_spaces, _("Use spaces when inserting indentation"), NULL);
+ gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_indent_spaces), radio_indent_spaces_group);
+ radio_indent_spaces_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_indent_spaces));
- spin_tab_width_adj = gtk_adjustment_new (1, 1, 99, 1, 10, 10);
+ radio_indent_tabs = gtk_radio_button_new_with_mnemonic (NULL, _("_Tabs"));
+ gtk_widget_show (radio_indent_tabs);
+ gtk_table_attach (GTK_TABLE (table13), radio_indent_tabs, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_tooltips_set_tip (tooltips, radio_indent_tabs, _("Use one tab per indent"), NULL);
+ gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_indent_tabs), radio_indent_spaces_group);
+ radio_indent_spaces_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_indent_tabs));
+
+ radio_indent_both = gtk_radio_button_new_with_mnemonic (NULL, _("T_abs & Spaces"));
+ gtk_widget_show (radio_indent_both);
+ gtk_table_attach (GTK_TABLE (table13), radio_indent_both, 1, 2, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_tooltips_set_tip (tooltips, radio_indent_both, _("Use spaces if the total indent is less than the tab width, otherwise use both"), NULL);
+ 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));
+
+ 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);
+
+ hbox12 = gtk_hbox_new (FALSE, 12);
+ gtk_widget_show (hbox12);
+ gtk_container_add (GTK_CONTAINER (alignment41), hbox12);
+
+ label221 = gtk_label_new (_("Tab Width:"));
+ gtk_widget_show (label221);
+ gtk_box_pack_start (GTK_BOX (hbox12), label221, FALSE, FALSE, 0);
+
+ spin_tab_width_adj = gtk_adjustment_new (8, 1, 99, 1, 10, 10);
spin_tab_width = gtk_spin_button_new (GTK_ADJUSTMENT (spin_tab_width_adj), 1, 0);
gtk_widget_show (spin_tab_width);
- gtk_table_attach (GTK_TABLE (table13), spin_tab_width, 1, 2, 3, 4,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- gtk_tooltips_set_tip (tooltips, spin_tab_width, _("The width in chars, which one tab character will take"), NULL);
+ gtk_box_pack_start (GTK_BOX (hbox12), 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"));
+ gtk_widget_show (check_detect_indent);
+ gtk_table_attach (GTK_TABLE (table13), check_detect_indent, 1, 2, 5, 6,
+ (GtkAttachOptions) (GTK_FILL),
+ (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);
+
label195 = gtk_label_new (_("<b>Indentation</b>"));
gtk_widget_show (label195);
gtk_frame_set_label_widget (GTK_FRAME (frame27), label195);
@@ -4886,15 +4902,17 @@
GLADE_HOOKUP_OBJECT (prefs_dialog, table13, "table13");
GLADE_HOOKUP_OBJECT (prefs_dialog, label183, "label183");
GLADE_HOOKUP_OBJECT (prefs_dialog, combo_auto_indent_mode, "combo_auto_indent_mode");
- GLADE_HOOKUP_OBJECT (prefs_dialog, hbox8, "hbox8");
- GLADE_HOOKUP_OBJECT (prefs_dialog, radio_indent_tabs, "radio_indent_tabs");
- GLADE_HOOKUP_OBJECT (prefs_dialog, radio_indent_spaces, "radio_indent_spaces");
GLADE_HOOKUP_OBJECT (prefs_dialog, label200, "label200");
- GLADE_HOOKUP_OBJECT (prefs_dialog, check_detect_indent, "check_detect_indent");
GLADE_HOOKUP_OBJECT (prefs_dialog, label220, "label220");
GLADE_HOOKUP_OBJECT (prefs_dialog, spin_indent_width, "spin_indent_width");
- GLADE_HOOKUP_OBJECT (prefs_dialog, check_custom_tab_width, "check_custom_tab_width");
+ 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_both, "radio_indent_both");
+ GLADE_HOOKUP_OBJECT (prefs_dialog, alignment41, "alignment41");
+ GLADE_HOOKUP_OBJECT (prefs_dialog, hbox12, "hbox12");
+ 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, label195, "label195");
GLADE_HOOKUP_OBJECT (prefs_dialog, frame14, "frame14");
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment17, "alignment17");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list