SF.net SVN: geany:[4104] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Tue Aug 18 13:47:29 UTC 2009
Revision: 4104
http://geany.svn.sourceforge.net/geany/?rev=4104&view=rev
Author: ntrel
Date: 2009-08-18 13:47:29 +0000 (Tue, 18 Aug 2009)
Log Message:
-----------
Fix 'Open Selected File' for unsaved new documents.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/callbacks.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-08-17 22:04:13 UTC (rev 4103)
+++ trunk/ChangeLog 2009-08-18 13:47:29 UTC (rev 4104)
@@ -1,3 +1,9 @@
+2009-08-18 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/callbacks.c:
+ Fix 'Open Selected File' for unsaved new documents.
+
+
2009-08-18 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/keybindings.c:
Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c 2009-08-17 22:04:13 UTC (rev 4103)
+++ trunk/src/callbacks.c 2009-08-18 13:47:29 UTC (rev 4104)
@@ -1866,7 +1866,7 @@
if (sel != NULL)
{
- gchar *locale_filename, *filename;
+ gchar *locale_filename, *filename = NULL;
if (g_path_is_absolute(sel))
filename = g_strdup(sel);
@@ -1874,7 +1874,10 @@
{ /* relative filename, add the path of the current file */
gchar *path;
- path = g_path_get_dirname(doc->file_name);
+ path = utils_get_current_file_dir_utf8();
+ if (!path)
+ path = g_get_current_dir();
+
filename = g_build_path(G_DIR_SEPARATOR_S, path, sel, NULL);
if (! g_file_test(filename, G_FILE_TEST_EXISTS) &&
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