summaryrefslogtreecommitdiff
path: root/gtk/gtkfilesystem.h
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2003-10-08 04:14:55 +0000
committerFederico Mena Quintero <federico@src.gnome.org>2003-10-08 04:14:55 +0000
commit462aab4a64c5a00932fcb445a20bed4110684503 (patch)
tree1e26a017335f53de77f065bc4442c24a5e432398 /gtk/gtkfilesystem.h
parentcc46d181bd74f25793e0d5dd3c73396b37a71ed0 (diff)
downloadgtk+-462aab4a64c5a00932fcb445a20bed4110684503.tar.gz
Added methods for ::get_supports_bookmarks(), ::set_bookmarks(),
2003-10-07 Federico Mena Quintero <federico@ximian.com> * gtkfilesystem.h (struct _GtkFileSystemIface): Added methods for ::get_supports_bookmarks(), ::set_bookmarks(), ::list_bookmarks(). Added a ::bookmarks_changed() signal. * gtkfilesystem.c (gtk_file_system_get_supports_bookmarks): New function. (gtk_file_system_set_bookmarks): New function. (gtk_file_system_list_bookmarks): New function. (gtk_file_system_base_init): Create the "bookmarks-changed" signal. (gtk_file_paths_copy): New function. * gtkfilesystemunix.c (gtk_file_system_unix_get_supports_bookmarks): Implement. (gtk_file_system_unix_set_bookmarks): Implement. (gtk_file_system_unix_get_bookmarks): Implement. * gtkfilesystemgnomevfs.c (struct _GtkFileSystemGnomeVFS): Added fields for the bookmarks and the GConfClient. (gtk_file_system_gnome_vfs_set_bookmarks): Implement. (gtk_file_system_gnome_vfs_list_bookmarks): Implement. * gtkfilechooserprivate.h (struct _GtkFileChooserIface): Added methods for ::set_shortcut_folders(), ::list_shortcut_folders(). * gtkfilechooser.c (gtk_file_chooser_set_shortcut_folders): New function. (gtk_file_chooser_list_shortcut_folders): New function. * gtkfilechooserimpldefault.c (create_shortcuts_model): Unref the old shortcuts model if it exists. Create the nodes for the app-specific shortcut folders. (struct _GtkFileChooserImplDefault): Added a field for the shortcut_folders. (gtk_file_chooser_impl_default_set_shortcut_folders): Implement. (select_shortcuts_folder): New helper function. (gtk_file_chooser_impl_default_set_current_folder): Use select_shortcuts_folder(). (shortcuts_append_path): Get the file info here, instead of the caller. (shortcuts_append_home): Use shortcuts_append_path(). (shortcuts_append_file_system_roots): Likewise. (create_shortcuts_model): Add the app-specific shortcut folders and the bookmarks. (gtk_file_chooser_impl_default_list_shortcut_folders): Implement. (create_shortcuts_tree): Added a button to let the user add the current folder to the bookmarks. (gtk_file_chooser_impl_default_set_property): Connect to "bookmarks-changed" on the file system. (shortcuts_append_bookmarks): New function. * configure.ac: Depend on GConf.
Diffstat (limited to 'gtk/gtkfilesystem.h')
-rw-r--r--gtk/gtkfilesystem.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/gtk/gtkfilesystem.h b/gtk/gtkfilesystem.h
index f57616369c..8eefad487b 100644
--- a/gtk/gtkfilesystem.h
+++ b/gtk/gtkfilesystem.h
@@ -176,9 +176,18 @@ struct _GtkFileSystemIface
GtkFilePath *(*filename_to_path) (GtkFileSystem *file_system,
const gchar *path);
+ /* Bookmarks */
+
+ gboolean (*get_supports_bookmarks) (GtkFileSystem *file_system);
+ void (*set_bookmarks) (GtkFileSystem *file_system,
+ GSList *bookmarks,
+ GError **error);
+ GSList * (*list_bookmarks) (GtkFileSystem *file_system);
+
/* Signals
*/
- void (*roots_changed) (GtkFileSystem *file_system);
+ void (*roots_changed) (GtkFileSystem *file_system);
+ void (*bookmarks_changed) (GtkFileSystem *file_system);
};
GType gtk_file_system_get_type (void);
@@ -227,6 +236,14 @@ GtkFilePath *gtk_file_system_uri_to_path (GtkFileSystem *file_system,
GtkFilePath *gtk_file_system_filename_to_path (GtkFileSystem *file_system,
const gchar *filename);
+gboolean gtk_file_system_get_supports_bookmarks (GtkFileSystem *file_system);
+
+void gtk_file_system_set_bookmarks (GtkFileSystem *file_system,
+ GSList *bookmarks,
+ GError **error);
+GSList *gtk_file_system_list_bookmarks (GtkFileSystem *file_system);
+
+
/*
* Detailed information about a particular folder
*/
@@ -290,6 +307,7 @@ GtkFileInfo *gtk_file_folder_get_info (GtkFileFolder *folder,
gtk_file_path_get_string (path2))
GSList *gtk_file_paths_sort (GSList *paths);
+GSList *gtk_file_paths_copy (GSList *paths);
void gtk_file_paths_free (GSList *paths);
G_END_DECLS