summaryrefslogtreecommitdiff
path: root/gtk/gtkfilesystem.h
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2004-03-19 19:41:06 +0000
committerFederico Mena Quintero <federico@src.gnome.org>2004-03-19 19:41:06 +0000
commit68030a7ee783af6a1e4279b16ba581a4a55ca014 (patch)
tree5beba45692ae303acbf5bc90a82806570ee43d69 /gtk/gtkfilesystem.h
parent0da002e0f23da102535a3eacdeb346e6093622d6 (diff)
downloadgtk+-68030a7ee783af6a1e4279b16ba581a4a55ca014.tar.gz
Fix #137520.
2004-03-19 Federico Mena Quintero <federico@ximian.com> Fix #137520. * gtk/gtkfilesystem.h (struct _GtkFileFolderIface): Added slots for an ::is_finished_loading() method and a ::finished_loading() signal at the end of the struct. * gtk/gtkfilesystem.c (gtk_file_folder_base_init): Create the "finished-loading" signal. (gtk_file_folder_is_finished_loading): New function. * gtk/gtkfilesystemunix.c (gtk_file_folder_unix_is_finished_loading): Implement. * gtk/gtkfilesystemmodel.c (struct _GtkFileSystemModelClass): New slot for a "finished-loading" signal. (gtk_file_system_model_class_init): Create the "finished-loading" signal. (struct _GtkFileSystemModel): New field idle_finished_loading_source. We emit the "finished-loading" signal in an idle if the root folder was done loading right in _gtk_file_system_model_new(), so that the caller has a chance to connect to the signal. (_gtk_file_system_model_new): Connect to the normal signals of the folder even if the initial _list_children() fails. Also, see if the folder is finished loading; connect to the "finished-loading" signal otherwise. (gtk_file_system_model_finalize): Remove the idle handler. * gtk/gtkfilechooserdefault.c (set_list_model): Set a busy cursor and connect to the model's "finished-loading" signal. (get_toplevel): New helper function. (error_message): Use get_toplevel(). (trap_activate_cb): Likewise. (location_popup_handler): Likewise. (set_busy_cursor): New function. (browse_files_model_finished_loading_cb): New callback.
Diffstat (limited to 'gtk/gtkfilesystem.h')
-rw-r--r--gtk/gtkfilesystem.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk/gtkfilesystem.h b/gtk/gtkfilesystem.h
index 1124fc9f52..d7a570024f 100644
--- a/gtk/gtkfilesystem.h
+++ b/gtk/gtkfilesystem.h
@@ -307,6 +307,10 @@ struct _GtkFileFolderIface
GSList *paths);
void (*files_removed) (GtkFileFolder *monitor,
GSList *paths);
+
+ /* Method / signal */
+ gboolean (*is_finished_loading) (GtkFileFolder *folder);
+ void (*finished_loading) (GtkFileFolder *folder);
};
GType gtk_file_folder_get_type (void);
@@ -317,6 +321,8 @@ GtkFileInfo *gtk_file_folder_get_info (GtkFileFolder *folder,
const GtkFilePath *path,
GError **error);
+gboolean gtk_file_folder_is_finished_loading (GtkFileFolder *folder);
+
/* GtkFilePath */
#define GTK_TYPE_FILE_PATH (gtk_file_path_get_type ())