[Xfce4-commits] <thunar:progress-dialog-experiments> Use g_utf8_strlen to calculate the sidepane width. Bugs #5390 and #3965.

Jannis Pohlmann noreply at xfce.org
Fri Sep 18 23:46:02 CEST 2009


Updating branch refs/heads/progress-dialog-experiments
         to 10dbf54f58c1b78e2f65863212e1e2179f24e318 (commit)
       from 2028e116ebf36bf0461f1d2f5b186c84259cb89c (commit)

commit 10dbf54f58c1b78e2f65863212e1e2179f24e318
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Fri Sep 18 23:41:06 2009 +0200

    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.

 thunar/thunar-shortcuts-view.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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);



More information about the Xfce4-commits mailing list