Add hidden preference to disable scrolling past end of document.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2260 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2008-02-15 16:34:30 +00:00
parent 36882435a1
commit 6413fdb2bf
7 changed files with 23 additions and 11 deletions

View File

@ -4,6 +4,9 @@
end of a multi line comment (closes #1894084).
* src/socket.c: Apply patch from Daniel Richard G. to update some
source code comments (thanks).
* doc/geany.html, doc/geany.txt, src/document.c, src/editor.h,
src/keyfile.c:
Add hidden preference to disable scrolling past end of document.
2008-02-13 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>

View File

@ -3,7 +3,7 @@
<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: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" />
<title>Geany</title>
<meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" />
<meta name="date" content="2008-02-04" />
@ -135,7 +135,7 @@ dt {
<tr><th class="docinfo-name">Date:</th>
<td>2008-02-04</td></tr>
<tr><th class="docinfo-name">Version:</th>
<td>0.13</td></tr>
<td>0.14</td></tr>
</tbody>
</table>
<p>Copyright © 2005-2008</p>
@ -2635,7 +2635,7 @@ gpl</td>
</tr>
<tr><td>geanyversion</td>
<td>The actual Geany version, e.g.
&quot;Geany 0.13&quot;.</td>
&quot;Geany 0.14&quot;.</td>
<td>filetypes, file header, function
description, ChangeLog entry, bsd,
gpl</td>
@ -2686,7 +2686,7 @@ editing the file, to build the HTML document to see how your changes
look, run &quot;<tt class="docutils literal"><span class="pre">make</span> <span class="pre">doc</span></tt>&quot; in the subdirectory <tt class="docutils literal"><span class="pre">doc</span></tt> of Geany's source
directory. This regenerates the <tt class="docutils literal"><span class="pre">geany.html</span></tt> file. To generate a PDF
file, use the command &quot;<tt class="docutils literal"><span class="pre">make</span> <span class="pre">pdf</span></tt>&quot; which should generate a file called
geany-0.13.pdf.</p>
geany-0.14.pdf.</p>
<p>After you are happy with your changes, create a patch:</p>
<pre class="literal-block">
% svn diff geany.txt &gt; foo.patch
@ -2857,6 +2857,10 @@ commands</a>).</td>
an existing line.</td>
<td>false</td>
</tr>
<tr><td>scroll_stop_at_last_line</td>
<td>Disable scrolling past end of document</td>
<td>false</td>
</tr>
<tr><td><strong>[interface]</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
@ -3386,7 +3390,7 @@ USE OR PERFORMANCE OF THIS SOFTWARE.</p>
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
Generated on: 2008-02-04 13:23 UTC.
Generated on: 2008-02-15 16:25 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>

View File

@ -1,4 +1,4 @@
.. |(version)| replace:: 0.13
.. |(version)| replace:: 0.14
=======
Geany
@ -2502,6 +2502,7 @@ use_gtk_word_boundaries Whether to look for the end of a word when
commands`_).
auto_complete_whilst_editing Whether to allow autocompletion when editing false
an existing line.
scroll_stop_at_last_line Disable scrolling past end of document false
**[interface]**
show_symbol_list_expanders Whether to show or hide the small expander true
icons on the symbol list treeview (only

View File

@ -422,7 +422,8 @@ static gint document_create_new_sci(const gchar *filename)
sci_set_caret_policy_x(sci, CARET_JUMPS | CARET_EVEN, 0);
//sci_set_caret_policy_y(sci, CARET_JUMPS | CARET_EVEN, 0);
SSM(sci, SCI_AUTOCSETSEPARATOR, '\n', 0);
SSM(sci, SCI_SETENDATLASTLINE, FALSE, 0); // allow scrolling past end of document
// (dis)allow scrolling past end of document
SSM(sci, SCI_SETENDATLASTLINE, editor_prefs.scroll_stop_at_last_line, 0);
// signal for insert-key(works without too, but to update the right status bar)
//g_signal_connect((GtkWidget*) sci, "key-press-event",

View File

@ -51,9 +51,10 @@ typedef struct EditorPrefs
gint long_line_type;
gint long_line_column;
gchar *long_line_color;
gboolean show_markers_margin; // view menu
gboolean show_linenumber_margin; // view menu
gboolean show_scrollbars; // hidden pref
gboolean show_markers_margin; // view menu
gboolean show_linenumber_margin; // view menu
gboolean show_scrollbars; // hidden pref
gboolean scroll_stop_at_last_line; // hidden pref
// behaviour
gboolean line_wrapping;

View File

@ -368,6 +368,7 @@ static void save_hidden_prefs(GKeyFile *config)
write_hidden_pref_boolean(config, PACKAGE, "brace_match_ltgt", editor_prefs.brace_match_ltgt);
write_hidden_pref_boolean(config, PACKAGE, "use_gtk_word_boundaries", editor_prefs.use_gtk_word_boundaries);
write_hidden_pref_boolean(config, PACKAGE, "auto_complete_whilst_editing", editor_prefs.auto_complete_whilst_editing);
write_hidden_pref_boolean(config, PACKAGE, "scroll_stop_at_last_line", editor_prefs.scroll_stop_at_last_line);
#if GTK_CHECK_VERSION(2, 12, 0)
write_hidden_pref_boolean(config, PACKAGE, "show_symbol_list_expanders", prefs.show_symbol_list_expanders);
#endif
@ -525,6 +526,7 @@ static void load_dialog_prefs(GKeyFile *config)
editor_prefs.newline_strip = utils_get_setting_boolean(config, PACKAGE, "pref_editor_newline_strip", FALSE);
editor_prefs.use_gtk_word_boundaries = utils_get_setting_boolean(config, PACKAGE, "use_gtk_word_boundaries", TRUE);
editor_prefs.auto_complete_whilst_editing = utils_get_setting_boolean(config, PACKAGE, "auto_complete_whilst_editing", FALSE);
editor_prefs.scroll_stop_at_last_line = utils_get_setting_boolean(config, PACKAGE, "scroll_stop_at_last_line", FALSE);
// Files
// use current locale encoding as default for new files (should be UTF-8 in most cases)

View File

@ -93,7 +93,7 @@
/* The API version should be incremented whenever any plugin data types below are
* modified or appended to. */
static const gint api_version = 42;
static const gint api_version = 43;
/* The ABI version should be incremented whenever existing fields in the plugin
* data types below have to be changed or reordered. It should stay the same if fields