SF.net SVN: geany:[2822] branches/custom-tab-width

ntrel at users.sourceforge.net ntrel at xxxxx
Fri Jul 25 15:10:53 UTC 2008


Revision: 2822
          http://geany.svn.sourceforge.net/geany/?rev=2822&view=rev
Author:   ntrel
Date:     2008-07-25 15:10:53 +0000 (Fri, 25 Jul 2008)

Log Message:
-----------
Add separate Width indent pref.
Add 'Custom tab width' checkbox pref.

Modified Paths:
--------------
    branches/custom-tab-width/ChangeLog
    branches/custom-tab-width/geany.glade
    branches/custom-tab-width/src/interface.c

Modified: branches/custom-tab-width/ChangeLog
===================================================================
--- branches/custom-tab-width/ChangeLog	2008-07-25 15:05:27 UTC (rev 2821)
+++ branches/custom-tab-width/ChangeLog	2008-07-25 15:10:53 UTC (rev 2822)
@@ -5,6 +5,9 @@
    Add GeanyIndentPrefs struct from some GeanyEditorPrefs fields (maybe
    this struct will get used elsewhere too).
    Add editor_init().
+ * src/interface.c, geany.glade:
+   Add separate Width indent pref.
+   Add 'Custom tab width' checkbox pref.
 
 
 2008-07-25  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>

Modified: branches/custom-tab-width/geany.glade
===================================================================
--- branches/custom-tab-width/geany.glade	2008-07-25 15:05:27 UTC (rev 2821)
+++ branches/custom-tab-width/geany.glade	2008-07-25 15:10:53 UTC (rev 2822)
@@ -5354,7 +5354,7 @@
 			      <child>
 				<widget class="GtkTable" id="table13">
 				  <property name="visible">True</property>
-				  <property name="n_rows">4</property>
+				  <property name="n_rows">5</property>
 				  <property name="n_columns">2</property>
 				  <property name="homogeneous">False</property>
 				  <property name="row_spacing">3</property>
@@ -5381,8 +5381,8 @@
 				    <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="top_attach">4</property>
+				      <property name="bottom_attach">5</property>
 				      <property name="x_options">fill</property>
 				      <property name="y_options"></property>
 				    </packing>
@@ -5401,65 +5401,14 @@
 				    <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="top_attach">4</property>
+				      <property name="bottom_attach">5</property>
 				      <property name="x_options">fill</property>
 				      <property name="y_options">fill</property>
 				    </packing>
 				  </child>
 
 				  <child>
-				    <widget class="GtkSpinButton" id="spin_tab_width">
-				      <property name="visible">True</property>
-				      <property name="tooltip" translatable="yes">The width in chars, which one tab character will take</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>
-				    </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="GtkLabel" id="label116">
-				      <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</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="left_attach">0</property>
-				      <property name="right_attach">1</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="GtkHBox" id="hbox8">
 				      <property name="visible">True</property>
 				      <property name="homogeneous">False</property>
@@ -5565,6 +5514,101 @@
 				      <property name="y_options"></property>
 				    </packing>
 				  </child>
+
+				  <child>
+				    <widget class="GtkLabel" id="label220">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">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</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="left_attach">0</property>
+				      <property name="right_attach">1</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="GtkSpinButton" id="spin_indent_width">
+				      <property name="visible">True</property>
+				      <property name="tooltip" translatable="yes">The width in chars of a single indent</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>
+				    </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="y_options"></property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <widget class="GtkCheckButton" id="check_custom_tab_width">
+				      <property name="visible">True</property>
+				      <property name="tooltip" translatable="yes">Make tabs have a different size from the indent width</property>
+				      <property name="can_focus">True</property>
+				      <property name="label" translatable="yes">Custom tab width:</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">0</property>
+				      <property name="right_attach">1</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="GtkSpinButton" id="spin_tab_width">
+				      <property name="visible">True</property>
+				      <property name="tooltip" translatable="yes">The width in chars, which one tab character will take</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>
+				    </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="y_options"></property>
+				    </packing>
+				  </child>
 				</widget>
 				<packing>
 				  <property name="padding">0</property>

Modified: branches/custom-tab-width/src/interface.c
===================================================================
--- branches/custom-tab-width/src/interface.c	2008-07-25 15:05:27 UTC (rev 2821)
+++ branches/custom-tab-width/src/interface.c	2008-07-25 15:10:53 UTC (rev 2822)
@@ -2669,15 +2669,18 @@
   GtkWidget *table13;
   GtkWidget *label183;
   GtkWidget *combo_auto_indent_mode;
-  GtkObject *spin_tab_width_adj;
-  GtkWidget *spin_tab_width;
-  GtkWidget *label116;
   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;
+  GtkObject *spin_tab_width_adj;
+  GtkWidget *spin_tab_width;
   GtkWidget *label195;
   GtkWidget *frame14;
   GtkWidget *alignment17;
@@ -3588,7 +3591,7 @@
   gtk_widget_show (vbox25);
   gtk_container_add (GTK_CONTAINER (alignment30), vbox25);
 
-  table13 = gtk_table_new (4, 2, FALSE);
+  table13 = gtk_table_new (5, 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);
@@ -3596,13 +3599,13 @@
 
   label183 = gtk_label_new (_("Auto-indent mode:"));
   gtk_widget_show (label183);
-  gtk_table_attach (GTK_TABLE (table13), label183, 0, 1, 3, 4,
+  gtk_table_attach (GTK_TABLE (table13), label183, 0, 1, 4, 5,
                     (GtkAttachOptions) (GTK_FILL),
                     (GtkAttachOptions) (0), 0, 0);
 
   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, 3, 4,
+  gtk_table_attach (GTK_TABLE (table13), combo_auto_indent_mode, 1, 2, 4, 5,
                     (GtkAttachOptions) (GTK_FILL),
                     (GtkAttachOptions) (GTK_FILL), 0, 0);
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo_auto_indent_mode), _("None"));
@@ -3610,24 +3613,6 @@
   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"));
 
-  spin_tab_width_adj = gtk_adjustment_new (1, 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, 2, 3,
-                    (GtkAttachOptions) (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_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);
-
-  label116 = gtk_label_new (_("Tab width:"));
-  gtk_widget_show (label116);
-  gtk_table_attach (GTK_TABLE (table13), label116, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label116), 0, 0.5);
-
   hbox8 = gtk_hbox_new (FALSE, 12);
   gtk_widget_show (hbox8);
   gtk_table_attach (GTK_TABLE (table13), hbox8, 1, 2, 0, 1,
@@ -3662,6 +3647,42 @@
                     (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,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label220), 0, 0.5);
+
+  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,
+                    (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);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin_indent_width), TRUE);
+  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,
+                    (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);
+
+  spin_tab_width_adj = gtk_adjustment_new (1, 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_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);
+
   label195 = gtk_label_new (_("<b>Indentation</b>"));
   gtk_widget_show (label195);
   gtk_frame_set_label_widget (GTK_FRAME (frame27), label195);
@@ -4865,13 +4886,15 @@
   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, spin_tab_width, "spin_tab_width");
-  GLADE_HOOKUP_OBJECT (prefs_dialog, label116, "label116");
   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, spin_tab_width, "spin_tab_width");
   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