Commit 8a8798bd authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Document the fact that there might not be a volume for all paths.

2004-03-05  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkfilesystem.c (gtk_file_system_get_volume_for_path):
	Document the fact that there might not be a volume for all
	paths.

	* gtk/gtkfilechooserdefault.c (shortcuts_add_current_folder):
	Don't assume there is a volume for all paths.
parent 8bb74888
2004-03-05 Alexander Larsson <alexl@redhat.com>
* gtk/gtkfilesystem.c (gtk_file_system_get_volume_for_path):
Document the fact that there might not be a volume for all
paths.
* gtk/gtkfilechooserdefault.c (shortcuts_add_current_folder):
Don't assume there is a volume for all paths.
Fri Mar 5 01:45:04 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (shortcuts_append_paths): insert in
......
2004-03-05 Alexander Larsson <alexl@redhat.com>
* gtk/gtkfilesystem.c (gtk_file_system_get_volume_for_path):
Document the fact that there might not be a volume for all
paths.
* gtk/gtkfilechooserdefault.c (shortcuts_add_current_folder):
Don't assume there is a volume for all paths.
Fri Mar 5 01:45:04 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (shortcuts_append_paths): insert in
......
2004-03-05 Alexander Larsson <alexl@redhat.com>
* gtk/gtkfilesystem.c (gtk_file_system_get_volume_for_path):
Document the fact that there might not be a volume for all
paths.
* gtk/gtkfilechooserdefault.c (shortcuts_add_current_folder):
Don't assume there is a volume for all paths.
Fri Mar 5 01:45:04 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (shortcuts_append_paths): insert in
......
2004-03-05 Alexander Larsson <alexl@redhat.com>
* gtk/gtkfilesystem.c (gtk_file_system_get_volume_for_path):
Document the fact that there might not be a volume for all
paths.
* gtk/gtkfilechooserdefault.c (shortcuts_add_current_folder):
Don't assume there is a volume for all paths.
Fri Mar 5 01:45:04 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (shortcuts_append_paths): insert in
......
2004-03-05 Alexander Larsson <alexl@redhat.com>
* gtk/gtkfilesystem.c (gtk_file_system_get_volume_for_path):
Document the fact that there might not be a volume for all
paths.
* gtk/gtkfilechooserdefault.c (shortcuts_add_current_folder):
Don't assume there is a volume for all paths.
Fri Mar 5 01:45:04 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (shortcuts_append_paths): insert in
......
......@@ -1088,20 +1088,25 @@ shortcuts_add_current_folder (GtkFileChooserDefault *impl)
pos = shortcuts_get_index (impl, SHORTCUTS_CURRENT_FOLDER);
volume = gtk_file_system_get_volume_for_path (impl->file_system, impl->current_folder);
base_path = gtk_file_system_volume_get_base_path (impl->file_system, volume);
if (strcmp (gtk_file_path_get_string (base_path), gtk_file_path_get_string (impl->current_folder)) == 0)
if (volume)
base_path = gtk_file_system_volume_get_base_path (impl->file_system, volume);
else
base_path = NULL;
if (base_path &&
strcmp (gtk_file_path_get_string (base_path), gtk_file_path_get_string (impl->current_folder)) == 0)
{
success = shortcuts_insert_path (impl, pos, TRUE, volume, NULL, NULL, FALSE, NULL);
impl->shortcuts_current_folder_is_volume = TRUE;
}
else
{
gtk_file_system_volume_free (impl->file_system, volume);
success = shortcuts_insert_path (impl, pos, FALSE, NULL, impl->current_folder, NULL, FALSE, NULL);
impl->shortcuts_current_folder_is_volume = FALSE;
}
if (volume)
gtk_file_system_volume_free (impl->file_system, volume);
gtk_file_path_free (base_path);
if (!success)
......
......@@ -340,9 +340,12 @@ gtk_file_system_create_folder(GtkFileSystem *file_system,
* @path: a #GtkFilePath
*
* Queries the file system volume that corresponds to a specific path.
* There might not be a volume for all paths (consinder for instance remote
* shared), so this can return NULL.
*
* Return value: the #GtkFileSystemVolume that corresponds to the specified
* @path. You should free this value with gtk_file_system_volume_free().
* @path, or NULL if there is no such volume. You should free this value with
* gtk_file_system_volume_free().
**/
GtkFileSystemVolume *
gtk_file_system_get_volume_for_path (GtkFileSystem *file_system,
......
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