Author: benny
Date: 2007-01-07 23:18:02 +0000 (Sun, 07 Jan 2007)
New Revision: 24302

Modified:
   thunar/trunk/ChangeLog
   thunar/trunk/thunar/thunar-shortcuts-view.c
Log:
2007-01-08      Benedikt Meurer <[EMAIL PROTECTED]>

        * thunar/thunar-shortcuts-view.c(thunar_shortcuts_view_init): Ellipsize
          long shortcut names, but make sure "File System" still fits into the
          side pane.




Modified: thunar/trunk/ChangeLog
===================================================================
--- thunar/trunk/ChangeLog      2007-01-07 23:10:41 UTC (rev 24301)
+++ thunar/trunk/ChangeLog      2007-01-07 23:18:02 UTC (rev 24302)
@@ -1,5 +1,11 @@
 2007-01-08     Benedikt Meurer <[EMAIL PROTECTED]>
 
+       * thunar/thunar-shortcuts-view.c(thunar_shortcuts_view_init): Ellipsize
+         long shortcut names, but make sure "File System" still fits into the
+         side pane.
+
+2007-01-08     Benedikt Meurer <[EMAIL PROTECTED]>
+
        * thunar-vfs/thunar-vfs-volume-hal.c,
          thunar-vfs/thunar-vfs-volume.{c,h}: Add support for memory cards and
          generic removable disk drives. Bug #2652.

Modified: thunar/trunk/thunar/thunar-shortcuts-view.c
===================================================================
--- thunar/trunk/thunar/thunar-shortcuts-view.c 2007-01-07 23:10:41 UTC (rev 
24301)
+++ thunar/trunk/thunar/thunar-shortcuts-view.c 2007-01-07 23:18:02 UTC (rev 
24302)
@@ -1,6 +1,6 @@
 /* $Id$ */
 /*-
- * Copyright (c) 2005-2006 Benedikt Meurer <[EMAIL PROTECTED]>
+ * Copyright (c) 2005-2007 Benedikt Meurer <[EMAIL PROTECTED]>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
@@ -24,6 +24,13 @@
 #include <config.h>
 #endif
 
+#ifdef HAVE_MEMORY_H
+#include <memory.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
 #include <thunar/thunar-application.h>
 #include <thunar/thunar-dialogs.h>
 #include <thunar/thunar-dnd.h>
@@ -288,8 +295,12 @@
   exo_binding_new (G_OBJECT (view->preferences), "shortcuts-icon-size", 
G_OBJECT (view->icon_renderer), "size");
   exo_binding_new (G_OBJECT (view->preferences), "shortcuts-icon-emblems", 
G_OBJECT (view->icon_renderer), "emblems");
 
-  /* allocate the text renderer */
-  renderer = gtk_cell_renderer_text_new ();
+  /* allocate the text renderer (ellipsizing as required, but "File System" 
must fit) */
+  renderer = g_object_new (GTK_TYPE_CELL_RENDERER_TEXT,
+                           "ellipsize-set", TRUE,
+                           "ellipsize", PANGO_ELLIPSIZE_END,
+                           "width-chars", strlen (_("File System")),
+                           NULL);
   g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK 
(thunar_shortcuts_view_renamed), view);
   gtk_tree_view_column_pack_start (column, renderer, TRUE);
   gtk_tree_view_column_set_attributes (column, renderer,

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to