[Pkg-xfce-commits] r3960 - in desktop/trunk/thunar/debian: . patches

Lionel Le Folgoc mrpouit-guest at alioth.debian.org
Fri Apr 23 09:08:32 UTC 2010


Author: mrpouit-guest
Date: 2010-04-23 21:08:32 +0000 (Fri, 23 Apr 2010)
New Revision: 3960

Added:
   desktop/trunk/thunar/debian/patches/06_fix-sidepane-width.patch
   desktop/trunk/thunar/debian/patches/07_update-cursor-on-delete.patch
   desktop/trunk/thunar/debian/patches/08_refilter-tree-hidden-dir.patch
Modified:
   desktop/trunk/thunar/debian/changelog
Log:
* debian/patches: import some patches from lucid to fix several minor
  issues (also fixed in upstream git master):
  - 06_fix-sidepane-width.patch: use g_utf8_strlen to calculate the
    sidepane width, prevents it from being too large with chinese or
    cyrillic locales.                                         lp: #501211
  - 07_update-cursor-on-delete.patch: properly update the cursor when
    a row is deleted in, fixes weird cursor behaviors (Xfce #5361).
  - 08_refilter-tree-hidden-dir.patch: refilter tree model view when
    entering/leaving an hidden directory, prevents hidden dir/files
    from being wrongly displayed.                             lp: #484220

Modified: desktop/trunk/thunar/debian/changelog
===================================================================
--- desktop/trunk/thunar/debian/changelog	2010-04-23 05:47:57 UTC (rev 3959)
+++ desktop/trunk/thunar/debian/changelog	2010-04-23 21:08:32 UTC (rev 3960)
@@ -3,6 +3,16 @@
   * debian/patches/05_fix-crash-drag-gdk-none.patch: backport patch from
     upstream git to fix crash when dragging non-file data over a window
     (thanks Daniel Gibson for the hint).                        closes: #575665
+  * debian/patches: import some patches from lucid to fix several minor
+    issues (also fixed in upstream git master):
+    - 06_fix-sidepane-width.patch: use g_utf8_strlen to calculate the
+      sidepane width, prevents it from being too large with chinese or
+      cyrillic locales.                                         lp: #501211
+    - 07_update-cursor-on-delete.patch: properly update the cursor when
+      a row is deleted in, fixes weird cursor behaviors (Xfce #5361).
+    - 08_refilter-tree-hidden-dir.patch: refilter tree model view when
+      entering/leaving an hidden directory, prevents hidden dir/files
+      from being wrongly displayed.                             lp: #484220
   * debian/control: add myself to uploaders.
 
  -- Lionel Le Folgoc <mrpouit at gmail.com>  Sun, 28 Mar 2010 15:44:01 +0200

Added: desktop/trunk/thunar/debian/patches/06_fix-sidepane-width.patch
===================================================================
--- desktop/trunk/thunar/debian/patches/06_fix-sidepane-width.patch	                        (rev 0)
+++ desktop/trunk/thunar/debian/patches/06_fix-sidepane-width.patch	2010-04-23 21:08:32 UTC (rev 3960)
@@ -0,0 +1,23 @@
+From 79bc169e0c90c74d21d21d3d73730001a72a2dcc Mon Sep 17 00:00:00 2001
+From: Jannis Pohlmann <jannis at xfce.org>
+Date: Fri, 18 Sep 2009 21:41:06 +0000
+Subject: Use g_utf8_strlen to calculate the sidepane width. Bugs #5390 and #3965.
+
+Using strlen() for the number of characters is unrealistic when dealing
+with multibyte strings.
+---
+diff --git a/thunar/thunar-shortcuts-view.c b/thunar/thunar-shortcuts-view.c
+index 2ba4b61..c7df182 100644
+--- a/thunar/thunar-shortcuts-view.c
++++ b/thunar/thunar-shortcuts-view.c
+@@ -274,7 +274,7 @@ thunar_shortcuts_view_init (ThunarShortcutsView *view)
+   renderer = g_object_new (GTK_TYPE_CELL_RENDERER_TEXT,
+                            "ellipsize-set", TRUE,
+                            "ellipsize", PANGO_ELLIPSIZE_END,
+-                           "width-chars", strlen (_("File System")),
++                           "width-chars", g_utf8_strlen (_("File System"), -1),
+                            NULL);
+   g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (thunar_shortcuts_view_renamed), view);
+   gtk_tree_view_column_pack_start (column, renderer, TRUE);
+--
+cgit v0.8.2.1

Added: desktop/trunk/thunar/debian/patches/07_update-cursor-on-delete.patch
===================================================================
--- desktop/trunk/thunar/debian/patches/07_update-cursor-on-delete.patch	                        (rev 0)
+++ desktop/trunk/thunar/debian/patches/07_update-cursor-on-delete.patch	2010-04-23 21:08:32 UTC (rev 3960)
@@ -0,0 +1,37 @@
+From e49759d5b54c4f44c039648148c47d444ffded0f Mon Sep 17 00:00:00 2001
+From: Jannis Pohlmann <jannis at xfce.org>
+Date: Sat, 9 Jan 2010 22:36:15 +0100
+Subject: [PATCH 3/8] Properly update the cursor when a row is deleted in (bug #5361).
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+When cursor and selection are out of sync weird things happen, as
+described by Jérôme in the bug comment on
+http://bugzilla.xfce.org/show_bug.cgi?id=5361.
+---
+ thunar/thunar-standard-view.c |    6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
+index 8661861..e6fb490 100644
+--- a/thunar/thunar-standard-view.c
++++ b/thunar/thunar-standard-view.c
+@@ -3019,10 +3019,12 @@ thunar_standard_view_restore_selection (ThunarListModel    *model,
+    * path is set by thunar_standard_view_row_deleted() if this is the case */
+   if (G_LIKELY (standard_view->priv->selection_before_delete != NULL))
+     {
+-      /* Restore the selection by selecting either the row before or the new
+-       * first row */
++      /* Restore the selection by selecting either the row before or the new first row */
+       (*THUNAR_STANDARD_VIEW_GET_CLASS (standard_view)->select_path) (standard_view, standard_view->priv->selection_before_delete);
+ 
++      /* place the cursor on the selected path */
++      (*THUNAR_STANDARD_VIEW_GET_CLASS (standard_view)->set_cursor) (standard_view, standard_view->priv->selection_before_delete, FALSE);
++
+       /* Free the tree path */
+       gtk_tree_path_free (standard_view->priv->selection_before_delete);
+       standard_view->priv->selection_before_delete = NULL;
+-- 
+1.6.3.3
+

Added: desktop/trunk/thunar/debian/patches/08_refilter-tree-hidden-dir.patch
===================================================================
--- desktop/trunk/thunar/debian/patches/08_refilter-tree-hidden-dir.patch	                        (rev 0)
+++ desktop/trunk/thunar/debian/patches/08_refilter-tree-hidden-dir.patch	2010-04-23 21:08:32 UTC (rev 3960)
@@ -0,0 +1,95 @@
+From 49ca1071a69776bcbff3ae987dca79e99bbca15e Mon Sep 17 00:00:00 2001
+From: Jannis Pohlmann <jannis at xfce.org>
+Date: Sun, 10 Jan 2010 14:36:11 +0100
+Subject: [PATCH 4/8] Refilter the tree model when a hidden dir is entered/left (bug #6142).
+
+What's new is that instead of only refiltering when entering a directory
+that is within a hidden hierarchy, we now do the same when leaving a
+hidden directory or directory with hidden ancestor. This makes sure
+hidden directories are properly removed from the tree view side pane
+when hidden directories are turned off, unless you're browsing them.
+---
+ thunar/thunar-tree-view.c |   47 ++++++++++++++++++++++++++++++++++++++++----
+ 1 files changed, 42 insertions(+), 5 deletions(-)
+
+diff --git a/thunar/thunar-tree-view.c b/thunar/thunar-tree-view.c
+index 3836a32..cfe1100 100644
+--- a/thunar/thunar-tree-view.c
++++ b/thunar/thunar-tree-view.c
+@@ -535,15 +535,46 @@ thunar_tree_view_set_current_directory (ThunarNavigator *navigator,
+                                         ThunarFile      *current_directory)
+ {
+   ThunarTreeView *view = THUNAR_TREE_VIEW (navigator);
+-  ThunarFile     *file, *file_parent;
++  ThunarFile     *file;
++  ThunarFile     *file_parent;
++  gboolean        needs_refiltering = FALSE;
+ 
+   /* check if we already use that directory */
+   if (G_UNLIKELY (view->current_directory == current_directory))
+     return;
+ 
+-  /* disconnect from the previous current directory */
++  /* check if we have an active directory */
+   if (G_LIKELY (view->current_directory != NULL))
+-    g_object_unref (G_OBJECT (view->current_directory));
++    {
++      /* update the filter if the old current directory, or one of it's parents, is hidden */
++      if (!view->show_hidden)
++        {
++          /* look if the file or one of it's parents is hidden */
++          for (file = g_object_ref (G_OBJECT (view->current_directory)); file != NULL; file = file_parent)
++            {
++              /* check if this file is hidden */
++              if (thunar_file_is_hidden (file))
++                {
++                  /* schedule an update of the filter after the current directory has been changed */
++                  needs_refiltering = TRUE;
++
++                  /* release the file */
++                  g_object_unref (G_OBJECT (file));
++
++                  break;
++                }
++            
++              /* get the file parent */
++              file_parent = thunar_file_get_parent (file, NULL);
++
++              /* release the file */
++              g_object_unref (G_OBJECT (file));
++            }
++        }
++
++      /* disconnect from the previous current directory */
++      g_object_unref (G_OBJECT (view->current_directory));
++    }
+ 
+   /* activate the new current directory */
+   view->current_directory = current_directory;
+@@ -554,8 +585,10 @@ thunar_tree_view_set_current_directory (ThunarNavigator *navigator,
+       /* take a reference on the directory */
+       g_object_ref (G_OBJECT (current_directory));
+ 
+-      /* update the filter if the new current directory, or one of it's parents, is hidden */
+-      if (!view->show_hidden)
++      /* update the filter if the new current directory, or one of it's parents, is 
++       * hidden. we don't have to check this unless refiltering needs to be done 
++       * anyway */
++      if (!needs_refiltering && !view->show_hidden)
+         {
+           /* look if the file or one of it's parents is hidden */
+           for (file = g_object_ref (G_OBJECT (current_directory)); file != NULL; file = file_parent)
+@@ -593,6 +626,10 @@ thunar_tree_view_set_current_directory (ThunarNavigator *navigator,
+         }
+     }
+ 
++  /* refilter the model if necessary */
++  if (needs_refiltering)
++    thunar_tree_model_refilter (view->model);
++
+   /* notify listeners */
+   g_object_notify (G_OBJECT (view), "current-directory");
+ }
+-- 
+1.6.3.3
+




More information about the Pkg-xfce-commits mailing list