Fix saving the wrong document when using Save All with unnamed
documents. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1818 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
7b14228f62
commit
b234bf160a
@ -1,3 +1,10 @@
|
||||
2007-08-24 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||
|
||||
* src/dialogs.c, src/callbacks.c:
|
||||
Fix saving the wrong document when using Save All with unnamed
|
||||
documents.
|
||||
|
||||
|
||||
2007-08-23 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||
|
||||
* src/document.c: Fix invalid filetype setting when using Save All and
|
||||
|
@ -228,12 +228,18 @@ on_save_all1_activate (GtkMenuItem *menuitem,
|
||||
{
|
||||
gint i, idx, max = gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook));
|
||||
gint cur_idx = document_get_cur_idx();
|
||||
for(i = 0; i < max; i++)
|
||||
|
||||
for (i = 0; i < max; i++)
|
||||
{
|
||||
idx = document_get_n_idx(i);
|
||||
if (! doc_list[idx].changed) continue;
|
||||
if (doc_list[idx].file_name == NULL)
|
||||
{
|
||||
// display unnamed document
|
||||
gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook),
|
||||
document_get_notebook_page(idx));
|
||||
dialogs_show_save_as();
|
||||
}
|
||||
else
|
||||
document_save_file(idx, FALSE);
|
||||
}
|
||||
|
@ -451,8 +451,8 @@ on_file_save_dialog_response (GtkDialog *dialog,
|
||||
#endif
|
||||
|
||||
|
||||
/* This shows the file selection dialog to save a file, returning TRUE if
|
||||
* the file was saved. */
|
||||
/* Show the Save As dialog for the current notebook page.
|
||||
* Returns: TRUE if the file was saved. */
|
||||
gboolean dialogs_show_save_as()
|
||||
{
|
||||
#if GEANY_USE_WIN32_DIALOG
|
||||
|
Loading…
x
Reference in New Issue
Block a user