[Xfce4-commits] [xfce/thunar] 02/03: Redraw the details view on row changes

noreply at xfce.org noreply at xfce.org
Thu Apr 2 19:43:02 CEST 2015


This is an automated email from the git hooks/post-receive script.

hjudt pushed a commit to branch master
in repository xfce/thunar.

commit 2c828c905730cb6962d2174a7c656107ea39c365
Author: Harald Judt <h.judt at gmx.at>
Date:   Tue Mar 31 23:32:17 2015 +0200

    Redraw the details view on row changes
    
    This cures some update problems that can be observed when setting
    e.g. date modified as sort column and some script changes various
    files in the background. Example script:
    
    while true; do
      for f in l m n o a b c d e f g h i j k; do
        touch "$f"
        sleep 0.5
      done
    done
---
 thunar/thunar-details-view.c |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/thunar/thunar-details-view.c b/thunar/thunar-details-view.c
index f3db8f0..d2e0a2e 100644
--- a/thunar/thunar-details-view.c
+++ b/thunar/thunar-details-view.c
@@ -94,6 +94,10 @@ static void         thunar_details_view_row_activated           (GtkTreeView
                                                                  GtkTreePath            *path,
                                                                  GtkTreeViewColumn      *column,
                                                                  ThunarDetailsView      *details_view);
+static void         thunar_details_view_row_changed             (GtkTreeView            *tree_view,
+                                                                 GtkTreePath            *path,
+                                                                 GtkTreeViewColumn      *column,
+                                                                 ThunarDetailsView      *details_view);
 static void         thunar_details_view_columns_changed         (ThunarColumnModel      *column_model,
                                                                  ThunarDetailsView      *details_view);
 static void         thunar_details_view_zoom_level_changed      (ThunarDetailsView      *details_view);
@@ -229,6 +233,8 @@ thunar_details_view_init (ThunarDetailsView *details_view)
   /* connect to the default column model */
   details_view->column_model = thunar_column_model_get_default ();
   g_signal_connect (G_OBJECT (details_view->column_model), "columns-changed", G_CALLBACK (thunar_details_view_columns_changed), details_view);
+  g_signal_connect_after (G_OBJECT (THUNAR_STANDARD_VIEW (details_view)->model), "row-changed",
+                          G_CALLBACK (thunar_details_view_row_changed), details_view);
 
   /* allocate the shared right-aligned text renderer */
   right_aligned_renderer = g_object_new (THUNAR_TYPE_TEXT_RENDERER, "xalign", 1.0f, NULL);
@@ -793,6 +799,19 @@ thunar_details_view_row_activated (GtkTreeView       *tree_view,
 
 
 static void
+thunar_details_view_row_changed (GtkTreeView       *tree_view,
+                                 GtkTreePath       *path,
+                                 GtkTreeViewColumn *column,
+                                 ThunarDetailsView *details_view)
+{
+  _thunar_return_if_fail (THUNAR_IS_DETAILS_VIEW (details_view));
+
+  gtk_widget_queue_draw (GTK_WIDGET (details_view));
+}
+
+
+
+static void
 thunar_details_view_columns_changed (ThunarColumnModel *column_model,
                                      ThunarDetailsView *details_view)
 {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list