Kaydet (Commit) b234bf16 authored tarafından Nick Treleaven's avatar Nick Treleaven

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
üst 7b14228f
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> 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 * src/document.c: Fix invalid filetype setting when using Save All and
......
...@@ -228,12 +228,18 @@ on_save_all1_activate (GtkMenuItem *menuitem, ...@@ -228,12 +228,18 @@ on_save_all1_activate (GtkMenuItem *menuitem,
{ {
gint i, idx, max = gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)); gint i, idx, max = gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook));
gint cur_idx = document_get_cur_idx(); 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); idx = document_get_n_idx(i);
if (! doc_list[idx].changed) continue; if (! doc_list[idx].changed) continue;
if (doc_list[idx].file_name == NULL) 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(); dialogs_show_save_as();
}
else else
document_save_file(idx, FALSE); document_save_file(idx, FALSE);
} }
......
...@@ -451,8 +451,8 @@ on_file_save_dialog_response (GtkDialog *dialog, ...@@ -451,8 +451,8 @@ on_file_save_dialog_response (GtkDialog *dialog,
#endif #endif
/* This shows the file selection dialog to save a file, returning TRUE if /* Show the Save As dialog for the current notebook page.
* the file was saved. */ * Returns: TRUE if the file was saved. */
gboolean dialogs_show_save_as() gboolean dialogs_show_save_as()
{ {
#if GEANY_USE_WIN32_DIALOG #if GEANY_USE_WIN32_DIALOG
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment