[gtk+/gtk-2.90] Enable the size column in recent files/search



commit 80a6d1de6f79c0e93d7a08ad53897b113050e840
Author: Benjamin Otte <otte gnome org>
Date:   Thu Jun 25 13:18:04 2009 +0200

    Enable the size column in recent files/search
    
    Previously information about file sizes was not available for search
    results and recent files, so the column was always hidden. As this
    information is now available, we can stop the special handling and use
    the same setting as in browse mode.

 gtk/gtkfilechooserdefault.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 7d2c88e..7b23ca2 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -4004,9 +4004,8 @@ show_size_column_toggled_cb (GtkCheckMenuItem *item,
 {
   impl->show_size_column = gtk_check_menu_item_get_active (item);
 
-  if (impl->list_size_column)
-    gtk_tree_view_column_set_visible (impl->list_size_column,
-                                      impl->show_size_column);
+  gtk_tree_view_column_set_visible (impl->list_size_column,
+                                    impl->show_size_column);
 }
 
 /* Shows an error dialog about not being able to select a dragged file */
@@ -5955,8 +5954,7 @@ settings_load (GtkFileChooserDefault *impl)
     gtk_expander_set_expanded (GTK_EXPANDER (impl->save_expander), expand_folders);
 
   impl->show_size_column = show_size_column;
-  if (impl->list_size_column)
-    gtk_tree_view_column_set_visible (impl->list_size_column, show_size_column);
+  gtk_tree_view_column_set_visible (impl->list_size_column, show_size_column);
 
   impl->sort_column = sort_column;
   impl->sort_order = sort_order;
@@ -9627,9 +9625,6 @@ recent_activate (GtkFileChooserDefault *impl)
 
   recent_hide_entry (impl);
 
-  /* hide the file size column if it's visible */
-  gtk_tree_view_column_set_visible (impl->list_size_column, FALSE);
-
   file_list_set_sort_column_ids (impl);
   recent_start_loading (impl);
 }



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