SF.net SVN: geany: [2381] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Fri Mar 21 16:59:34 UTC 2008
Revision: 2381
http://geany.svn.sourceforge.net/geany/?rev=2381&view=rev
Author: ntrel
Date: 2008-03-21 09:59:30 -0700 (Fri, 21 Mar 2008)
Log Message:
-----------
Replace untitled file header filename after Save As and add to recent
files on Windows too.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/dialogs.c
trunk/src/document.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-03-21 16:47:17 UTC (rev 2380)
+++ trunk/ChangeLog 2008-03-21 16:59:30 UTC (rev 2381)
@@ -22,6 +22,9 @@
* src/win32.c, src/dialogs.c, src/document.c, src/document.h:
Only use filetype detection after Save As, not on every save when the
filetype is None (fixes #1891778).
+ * src/dialogs.c, src/document.c:
+ Replace untitled file header filename after Save As and add to recent
+ files on Windows too.
2008-03-20 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/dialogs.c
===================================================================
--- trunk/src/dialogs.c 2008-03-21 16:47:17 UTC (rev 2380)
+++ trunk/src/dialogs.c 2008-03-21 16:59:30 UTC (rev 2381)
@@ -410,14 +410,10 @@
doc_list[idx].file_name = g_strdup(utf8_filename);
}
- utils_replace_filename(idx);
document_save_file_as(idx);
if (! open_new_tab)
build_menu_update(idx);
-
- /* finally add current file to recent files menu */
- ui_add_recent_file(doc_list[idx].file_name);
}
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2008-03-21 16:47:17 UTC (rev 2380)
+++ trunk/src/document.c 2008-03-21 16:59:30 UTC (rev 2381)
@@ -1262,6 +1262,8 @@
*/
gboolean document_save_file_as(gint idx)
{
+ gboolean ret;
+
if (! DOC_IDX_VALID(idx)) return FALSE;
/* detect filetype */
@@ -1277,7 +1279,12 @@
app->ignore_callback = FALSE;
}
}
- return document_save_file(idx, TRUE);
+ utils_replace_filename(idx);
+
+ ret = document_save_file(idx, TRUE);
+ if (ret)
+ ui_add_recent_file(doc_list[idx].file_name);
+ return ret;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list