diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 1b01a8636..5135417d1 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -8900,6 +8900,16 @@ location_set_current_folder_text (GtkFileChooserDefault *impl, return; path = g_file_get_parse_name (impl->current_folder); + + if (!g_str_has_suffix (path, G_DIR_SEPARATOR_S)) + { + gchar *folder_path; + + folder_path = g_strconcat (path, G_DIR_SEPARATOR_S, NULL); + g_free (path); + path = folder_path; + } + gtk_entry_set_text (GTK_ENTRY (impl->location_entry), path); if (select_text) @@ -9621,6 +9631,9 @@ location_button_toggled_cb (GtkToggleButton *toggle, } location_mode_set (impl, new_mode, FALSE); + + if (is_active) + location_set_current_folder_text (impl, TRUE); } /* Creates a combo box with two items: List View and Icon View. */ @@ -9729,7 +9742,7 @@ location_button_create (GtkFileChooserDefault *impl) g_signal_connect (impl->location_button, "toggled", G_CALLBACK (location_button_toggled_cb), impl); - str = _("Type a file name"); + str = _("Edit Location"); gtk_widget_set_tooltip_text (impl->location_button, str); atk_object_set_name (gtk_widget_get_accessible (impl->location_button), str);