Revision: 4557 http://geany.svn.sourceforge.net/geany/?rev=4557&view=rev Author: eht16 Date: 2010-01-25 21:15:27 +0000 (Mon, 25 Jan 2010)
Log Message: ----------- Backport from trunk: Fix 'Open Selected File' for unsaved new documents.
Modified Paths: -------------- branches/geany-0.18.1/ChangeLog branches/geany-0.18.1/src/callbacks.c
Modified: branches/geany-0.18.1/ChangeLog =================================================================== --- branches/geany-0.18.1/ChangeLog 2010-01-25 21:15:17 UTC (rev 4556) +++ branches/geany-0.18.1/ChangeLog 2010-01-25 21:15:27 UTC (rev 4557) @@ -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: branches/geany-0.18.1/src/callbacks.c =================================================================== --- branches/geany-0.18.1/src/callbacks.c 2010-01-25 21:15:17 UTC (rev 4556) +++ branches/geany-0.18.1/src/callbacks.c 2010-01-25 21:15:27 UTC (rev 4557) @@ -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.