gnome-specimen r15 - trunk-from-bzr
- From: wbolster svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-specimen r15 - trunk-from-bzr
- Date: Tue, 17 Jun 2008 18:41:28 +0000 (UTC)
Author: wbolster
Date: Tue Jun 17 18:41:28 2008
New Revision: 15
URL: http://svn.gnome.org/viewvc/gnome-specimen?rev=15&view=rev
Log:
* specimenwindow.py:
- properly update the view when the text changes (vertical
cell resizing is still a problem, though)
Modified:
trunk-from-bzr/ (props changed)
trunk-from-bzr/specimenwindow.py
Modified: trunk-from-bzr/specimenwindow.py
==============================================================================
--- trunk-from-bzr/specimenwindow.py (original)
+++ trunk-from-bzr/specimenwindow.py Tue Jun 17 18:41:28 2008
@@ -115,7 +115,6 @@
def initialize_previews_pane(self, glade_tree):
'Initializes the preview pane'
# preview widgets
- self.preview_treeview = glade_tree.get_widget('preview-treeview')
self.preview_size_spinbutton = glade_tree.get_widget('preview-size-spinbutton')
self.preview_text_entry = glade_tree.get_widget('preview-text-entry')
self.previews_treeview = glade_tree.get_widget('previews-treeview')
@@ -134,7 +133,6 @@
cell_renderer = gtk.CellRendererText()
preview_column.pack_start(cell_renderer, True)
preview_column.set_cell_data_func(cell_renderer, self.cell_data_cb)
- #preview_column.add_attribute(cell_renderer, 'text', 0)
self.window.show_all()
# TODO: do sensible stuff with the selection
@@ -152,10 +150,10 @@
else:
# this is a preview row
(name, face) = model.get(iter, 0, 2)
- cell.set_property('text', name)
self._set_cell_attributes_for_preview_cell(cell, face)
def _set_cell_attributes_for_name_cell(self, cell, name):
+ #TODO: netjes maken
cell.set_property('text', name)
try:
# set the values
@@ -180,6 +178,8 @@
pass
def _set_cell_attributes_for_preview_cell(self, cell, face):
+ cell.set_property('text', self.preview_text)
+
font_description = face.describe()
cell.set_property('background', 'white')
cell.set_property('foreground', 'black')
@@ -209,6 +209,7 @@
# TODO: update the previews
print 'update_previews'
+ self.previews_treeview.queue_draw()
#self.update_preview_label()
# Allow this method to be used as a single-run idle timeout
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]