Commit c100ebd2 authored by Federico Mena Quintero's avatar Federico Mena Quintero Committed by Federico Mena Quintero

Do not check whether the path is a folder. It is useful to bookmark files

2005-11-11  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Do not
	check whether the path is a folder.  It is useful to bookmark
	files as well (e.g. todo.txt), and this will also help
	performance.
	(shortcuts_add_bookmark_from_path): Likewise.
	(shortcuts_activate_iter): Change folders or select files, as
	appropriate.
parent 0fa61828
2005-11-11 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Do not
check whether the path is a folder. It is useful to bookmark
files as well (e.g. todo.txt), and this will also help
performance.
(shortcuts_add_bookmark_from_path): Likewise.
(shortcuts_activate_iter): Change folders or select files, as
appropriate.
2005-11-11 Federico Mena Quintero <federico@ximian.com>
* tests/autotestfilechooser.c (main): Use
......
2005-11-11 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Do not
check whether the path is a folder. It is useful to bookmark
files as well (e.g. todo.txt), and this will also help
performance.
(shortcuts_add_bookmark_from_path): Likewise.
(shortcuts_activate_iter): Change folders or select files, as
appropriate.
2005-11-11 Federico Mena Quintero <federico@ximian.com>
* tests/autotestfilechooser.c (main): Use
......
......@@ -1275,12 +1275,6 @@ shortcuts_insert_path (GtkFileChooserDefault *impl,
}
else
{
if (!check_is_folder (impl->file_system, path, error))
{
profile_end ("end - is not folder", NULL);
return FALSE;
}
if (label)
label_copy = g_strdup (label);
else
......@@ -2035,14 +2029,6 @@ shortcuts_add_bookmark_from_path (GtkFileChooserDefault *impl,
if (shortcut_find_position (impl, path) != -1)
return FALSE;
/* FIXME: this check really belongs in gtk_file_system_insert_bookmark. */
error = NULL;
if (!check_is_folder (impl->file_system, path, &error))
{
error_adding_bookmark_dialog (impl, path, error);
return FALSE;
}
error = NULL;
if (!gtk_file_system_insert_bookmark (impl->file_system, path, pos, &error))
{
......@@ -6759,7 +6745,10 @@ shortcuts_activate_iter (GtkFileChooserDefault *impl,
const GtkFilePath *file_path;
file_path = col_data;
change_folder_and_display_error (impl, file_path);
if (check_is_folder (impl->file_system, file_path, NULL))
change_folder_and_display_error (impl, file_path);
else
gtk_file_chooser_default_select_path (GTK_FILE_CHOOSER (impl), file_path, NULL);
}
}
......
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