From 39e208d86584cc3a3670afc6de5bd3747866ec91 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 1 Oct 2003 00:53:59 +0000 Subject: Added fields for the shortcuts tree and its model. (create_file_list): 2003-09-30 Federico Mena Quintero * gtkfilechooserimpldefault.c (struct _GtkFileChooserImplDefault): Added fields for the shortcuts tree and its model. (create_file_list): Don't call gtk_tree_view_column_set_sort_column_id() twice. (create_shortcuts_model): New function. (list_icon_data_func): Use an ICON_SIZE macro instead of a hardcoded value. (list_row_activated): Use _gtk_file_chooser_set_current_folder_path() to avoid converting the GtkFilePath to a URI string. (gtk_file_chooser_impl_default_set_current_folder): Select the appropriate item from the shortcuts list when the current folder changes, to let the user know where he is. (tree_selection_changed): Likewise. * gtkfilesystem.h (struct _GtkFileSystemIface): Added methods for ::supports_shortcuts(), ::list_shortcuts(), ::set_shortcuts(). --- gtk/gtkfilesystem.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'gtk/gtkfilesystem.h') diff --git a/gtk/gtkfilesystem.h b/gtk/gtkfilesystem.h index b6cd5660b8..f57616369c 100644 --- a/gtk/gtkfilesystem.h +++ b/gtk/gtkfilesystem.h @@ -135,7 +135,7 @@ struct _GtkFileSystemIface const GtkFilePath *path, GtkFileInfoType types, GError **error); - + GtkFileFolder * (*get_folder) (GtkFileSystem *file_system, const GtkFilePath *path, GtkFileInfoType types, @@ -144,6 +144,13 @@ struct _GtkFileSystemIface const GtkFilePath *path, GError **error); + gboolean (*supports_shortcuts) (GtkFileSystem *file_system); + GSList * (*list_shortcuts) (GtkFileSystem *file_system, + GError **error); + gboolean (*set_shortcuts) (GtkFileSystem *file_system, + GSList *shortcuts, + GError **error); + /* Path Manipulation */ gboolean (*get_parent) (GtkFileSystem *file_system, @@ -153,7 +160,7 @@ struct _GtkFileSystemIface GtkFilePath * (*make_path) (GtkFileSystem *file_system, const GtkFilePath *base_path, const gchar *display_name, - GError **error); + GError **error); gboolean (*parse) (GtkFileSystem *file_system, const GtkFilePath *base_path, const gchar *str, @@ -181,7 +188,14 @@ GtkFileInfo * gtk_file_system_get_root_info (GtkFileSystem *file_system const GtkFilePath *path, GtkFileInfoType types, GError **error); - + +gboolean gtk_file_system_supports_shortcuts (GtkFileSystem *file_system); +GSList * gtk_file_system_list_shortcuts (GtkFileSystem *file_system, + GError **error); +gboolean gtk_file_system_set_shortcuts (GtkFileSystem *file_system, + GSList *shortcuts, + GError **error); + gboolean gtk_file_system_get_parent (GtkFileSystem *file_system, const GtkFilePath *path, GtkFilePath **parent, -- cgit v1.2.1