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

ntrel at users.sourceforge.net ntrel at xxxxx
Tue Jul 29 14:43:35 UTC 2008


Revision: 2833
          http://geany.svn.sourceforge.net/geany/?rev=2833&view=rev
Author:   ntrel
Date:     2008-07-29 14:43:34 +0000 (Tue, 29 Jul 2008)

Log Message:
-----------
Move detect_tab_mode editor pref to indentation pref 'detect_type'.

Modified Paths:
--------------
    branches/custom-tab-width/ChangeLog
    branches/custom-tab-width/src/editor.h
    branches/custom-tab-width/src/prefs.c

Modified: branches/custom-tab-width/ChangeLog
===================================================================
--- branches/custom-tab-width/ChangeLog	2008-07-28 17:31:33 UTC (rev 2832)
+++ branches/custom-tab-width/ChangeLog	2008-07-29 14:43:34 UTC (rev 2833)
@@ -1,3 +1,9 @@
+2008-07-29  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/prefs.c, src/editor.h:
+   Move detect_tab_mode editor pref to indentation pref 'detect_type'.
+
+
 2008-07-28  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
 
  * src/interface.c, src/editor.h, geany.glade:

Modified: branches/custom-tab-width/src/editor.h
===================================================================
--- branches/custom-tab-width/src/editor.h	2008-07-28 17:31:33 UTC (rev 2832)
+++ branches/custom-tab-width/src/editor.h	2008-07-29 14:43:34 UTC (rev 2833)
@@ -71,6 +71,7 @@
 	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;
+	gboolean		detect_type;
 }
 GeanyIndentPrefs;
 
@@ -106,7 +107,6 @@
 	gboolean	brace_match_ltgt;	/* whether to highlight < and > chars (hidden pref) */
 	gboolean	use_gtk_word_boundaries;	/* hidden pref */
 	gboolean	complete_snippets_whilst_editing;	/* hidden pref */
-	gboolean	detect_tab_mode;
 	gint		line_break_column;
 	gboolean	auto_continue_multiline;
 } GeanyEditorPrefs;

Modified: branches/custom-tab-width/src/prefs.c
===================================================================
--- branches/custom-tab-width/src/prefs.c	2008-07-28 17:31:33 UTC (rev 2832)
+++ branches/custom-tab-width/src/prefs.c	2008-07-29 14:43:34 UTC (rev 2833)
@@ -115,6 +115,8 @@
 		{"check_ask_suppress_search_dialogs", &search_prefs.suppress_dialogs},
 		{"check_search_use_current_word", &search_prefs.use_current_word},
 		{"check_fif_current_dir", &search_prefs.use_current_file_dir},
+
+		{"check_detect_indent", &editor_prefs.indentation->detect_type}
 	};
 
 	for (i = 0; i < G_N_ELEMENTS(items); i++)
@@ -167,7 +169,8 @@
 static void radio_items_foreach(PrefCallbackAction action)
 {
 	guint i;
-	/* Only add one widget per radio-group */
+	/* Only add one widget per radio-group; the setting is the index of the selected radio item
+	 * in the group. */
 	PrefEntry items[] =
 	{
 		{"radio_indent_spaces", &editor_prefs.indentation->type},
@@ -531,9 +534,6 @@
 	widget = lookup_widget(ui_widgets.prefs_dialog, "check_line_end");
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.show_line_endings);
 
-	widget = lookup_widget(ui_widgets.prefs_dialog, "check_detect_indent");
-	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.detect_tab_mode);
-
 	widget = lookup_widget(ui_widgets.prefs_dialog, "check_line_wrapping");
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.line_wrapping);
 
@@ -956,9 +956,6 @@
 		widget = lookup_widget(ui_widgets.prefs_dialog, "check_newline_strip");
 		editor_prefs.newline_strip = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
 
-		widget = lookup_widget(ui_widgets.prefs_dialog, "check_detect_indent");
-		editor_prefs.detect_tab_mode = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
-
 		widget = lookup_widget(ui_widgets.prefs_dialog, "check_auto_multiline");
 		editor_prefs.auto_continue_multiline = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
 


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