Added fields for the shortcuts tree and its model. (create_file_list):

2003-09-30  Federico Mena Quintero  <federico@ximian.com>

	* 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().
This commit is contained in:
Federico Mena Quintero
2003-10-01 00:53:59 +00:00
committed by Federico Mena Quintero
parent e8ea480893
commit 39e208d865
2 changed files with 309 additions and 19 deletions

View File

@ -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,