Revision: 5257 http://geany.svn.sourceforge.net/geany/?rev=5257&view=rev Author: ntrel Date: 2010-09-23 16:24:43 +0000 (Thu, 23 Sep 2010)
Log Message: ----------- Add hidden pref new_document_after_close for whether to open a new document automatically, off by default.
Modified Paths: -------------- trunk/ChangeLog trunk/doc/geany.html trunk/doc/geany.txt trunk/src/document.c trunk/src/ui_utils.c trunk/src/ui_utils.h
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-09-23 14:37:22 UTC (rev 5256) +++ trunk/ChangeLog 2010-09-23 16:24:43 UTC (rev 5257) @@ -14,6 +14,10 @@ Insert menu. * src/interface.c, geany.glade: Move editor popup menu Insert Comments submenu to top of Insert menu. + * src/ui_utils.h, src/document.c, src/ui_utils.c, doc/geany.txt, + doc/geany.html: + Add hidden pref new_document_after_close for whether to open a new + document automatically, off by default.
2010-09-22 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/doc/geany.html =================================================================== --- trunk/doc/geany.html 2010-09-23 14:37:22 UTC (rev 5256) +++ trunk/doc/geany.html 2010-09-23 16:24:43 UTC (rev 5257) @@ -6,7 +6,7 @@ <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="2010-09-21" /> +<meta name="date" content="2010-09-23" /> <style type="text/css">
/* @@ -139,7 +139,7 @@ <br />Nick Treleaven <br />Frank Lanitz</td></tr> <tr><th class="docinfo-name">Date:</th> -<td>2010-09-21</td></tr> +<td>2010-09-23</td></tr> <tr><th class="docinfo-name">Version:</th> <td>0.20</td></tr> </tbody> @@ -4759,6 +4759,11 @@ (Search in src/ui_utils.c for details).</td> <td>See below.</td> </tr> +<tr><td>new_document_after_close</td> +<td>Whether to open a new document after all +documents have been closed.</td> +<td>false</td> +</tr> </tbody> </table> <p>By default, statusbar_template is empty. This tells Geany to use its @@ -6180,7 +6185,7 @@ <div class="footer"> <hr class="footer" /> <a class="reference" href="geany.txt">View document source</a>. -Generated on: 2010-09-23 12:16 UTC. +Generated on: 2010-09-23 16:20 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 2010-09-23 14:37:22 UTC (rev 5256) +++ trunk/doc/geany.txt 2010-09-23 16:24:43 UTC (rev 5257) @@ -4081,6 +4081,8 @@ tab. statusbar_template The status bar statistics line format. See below. (Search in src/ui_utils.c for details). +new_document_after_close Whether to open a new document after all false + documents have been closed. ================================ =========================================== ==================
By default, statusbar_template is empty. This tells Geany to use its
Modified: trunk/src/document.c =================================================================== --- trunk/src/document.c 2010-09-23 14:37:22 UTC (rev 5256) +++ trunk/src/document.c 2010-09-23 16:24:43 UTC (rev 5257) @@ -685,8 +685,12 @@ ui_update_popup_reundo_items(NULL); ui_document_buttons_update(); build_menu_update(NULL); + + /* we use an idle callback to prevent opening a new document if other documents + * are about to be opened. */ + if (ui_prefs.new_document_after_close) + g_idle_add(on_idle_new_doc, NULL); } - g_idle_add(on_idle_new_doc, NULL); return TRUE; }
Modified: trunk/src/ui_utils.c =================================================================== --- trunk/src/ui_utils.c 2010-09-23 14:37:22 UTC (rev 5256) +++ trunk/src/ui_utils.c 2010-09-23 16:24:43 UTC (rev 5257) @@ -2050,6 +2050,8 @@ "allow_always_save", FALSE); stash_group_add_string(group, &statusbar_template, "statusbar_template", ""); + stash_group_add_boolean(group, &ui_prefs.new_document_after_close, + "new_document_after_close", FALSE); }
Modified: trunk/src/ui_utils.h =================================================================== --- trunk/src/ui_utils.h 2010-09-23 14:37:22 UTC (rev 5256) +++ trunk/src/ui_utils.h 2010-09-23 16:24:43 UTC (rev 5257) @@ -97,6 +97,7 @@ gint sidebar_page; gboolean msgwindow_visible; gboolean allow_always_save; /* if set, files can always be saved, even if unchanged */ + gboolean new_document_after_close;
/* Menu-item related data */ GQueue *recent_queue;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.