Add hidden pref new_document_after_close for whether to open a new
document automatically, off by default. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5257 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
4bbde90860
commit
3fe15d0ebb
@ -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>
|
||||
|
@ -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 @@ Stylesheet for Geany's documentation based on a version of John Gabriele.
|
||||
<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 @@ tab.</td>
|
||||
(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 @@ 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: 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>
|
||||
|
@ -4081,6 +4081,8 @@ compiler_tab_autoscroll Whether to automatically scroll to the t
|
||||
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
|
||||
|
@ -685,8 +685,12 @@ gboolean document_remove_page(guint page_num)
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -2050,6 +2050,8 @@ void ui_init_prefs(void)
|
||||
"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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -97,6 +97,7 @@ typedef struct UIPrefs
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user