SF.net SVN: geany: [1834] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Tue Aug 28 15:45:54 UTC 2007


Revision: 1834
          http://geany.svn.sourceforge.net/geany/?rev=1834&view=rev
Author:   ntrel
Date:     2007-08-28 08:45:54 -0700 (Tue, 28 Aug 2007)

Log Message:
-----------
Add hidden editor preference 'use_gtk_word_boundaries'.
Add docs appendix 'Hidden preferences'.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/doc/geany.html
    trunk/doc/geany.txt
    trunk/src/document.c
    trunk/src/editor.h
    trunk/src/keyfile.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-08-28 15:10:13 UTC (rev 1833)
+++ trunk/ChangeLog	2007-08-28 15:45:54 UTC (rev 1834)
@@ -2,6 +2,10 @@
 
  * src/keyfile.c:
    Group settings in load_dialog_prefs() by dialog tab.
+ * src/keyfile.c, src/document.c, src/editor.h, doc/geany.txt,
+   doc/geany.html:
+   Add hidden editor preference 'use_gtk_word_boundaries'.
+   Add docs appendix 'Hidden preferences'.
 
 
 2007-08-28  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>

Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html	2007-08-28 15:10:13 UTC (rev 1833)
+++ trunk/doc/geany.html	2007-08-28 15:45:54 UTC (rev 1834)
@@ -3,10 +3,10 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
 <title>Geany</title>
 <meta name="authors" content="Enrico Tröger  Nick Treleaven  Frank Lanitz" />
