adding resizing ability in treeview cols in advanced finding a gtk bug [I reported it]

This commit is contained in:
Nikos Kouremenos 2005-05-14 02:09:28 +00:00
parent 961ded4882
commit 288b68dd53
1 changed files with 8 additions and 8 deletions

View File

@ -92,16 +92,15 @@ class Advanced_configuration_window:
self.xml.signal_autoconnect(self) self.xml.signal_autoconnect(self)
treeview = self.xml.get_widget('advanced_treeview') treeview = self.xml.get_widget('advanced_treeview')
self.model = gtk.TreeStore(gobject.TYPE_STRING, self.model = gtk.TreeStore(str, str, str)
gobject.TYPE_STRING,
gobject.TYPE_STRING)
self.model.set_sort_column_id(0, gtk.SORT_ASCENDING) self.model.set_sort_column_id(0, gtk.SORT_ASCENDING)
self.modelfilter = self.model.filter_new() self.modelfilter = self.model.filter_new()
self.modelfilter.set_visible_func(self.visible_func) self.modelfilter.set_visible_func(self.visible_func)
renderer_text = gtk.CellRendererText() renderer_text = gtk.CellRendererText()
treeview.insert_column_with_attributes(-1, 'Preference Name', col = treeview.insert_column_with_attributes(-1, 'Preference Name',
renderer_text, text = 0) renderer_text, text = 0)
col.set_resizable(True)
renderer_text = gtk.CellRendererText() renderer_text = gtk.CellRendererText()
renderer_text.set_property('editable', 1) renderer_text.set_property('editable', 1)
@ -109,6 +108,7 @@ class Advanced_configuration_window:
col = treeview.insert_column_with_attributes(-1, 'Value', col = treeview.insert_column_with_attributes(-1, 'Value',
renderer_text, text = 1) renderer_text, text = 1)
#col.set_resizable(True) seems like a GTK+ bug DO NOT REMOVE
col.set_max_width(250) col.set_max_width(250)
renderer_text = gtk.CellRendererText() renderer_text = gtk.CellRendererText()