Commit c47ca597 authored by Anders Carlsson's avatar Anders Carlsson Committed by Anders Carlsson

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.
parent 0b78bc6c
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.
......
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.
......
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.
......
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.
......
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.
......
......@@ -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);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment