SF.net SVN: geany: [2349] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Sat Mar 15 11:06:56 UTC 2008
Revision: 2349
http://geany.svn.sourceforge.net/geany/?rev=2349&view=rev
Author: eht16
Date: 2008-03-15 04:06:55 -0700 (Sat, 15 Mar 2008)
Log Message:
-----------
Fix wrong directory when choosing project filename in the New Project dialog.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/project.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-03-14 18:55:30 UTC (rev 2348)
+++ trunk/ChangeLog 2008-03-15 11:06:55 UTC (rev 2349)
@@ -1,3 +1,9 @@
+2008-03-15 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/projects.c: Fix wrong directory when choosing project filename
+ in the New Project dialog.
+
+
2008-03-14 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/keybindings.c:
Modified: trunk/src/project.c
===================================================================
--- trunk/src/project.c 2008-03-14 18:55:30 UTC (rev 2348)
+++ trunk/src/project.c 2008-03-15 11:06:55 UTC (rev 2349)
@@ -718,7 +718,15 @@
if (g_path_is_absolute(locale_filename))
{
if (g_file_test(locale_filename, G_FILE_TEST_EXISTS))
- gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), utf8_filename);
+ {
+ /* if the current filename is a directory, we must use
+ * gtk_file_chooser_set_current_folder(which expects a locale filename) otherwise
+ * we end up in the parent directory */
+ if (g_file_test(locale_filename, G_FILE_TEST_IS_DIR))
+ gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), locale_filename);
+ else
+ gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), utf8_filename);
+ }
else /* if the file doesn't yet exist, use at least the current directory */
{
gchar *locale_dir = g_path_get_dirname(locale_filename);
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