[gtk+/composite-templates] Clear cached row sensitivity when the filter changes
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/composite-templates] Clear cached row sensitivity when the filter changes
- Date: Sun, 15 Jul 2012 21:51:11 +0000 (UTC)
commit 0ec77c2eda042be8bfd75e84d0c495b8bb33be9f
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jul 15 00:39:02 2012 -0400
Clear cached row sensitivity when the filter changes
Now that filters may affect sensitivity of rows, we need
to clear the sensitivity column from the cache when the
filter changes. This fixes the problem where selecting a
different filter does not update the sensitivity of folders
until you change directories.
gtk/gtkfilechooserdefault.c | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 19cd8bb..cec6852 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -6204,13 +6204,6 @@ gtk_file_chooser_default_unmap (GtkWidget *widget)
GTK_WIDGET_CLASS (_gtk_file_chooser_default_parent_class)->unmap (widget);
}
-static void
-install_list_model_filter (GtkFileChooserDefault *impl)
-{
- _gtk_file_system_model_set_filter (impl->browse_files_model,
- impl->current_filter);
-}
-
#define COMPARE_DIRECTORIES \
GtkFileChooserDefault *impl = user_data; \
GtkFileSystemModel *fs_model = GTK_FILE_SYSTEM_MODEL (model); \
@@ -6991,7 +6984,7 @@ set_list_model (GtkFileChooserDefault *impl,
g_signal_connect (impl->browse_files_model, "finished-loading",
G_CALLBACK (browse_files_model_finished_loading_cb), impl);
- install_list_model_filter (impl);
+ _gtk_file_system_model_set_filter (impl->browse_files_model, impl->current_filter);
profile_end ("end", NULL);
@@ -9688,13 +9681,22 @@ set_current_filter (GtkFileChooserDefault *impl,
filter_index);
if (impl->browse_files_model)
- install_list_model_filter (impl);
+ {
+ _gtk_file_system_model_set_filter (impl->browse_files_model, impl->current_filter);
+ _gtk_file_system_model_clear_cache (impl->browse_files_model, MODEL_COL_IS_SENSITIVE);
+ }
if (impl->search_model)
- _gtk_file_system_model_set_filter (impl->search_model, filter);
+ {
+ _gtk_file_system_model_set_filter (impl->search_model, filter);
+ _gtk_file_system_model_clear_cache (impl->search_model, MODEL_COL_IS_SENSITIVE);
+ }
if (impl->recent_model)
- _gtk_file_system_model_set_filter (impl->recent_model, filter);
+ {
+ _gtk_file_system_model_set_filter (impl->recent_model, filter);
+ _gtk_file_system_model_clear_cache (impl->recent_model, MODEL_COL_IS_SENSITIVE);
+ }
g_object_notify (G_OBJECT (impl), "filter");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]