Making the note list ellipsize rather than scroll at long titles
authorepage <eopage@byu.net>
Sat, 16 May 2009 23:30:28 +0000 (23:30 +0000)
committerepage <eopage@byu.net>
Sat, 16 May 2009 23:30:28 +0000 (23:30 +0000)
git-svn-id: file:///svnroot/quicknote/trunk@46 bb7704e3-badb-4cfa-9ab3-9374dc87eaa2

src/simple_list.py

index b4678b7..e512e10 100644 (file)
@@ -10,8 +10,7 @@ published by the Free Software Foundation.
 """\r
 \r
 \r
-import pygtk\r
-pygtk.require("2.0")\r
+import pango\r
 import gtk\r
 \r
 \r
@@ -42,7 +41,7 @@ class SimpleList(gtk.ScrolledWindow):
                self._itemlist = gtk.ListStore(str, str)\r
 \r
                # ScrolledWindow\r
-               self.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)\r
+               self.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)\r
                self.set_shadow_type(gtk.SHADOW_IN)\r
 \r
                # Treeview\r
@@ -63,6 +62,7 @@ class SimpleList(gtk.ScrolledWindow):
 \r
                # Value-Spalte hinzuf├╝gen\r
                self._valueCell = gtk.CellRendererText()\r
+               self._valueCell.set_property("ellipsize", pango.ELLIPSIZE_END)\r
                self._valueColumn = gtk.TreeViewColumn("Caption")\r
                self._valueColumn.pack_start(self._valueCell, True)\r
                self._valueColumn.add_attribute(self._valueCell, "text", self.VALUE_IDX)\r