[gtk+/filesystemmodel: 14/28] get rid of the full_attributes API and ignore pixbufs



commit 1734b3e17a05416d8243f11be5eaeb76203873a1
Author: Benjamin Otte <otte gnome org>
Date:   Sun Jun 21 20:42:13 2009 +0200

    get rid of the full_attributes API and ignore pixbufs
    
    This is to measure the actual performance of the current stuff

 gtk/gtkfilechooserdefault.c |    7 +++----
 gtk/gtkfilesystemmodel.c    |    9 +--------
 gtk/gtkfilesystemmodel.h    |    1 -
 3 files changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index fc8f889..441b04e 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -6702,7 +6702,7 @@ file_system_model_set (GtkFileSystemModel *model,
       g_value_set_boolean (value, info == NULL || _gtk_file_info_consider_as_directory (info));
       break;
     case MODEL_COL_PIXBUF:
-      if (info)
+      if (info && FALSE)
         g_value_take_object (value, _gtk_file_info_render_icon (info, GTK_WIDGET (impl), impl->icon_size));
       else
         g_value_set_object (value, NULL);
@@ -6756,8 +6756,7 @@ set_list_model (GtkFileChooserDefault *impl,
 
   impl->browse_files_model = _gtk_file_system_model_new (impl->current_folder,
                                                          "standard::name,standard::type,standard::display-name,"
-                                                         "standard::is-hidden,standard::is-backup",
-							 "standard,time,thumbnail",
+                                                         "standard::is-hidden,standard::is-backup,time::modified",
                                                          file_system_model_set,
                                                          impl,
                                                          MODEL_COL_NUM_COLUMNS,
@@ -8101,7 +8100,7 @@ get_selected_file_info_from_file_list (GtkFileChooserDefault *impl,
 				       gboolean              *had_selection)
 {
   GtkTreeSelection *selection;
-  GtkTreeIter iter, child_iter;
+  GtkTreeIter iter;
   GFileInfo *info;
 
   g_assert (!impl->select_multiple);
diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c
index 8e640f9..ef03b13 100644
--- a/gtk/gtkfilesystemmodel.c
+++ b/gtk/gtkfilesystemmodel.c
@@ -898,7 +898,6 @@ gtk_file_system_model_set_n_columns (GtkFileSystemModel *model,
 GtkFileSystemModel *
 _gtk_file_system_model_new (GFile *                    dir,
 			    const gchar *              attributes,
-			    const gchar *              full_attributes,
                             GtkFileSystemModelGetValue get_func,
                             gpointer                   get_data,
                             guint                      n_columns,
@@ -912,7 +911,6 @@ _gtk_file_system_model_new (GFile *                    dir,
   model = g_object_new (GTK_TYPE_FILE_SYSTEM_MODEL, NULL);
   model->dir = g_object_ref (dir);
   model->attributes = g_strdup (attributes);
-  model->full_attributes = g_strdup (full_attributes);
   model->get_func = get_func;
   model->get_data = get_data;
 
@@ -922,13 +920,8 @@ _gtk_file_system_model_new (GFile *                    dir,
 
   g_object_ref (model);
   g_file_enumerate_children_async (dir,
-#if 1
-                                   full_attributes ? full_attributes : attributes,
-                                   0,
-#else
                                    attributes,
-                                   full_attributes ? G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS : 0,
-#endif
+                                   0,
                                    IO_PRIORITY,
                                    model->cancellable,
                                    gtk_file_system_model_got_enumerator,
diff --git a/gtk/gtkfilesystemmodel.h b/gtk/gtkfilesystemmodel.h
index 7df9077..bf8e766 100644
--- a/gtk/gtkfilesystemmodel.h
+++ b/gtk/gtkfilesystemmodel.h
@@ -43,7 +43,6 @@ typedef void (*GtkFileSystemModelGetValue)   (GtkFileSystemModel *model,
 
 GtkFileSystemModel *_gtk_file_system_model_new              (GFile *             dir,
                                                              const gchar *       attributes,
-                                                             const gchar *       full_attributes,
                                                              GtkFileSystemModelGetValue get_func,
                                                              gpointer            get_data,
                                                              guint               n_columns,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]