Permalink
Browse files

Add an ellipsize after titles that don't fit into the column.

  • Loading branch information...
1 parent 7fc6f45 commit 3f929f6505d7430ab7aa5e27273e8af0df9b07e1 Frank Smit committed Mar 7, 2010
Showing with 5 additions and 0 deletions.
  1. +3 −0 plugins/anime.py
  2. +2 −0 plugins/search.py
View
@@ -8,6 +8,7 @@
import os
import gtk
+import pango
import gobject
from lib.plugin import BasePlugin
@@ -373,6 +374,8 @@ def _create_columns(self, treeview, list_id):
# Title
renderer = gtk.CellRendererText()
+ renderer.set_property('ellipsize-set', True)
+ renderer.set_property('ellipsize', pango.ELLIPSIZE_END)
column = gtk.TreeViewColumn('Title', renderer, text=2)
column.set_sort_column_id(2)
column.set_resizable(True)
View
@@ -364,6 +364,8 @@ def _create_columns(self):
# Title
renderer = gtk.CellRendererText()
+ renderer.set_property('ellipsize-set', True)
+ renderer.set_property('ellipsize', pango.ELLIPSIZE_END)
column = gtk.TreeViewColumn('Title', renderer, text=1)
column.set_sort_column_id(1)
column.set_resizable(True)

0 comments on commit 3f929f6

Please sign in to comment.