Set the base folder path in the entry.

2004-03-08  Anders Carlsson  <andersca@gnome.org>

	* gtk/gtkfilechooserentry.c:
	(_gtk_file_chooser_entry_set_base_folder):
	Set the base folder path in the entry.
This commit is contained in:
Anders Carlsson 2004-03-08 01:55:43 +00:00 committed by Anders Carlsson
parent 0b78bc6cb9
commit c47ca5975f
6 changed files with 43 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2004-03-08 Anders Carlsson <andersca@gnome.org>
* gtk/gtkfilechooserentry.c:
(_gtk_file_chooser_entry_set_base_folder):
Set the base folder path in the entry.
2004-03-08 Christian Neumair <chris@gnome-de.org>
* tests/testentrycompletion.c: Fix typo.

View File

@ -1,3 +1,9 @@
2004-03-08 Anders Carlsson <andersca@gnome.org>
* gtk/gtkfilechooserentry.c:
(_gtk_file_chooser_entry_set_base_folder):
Set the base folder path in the entry.
2004-03-08 Christian Neumair <chris@gnome-de.org>
* tests/testentrycompletion.c: Fix typo.

View File

@ -1,3 +1,9 @@
2004-03-08 Anders Carlsson <andersca@gnome.org>
* gtk/gtkfilechooserentry.c:
(_gtk_file_chooser_entry_set_base_folder):
Set the base folder path in the entry.
2004-03-08 Christian Neumair <chris@gnome-de.org>
* tests/testentrycompletion.c: Fix typo.

View File

@ -1,3 +1,9 @@
2004-03-08 Anders Carlsson <andersca@gnome.org>
* gtk/gtkfilechooserentry.c:
(_gtk_file_chooser_entry_set_base_folder):
Set the base folder path in the entry.
2004-03-08 Christian Neumair <chris@gnome-de.org>
* tests/testentrycompletion.c: Fix typo.

View File

@ -1,3 +1,9 @@
2004-03-08 Anders Carlsson <andersca@gnome.org>
* gtk/gtkfilechooserentry.c:
(_gtk_file_chooser_entry_set_base_folder):
Set the base folder path in the entry.
2004-03-08 Christian Neumair <chris@gnome-de.org>
* tests/testentrycompletion.c: Fix typo.

View File

@ -514,11 +514,23 @@ void
_gtk_file_chooser_entry_set_base_folder (GtkFileChooserEntry *chooser_entry,
const GtkFilePath *path)
{
char *text;
if (chooser_entry->base_folder)
gtk_file_path_free (chooser_entry->base_folder);
chooser_entry->base_folder = gtk_file_path_copy (path);
gtk_file_chooser_entry_changed (GTK_EDITABLE (chooser_entry));
/* We first try to get the path as a filename, and then use an uri if that fails */
text = gtk_file_system_path_to_filename (chooser_entry->file_system, path);
if (!text)
text = gtk_file_system_path_to_uri (chooser_entry->file_system, path);
gtk_entry_set_text (GTK_ENTRY (chooser_entry), text);
g_free (text);
gtk_editable_select_region (GTK_EDITABLE (chooser_entry), 0, -1);
}
/**