Append a '/' to directory names in the completion popup. (#431323, Maarten
2007-04-26 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilechooserentry.c: Append a '/' to directory names in the completion popup. (#431323, Maarten Maathuis) svn path=/trunk/; revision=17658
This commit is contained in:
committed by
Matthias Clasen
parent
790b009703
commit
069d78ed31
@ -1,3 +1,8 @@
|
|||||||
|
2007-04-26 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserentry.c: Append a '/' to directory names
|
||||||
|
in the completion popup. (#431323, Maarten Maathuis)
|
||||||
|
|
||||||
2007-04-26 Matthias Clasen <mclasen@redhat.com>
|
2007-04-26 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* demo/gtk-demo/combobox.c: Add a simple validation demo.
|
* demo/gtk-demo/combobox.c: Add a simple validation demo.
|
||||||
|
|||||||
@ -359,7 +359,7 @@ maybe_append_separator_to_path (GtkFileChooserEntry *chooser_entry,
|
|||||||
GtkFilePath *path,
|
GtkFilePath *path,
|
||||||
gchar *display_name)
|
gchar *display_name)
|
||||||
{
|
{
|
||||||
if (path)
|
if (!g_str_has_suffix (display_name, G_DIR_SEPARATOR_S) && path)
|
||||||
{
|
{
|
||||||
GtkFileInfo *info;
|
GtkFileInfo *info;
|
||||||
|
|
||||||
@ -377,7 +377,6 @@ maybe_append_separator_to_path (GtkFileChooserEntry *chooser_entry,
|
|||||||
|
|
||||||
gtk_file_info_free (info);
|
gtk_file_info_free (info);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return display_name;
|
return display_name;
|
||||||
@ -572,9 +571,11 @@ update_current_folder_files (GtkFileChooserEntry *chooser_entry,
|
|||||||
NULL); /* NULL-GError */
|
NULL); /* NULL-GError */
|
||||||
if (info)
|
if (info)
|
||||||
{
|
{
|
||||||
const gchar *display_name = gtk_file_info_get_display_name (info);
|
gchar *display_name = g_strdup (gtk_file_info_get_display_name (info));
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
|
|
||||||
|
display_name = maybe_append_separator_to_path (chooser_entry, path, display_name);
|
||||||
|
|
||||||
gtk_list_store_append (chooser_entry->completion_store, &iter);
|
gtk_list_store_append (chooser_entry->completion_store, &iter);
|
||||||
gtk_list_store_set (chooser_entry->completion_store, &iter,
|
gtk_list_store_set (chooser_entry->completion_store, &iter,
|
||||||
DISPLAY_NAME_COLUMN, display_name,
|
DISPLAY_NAME_COLUMN, display_name,
|
||||||
@ -582,6 +583,7 @@ update_current_folder_files (GtkFileChooserEntry *chooser_entry,
|
|||||||
-1);
|
-1);
|
||||||
|
|
||||||
gtk_file_info_free (info);
|
gtk_file_info_free (info);
|
||||||
|
g_free (display_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user