[gtk+/wip/matthiasc/filechooser] Add a getter for the directory to file system model
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/matthiasc/filechooser] Add a getter for the directory to file system model
- Date: Fri, 3 Jul 2015 06:17:36 +0000 (UTC)
commit 34a3b15acb3b759ddc6d21ed654df8a2aea52206
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jul 2 16:12:22 2015 -0700
Add a getter for the directory to file system model
This will allow us to aovid reloading if the directory is
unchanged.
gtk/gtkfilesystemmodel.c | 9 +++++++++
gtk/gtkfilesystemmodel.h | 1 +
2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c
index 3f7e7b1..1485fc2 100644
--- a/gtk/gtkfilesystemmodel.c
+++ b/gtk/gtkfilesystemmodel.c
@@ -2182,3 +2182,12 @@ _gtk_file_system_model_add_and_query_files (GtkFileSystemModel *model,
model);
}
}
+
+GFile *
+_gtk_file_system_model_get_directory (GtkFileSystemModel *model)
+{
+ g_return_if_fail (GTK_IS_FILE_SYSTEM_MODEL (model));
+
+ return model->dir;
+}
+
diff --git a/gtk/gtkfilesystemmodel.h b/gtk/gtkfilesystemmodel.h
index b39be61..4a8bff4 100644
--- a/gtk/gtkfilesystemmodel.h
+++ b/gtk/gtkfilesystemmodel.h
@@ -50,6 +50,7 @@ GtkFileSystemModel *_gtk_file_system_model_new_for_directory(GFile *
gpointer get_data,
guint n_columns,
...);
+GFile * _gtk_file_system_model_get_directory (GtkFileSystemModel *model);
GCancellable * _gtk_file_system_model_get_cancellable (GtkFileSystemModel *model);
gboolean _gtk_file_system_model_iter_is_visible (GtkFileSystemModel *model,
GtkTreeIter *iter);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]