Revision: 5222 http://geany.svn.sourceforge.net/geany/?rev=5222&view=rev Author: ntrel Date: 2010-09-09 17:31:27 +0000 (Thu, 09 Sep 2010)
Log Message: ----------- Show Save As when saving if the document filename doesn't have an absolute path, so command-line new files can be saved without a prompt, but file templates still prompt the user.
Modified Paths: -------------- trunk/ChangeLog trunk/src/document.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-09-09 17:21:05 UTC (rev 5221) +++ trunk/ChangeLog 2010-09-09 17:31:27 UTC (rev 5222) @@ -17,6 +17,10 @@ * src/highlighting.c, src/encodings.c, tagmanager/tm_file_entry.c: Remove NULL checks when calling g_free() (patch Erik de Castro Lopo, thanks). + * src/document.c: + Show Save As when saving if the document filename doesn't have an + absolute path, so command-line new files can be saved without a + prompt, but file templates still prompt the user.
2010-09-09 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
Modified: trunk/src/document.c =================================================================== --- trunk/src/document.c 2010-09-09 17:21:05 UTC (rev 5221) +++ trunk/src/document.c 2010-09-09 17:31:27 UTC (rev 5222) @@ -1563,13 +1563,15 @@ }
-/* Return TRUE if the document hasn't been saved before, i.e. either the filename or - * the real_path is not set. */ +/* Return TRUE if the document doesn't have a full filename set. + * This makes filenames without a path show the save as dialog, e.g. for file templates. + * Otherwise just use the set filename instead of asking the user - e.g. for command-line + * new files. */ gboolean document_need_save_as(GeanyDocument *doc) { g_return_val_if_fail(doc != NULL, FALSE);
- return (doc->file_name == NULL || doc->real_path == NULL); + return (doc->file_name == NULL || !g_path_is_absolute(doc->file_name)); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.