-<meta name="date" content="2007-08-10" />
+<meta name="date" content="2007-08-16" />
 <style type="text/css">
 
 /*
@@ -133,7 +133,7 @@
 <br />Nick Treleaven
 <br />Frank Lanitz</td></tr>
 <tr><th class="docinfo-name">Date:</th>
-<td>2007-08-10</td></tr>
+<td>2007-08-16</td></tr>
 <tr><th class="docinfo-name">Version:</th>
 <td>0.12</td></tr>
 </tbody>
@@ -292,9 +292,10 @@
 <li><a class="reference" href="#keyboard-commands" id="id96" name="id96">Keyboard commands</a></li>
 </ul>
 </li>
-<li><a class="reference" href="#compile-time-options" id="id97" name="id97">Compile-time options</a></li>
-<li><a class="reference" href="#gnu-general-public-license" id="id98" name="id98">GNU General Public License</a></li>
-<li><a class="reference" href="#license-for-scintilla-and-scite" id="id99" name="id99">License for Scintilla and SciTE</a></li>
+<li><a class="reference" href="#hidden-preferences" id="id97" name="id97">Hidden preferences</a></li>
+<li><a class="reference" href="#compile-time-options" id="id98" name="id98">Compile-time options</a></li>
+<li><a class="reference" href="#gnu-general-public-license" id="id99" name="id99">GNU General Public License</a></li>
+<li><a class="reference" href="#license-for-scintilla-and-scite" id="id100" name="id100">License for Scintilla and SciTE</a></li>
 </ul>
 </div>
 <div class="section">
@@ -2348,21 +2349,6 @@
 <tr><td>Scroll down.</td>
 <td>Ctrl+Down</td>
 </tr>
-<tr><td>Line cut.</td>
-<td>Ctrl+L</td>
-</tr>
-<tr><td>Line copy.</td>
-<td>Ctrl+Shift+T</td>
-</tr>
-<tr><td>Line delete.</td>
-<td>Ctrl+Shift+L</td>
-</tr>
-<tr><td>Line transpose with previous.</td>
-<td>Ctrl+T</td>
-</tr>
-<tr><td>Selection duplicate.</td>
-<td>Ctrl+D</td>
-</tr>
 <tr><td>Previous paragraph. Shift extends selection.</td>
 <td>Ctrl+[</td>
 </tr>
@@ -2386,7 +2372,53 @@
 </div>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id97" id="compile-time-options" name="compile-time-options">Compile-time options</a></h1>
+<h1><a class="toc-backref" href="#id97" id="hidden-preferences" name="hidden-preferences">Hidden preferences</a></h1>
+<p>There are some uncommon preferences that are not shown in the Preferences
+dialog. These can be set by using a different editor to edit
+<tt class="docutils literal"><span class="pre">~/.geany/geany.conf</span></tt> when Geany is closed, or by using a different (or
+temporary) configuration directory for Geany. Otherwise, the configuration
+file changes are overwritten when Geany is closed.</p>
+<p>The table below refers to the key names in the configuration file, under the
+<tt class="docutils literal"><span class="pre">[geany]</span></tt> group.</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="33%" />
+<col width="48%" />
+<col width="20%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head">Option</th>
+<th class="head">Description</th>
+<th class="head">Default</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td>brace_match_ltgt</td>
+<td>Whether to highlight <, > angle brackets.</td>
+<td>false</td>
+</tr>
+<tr><td>show_editor_scrollbars</td>
+<td>Whether to display scrollbars when the
+editor window is bigger than the display.</td>
+<td>true</td>
+</tr>
+<tr><td>use_tab_to_indent</td>
+<td>Whether pressing tab when a line is selected
+will indent the line.</td>
+<td>true</td>
+</tr>
+<tr><td>use_gtk_word_boundaries</td>
+<td>Whether to look for the end of a word when
+using word-boundary related Scintilla
+commands (see <a class="reference" href="#scintilla-keyboard-commands">Scintilla keyboard
+commands</a>).</td>
+<td>true</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section">
+<h1><a class="toc-backref" href="#id98" id="compile-time-options" name="compile-time-options">Compile-time options</a></h1>
 <p>There are some options which can only be changed at compile time. To
 change these options, edit the file src/geany.h. Look for a block of
 lines starting with <tt class="docutils literal"><span class="pre">#define</span> <span class="pre">GEANY_*</span></tt>. Any definitions which are
@@ -2531,7 +2563,7 @@
 </table>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id98" id="gnu-general-public-license" name="gnu-general-public-license">GNU General Public License</a></h1>
+<h1><a class="toc-backref" href="#id99" id="gnu-general-public-license" name="gnu-general-public-license">GNU General Public License</a></h1>
 <pre class="literal-block">
             GNU GENERAL PUBLIC LICENSE
                Version 2, June 1991
@@ -2876,7 +2908,7 @@
 </pre>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id99" id="license-for-scintilla-and-scite" name="license-for-scintilla-and-scite">License for Scintilla and SciTE</a></h1>
+<h1><a class="toc-backref" href="#id100" id="license-for-scintilla-and-scite" name="license-for-scintilla-and-scite">License for Scintilla and SciTE</a></h1>
 <p>Copyright 1998-2003 by Neil Hodgson <neilh(at)scintilla(dot)org></p>
 <p>All Rights Reserved</p>
 <p>Permission to use, copy, modify, and distribute this software and
@@ -2896,7 +2928,7 @@
 <div class="footer">
 <hr class="footer" />
 <a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2007-08-12 19:28 UTC.
+Generated on: 2007-08-28 15:43 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.
 
 </div>

Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt	2007-08-28 15:10:13 UTC (rev 1833)
+++ trunk/doc/geany.txt	2007-08-28 15:45:54 UTC (rev 1834)
@@ -2152,6 +2152,33 @@
 
 
 
+Hidden preferences
+==================
+
+There are some uncommon preferences that are not shown in the Preferences
+dialog. These can be set by using a different editor to edit
+``~/.geany/geany.conf`` when Geany is closed, or by using a different (or
+temporary) configuration directory for Geany. Otherwise, the configuration
+file changes are overwritten when Geany is closed.
+
+The table below refers to the key names in the configuration file, under the
+``[geany]`` group.
+
+==============================  ============================================  ==================
+Option                          Description                                   Default
+==============================  ============================================  ==================
+brace_match_ltgt                Whether to highlight <, > angle brackets.     false
+show_editor_scrollbars          Whether to display scrollbars when the        true
+                                editor window is bigger than the display.
+use_tab_to_indent               Whether pressing tab when a line is selected  true
+                                will indent the line.
+use_gtk_word_boundaries         Whether to look for the end of a word when    true
+                                using word-boundary related Scintilla
+                                commands (see `Scintilla keyboard
+                                commands`_).
+==============================  ============================================  ==================
+
+
 Compile-time options
 ====================
 

Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c	2007-08-28 15:10:13 UTC (rev 1833)
+++ trunk/src/document.c	2007-08-28 15:45:54 UTC (rev 1834)
@@ -276,10 +276,13 @@
 	sci_clear_cmdkey(sci, 'L' | (SCMOD_CTRL << 16)); // line cut
 	sci_clear_cmdkey(sci, 'L' | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16)); // line delete
 
-	// use GtkEntry-like word boundaries
-	sci_assign_cmdkey(sci, SCK_RIGHT | (SCMOD_CTRL << 16), SCI_WORDRIGHTEND);
-	sci_assign_cmdkey(sci, SCK_RIGHT | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16), SCI_WORDRIGHTENDEXTEND);
-	sci_assign_cmdkey(sci, SCK_DELETE | (SCMOD_CTRL << 16), SCI_DELWORDRIGHTEND);
+	if (editor_prefs.use_gtk_word_boundaries)
+	{
+		// use GtkEntry-like word boundaries
+		sci_assign_cmdkey(sci, SCK_RIGHT | (SCMOD_CTRL << 16), SCI_WORDRIGHTEND);
+		sci_assign_cmdkey(sci, SCK_RIGHT | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16), SCI_WORDRIGHTENDEXTEND);
+		sci_assign_cmdkey(sci, SCK_DELETE | (SCMOD_CTRL << 16), SCI_DELWORDRIGHTEND);
+	}
 }
 
 

Modified: trunk/src/editor.h
===================================================================
--- trunk/src/editor.h	2007-08-28 15:10:13 UTC (rev 1833)
+++ trunk/src/editor.h	2007-08-28 15:45:54 UTC (rev 1834)
@@ -71,6 +71,7 @@
 	gint		autocompletion_max_height;
 	GHashTable	*auto_completions;
 	gboolean	brace_match_ltgt;	// whether to highlight < and > chars (hidden pref)
+	gboolean	use_gtk_word_boundaries;	// hidden pref
 } EditorPrefs;
 
 extern EditorPrefs editor_prefs;

Modified: trunk/src/keyfile.c
===================================================================
--- trunk/src/keyfile.c	2007-08-28 15:10:13 UTC (rev 1833)
+++ trunk/src/keyfile.c	2007-08-28 15:45:54 UTC (rev 1834)
@@ -195,6 +195,7 @@
 	g_key_file_set_boolean(config, PACKAGE, "pref_editor_use_tabs", editor_prefs.use_tabs);
 	g_key_file_set_boolean(config, PACKAGE, "pref_editor_disable_dnd", editor_prefs.disable_dnd);
 	g_key_file_set_boolean(config, PACKAGE, "pref_editor_smart_home_key", editor_prefs.smart_home_key);
+	g_key_file_set_boolean(config, PACKAGE, "use_gtk_word_boundaries", editor_prefs.use_gtk_word_boundaries);
 
 	// files
 	g_key_file_set_string(config, PACKAGE, "pref_editor_default_new_encoding", encodings[prefs.default_new_encoding].charset);
@@ -446,6 +447,7 @@
 	editor_prefs.use_tabs = utils_get_setting_boolean(config, PACKAGE, "pref_editor_use_tabs", TRUE);
 	editor_prefs.disable_dnd = utils_get_setting_boolean(config, PACKAGE, "pref_editor_disable_dnd", FALSE);
 	editor_prefs.smart_home_key = utils_get_setting_boolean(config, PACKAGE, "pref_editor_smart_home_key", TRUE);
+	editor_prefs.use_gtk_word_boundaries = utils_get_setting_boolean(config, PACKAGE, "use_gtk_word_boundaries", TRUE);
 
 	// Files
 	// use current locale encoding as default for new files (should be UTF-8 in most cases)


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