Is anyone opposed to me committing the trivial patch attached here. The comment I think describes it well enough, and if you're using recent GTK+ 2.24.x you probably already know about it.

I didn't want to commit without asking since maybe some people will find this new "feature"[1][2] useful, I personally find it extremely annoying, but I wouldn't want to fix it at the expense of annoying others.

Matthew Brush

[1] https://live.gnome.org/DocumentCentricGnome/Help%20the%20user%20choose%20a%20place%20to%20put%20a%20new%20file [2] I think we can safely assume Geany users (ie. programmers) already know how to manage files :)
diff --git a/src/dialogs.c b/src/dialogs.c
index 4b701d2..72c72f1 100644
--- a/src/dialogs.c
+++ b/src/dialogs.c
@@ -473,7 +473,18 @@ void dialogs_show_open_file(void)
 		if (initdir != NULL && g_path_is_absolute(initdir))
-				gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), initdir);
+			gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), initdir);
+		else
+		{
+			/* Since GTK+ ~2.24 the default behaviour of the GtkFileChooser
+			 * is to hide the location bar and show recently used files,
+			 * this brings back the location bar and puts the current
+			 * directory as the user's home directory if there's no
+			 * better one to use. The recently used view is still 1 click
+			 * away. */
+			gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog),
+				g_get_home_dir());
+		}
 		if (app->project && NZV(app->project->base_path))
Geany-devel mailing list

Reply via email to