[gtk+/filesystemmodel: 11/20] Only query the absolutely necessary attributes
- From: Benjamin Otte <otte src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+/filesystemmodel: 11/20] Only query the absolutely necessary attributes
- Date: Wed, 1 Jul 2009 08:42:42 +0000 (UTC)
commit 08f5202516f925cf55e282be3de702945d8ef582
Author: Benjamin Otte <otte gnome org>
Date: Tue Jun 30 23:45:39 2009 +0200
Only query the absolutely necessary attributes
Since the time taken by g_file_enumerate_children() depends a lot on the
attributes that are queried, we query the minimum attributes that need
to be queired to display the file chooser.
In particular, the attributes for loading the icon are ignored, as icons
are loaded on demand (see previous commit).
gtk/gtkfilechooserdefault.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 7b9c081..790f591 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -191,6 +191,9 @@ typedef enum {
SHORTCUT_TYPE_RECENT
} ShortcutType;
+#define MODEL_ATTRIBUTES "standard::name,standard::type,standard::display-name," \
+ "standard::is-hidden,standard::is-backup,standard::size," \
+ "standard::content-type,time::modified"
enum {
/* the first 3 must be these due to settings caching sort column */
MODEL_COL_NAME,
@@ -6861,7 +6864,7 @@ set_list_model (GtkFileChooserDefault *impl,
impl->browse_files_model =
_gtk_file_system_model_new (impl->current_folder,
- "standard,time,thumbnail::*",
+ MODEL_ATTRIBUTES,
file_system_model_set,
impl,
MODEL_COL_NUM_COLUMNS,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]