[Xfce4-commits] [xfce/thunar] 01/01: Fix of messed up row-height with disabled "automatically expand columns as needed" in detailed view. (Part III) - use of "gdk_threads_add_idle" to make sure that queue_resize is finished before thunar_details_view_set_fixed_columns is called - revert of making "thunar_standard_view_reload" public, not required any more (Bug #14548)

noreply at xfce.org noreply at xfce.org
Mon Jul 30 23:26:17 CEST 2018


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

a   l   e   x       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       x   f   c   e   -   4   .   1   4   
   in repository xfce/thunar.

commit 069141d6abb3826cdf866618f9f1b8422a9ac728
Author: Alexander Schwinn <acs82 at gmx.de>
Date:   Mon Jul 30 22:06:20 2018 +0200

    Fix of messed up row-height with disabled "automatically expand columns
    as needed" in detailed view. (Part III)
    - use of "gdk_threads_add_idle" to make sure that queue_resize is finished before thunar_details_view_set_fixed_columns is called
    - revert of making "thunar_standard_view_reload" public, not required any more
    (Bug #14548)
---
 thunar/thunar-details-view.c  | 18 ++++++++++++++----
 thunar/thunar-standard-view.c |  4 +++-
 thunar/thunar-standard-view.h |  2 --
 3 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/thunar/thunar-details-view.c b/thunar/thunar-details-view.c
index 2b402b9..5dabad6 100644
--- a/thunar/thunar-details-view.c
+++ b/thunar/thunar-details-view.c
@@ -897,6 +897,18 @@ thunar_details_view_columns_changed (ThunarColumnModel *column_model,
 
 
 
+static gboolean
+thunar_details_view_zoom_level_changed_reload_fixed_columns (gpointer data)
+{
+  ThunarDetailsView *details_view = data;
+  _thunar_return_val_if_fail (THUNAR_IS_DETAILS_VIEW (details_view), FALSE);
+
+  thunar_details_view_set_fixed_columns (details_view, TRUE);
+  return FALSE;
+}
+
+
+
 static void
 thunar_details_view_zoom_level_changed (ThunarDetailsView *details_view)
 {
@@ -921,10 +933,8 @@ thunar_details_view_zoom_level_changed (ThunarDetailsView *details_view)
 
   if (fixed_columns_used)
     {
-      thunar_details_view_set_fixed_columns (details_view, TRUE);
-
-      /* For unknown reason a reload is required to display the correct row-height (otherwise some rows will keep the old height )*/
-      thunar_standard_view_reload (THUNAR_VIEW (details_view), TRUE);
+      /* Call when idle to ensure that gtk_tree_view_column_queue_resize got finished */
+      gdk_threads_add_idle (thunar_details_view_zoom_level_changed_reload_fixed_columns, details_view);
     }
 }
 
diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index 6846c43..a5e2966 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -139,6 +139,8 @@ static ThunarZoomLevel      thunar_standard_view_get_zoom_level             (Thu
 static void                 thunar_standard_view_set_zoom_level             (ThunarView               *view,
                                                                              ThunarZoomLevel           zoom_level);
 static void                 thunar_standard_view_reset_zoom_level           (ThunarView               *view);
+static void                 thunar_standard_view_reload                     (ThunarView               *view,
+                                                                             gboolean                  reload_info);
 static gboolean             thunar_standard_view_get_visible_range          (ThunarView               *view,
                                                                              ThunarFile              **start_file,
                                                                              ThunarFile              **end_file);
@@ -1724,7 +1726,7 @@ thunar_standard_view_reset_zoom_level (ThunarView *view)
 
 
 
-void
+static void
 thunar_standard_view_reload (ThunarView *view,
                              gboolean    reload_info)
 {
diff --git a/thunar/thunar-standard-view.h b/thunar/thunar-standard-view.h
index 7d7f4f8..f851368 100644
--- a/thunar/thunar-standard-view.h
+++ b/thunar/thunar-standard-view.h
@@ -148,8 +148,6 @@ void  thunar_standard_view_context_menu       (ThunarStandardView *standard_view
 
 void  thunar_standard_view_queue_popup        (ThunarStandardView *standard_view,
                                                GdkEventButton     *event);
-void  thunar_standard_view_reload             (ThunarView         *view,
-                                               gboolean            reload_info);
 
 void  thunar_standard_view_selection_changed  (ThunarStandardView *standard_view);
 

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


More information about the Xfce4-commits mailing list