gnome-specimen r187 - in branches/import-from-bzr: . specimen
- From: wbolster svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-specimen r187 - in branches/import-from-bzr: . specimen
- Date: Tue, 17 Jun 2008 18:55:17 +0000 (UTC)
Author: wbolster
Date: Tue Jun 17 18:55:17 2008
New Revision: 187
URL: http://svn.gnome.org/viewvc/gnome-specimen?rev=187&view=rev
Log:
Add first style only when previewing font family
Only the first font variant/style is previewed when the
family name itself (i.e. top level rows in the listing) is
selected. Fixes bug #124274.
Modified:
branches/import-from-bzr/ (props changed)
branches/import-from-bzr/NEWS
branches/import-from-bzr/specimen/specimenwindow.py
Modified: branches/import-from-bzr/NEWS
==============================================================================
--- branches/import-from-bzr/NEWS (original)
+++ branches/import-from-bzr/NEWS Tue Jun 17 18:55:17 2008
@@ -2,10 +2,18 @@
Gnome Specimen 0.4pre
=====================
-(Release notes are a work in progress.)
+(These release notes are a work in progress.)
+
+User-visible changes since the previous release:
+- Adding font family only adds first variant/style (#124274)
+- ...
+
+Other changes:
+- ...
Translations:
- Arabic (Khaled Hosny)
+- ...
====================
Modified: branches/import-from-bzr/specimen/specimenwindow.py
==============================================================================
--- branches/import-from-bzr/specimen/specimenwindow.py (original)
+++ branches/import-from-bzr/specimen/specimenwindow.py Tue Jun 17 18:55:17 2008
@@ -414,19 +414,15 @@
def add_preview_from_path(self, path):
model = self.fonts_treeview.get_model()
+
+ # If the path contains only one item, this is a parent row. Adjust the
+ # path so that it points to the first child row.
if len(path) == 1:
- # add all child rows
- treeiter = model.iter_children(model.get_iter(path))
- while treeiter is not None:
- family, face = model.get(treeiter, 1, 2)
- self.add_preview(family, face)
- treeiter = model.iter_next(treeiter)
+ path = (path[0], 0)
- else:
- # this is a child row
- treeiter = model.get_iter(path)
- family, face = model.get(treeiter, 1, 2)
- self.add_preview(family, face)
+ treeiter = model.get_iter(path)
+ family, face = model.get(treeiter, 1, 2)
+ self.add_preview(family, face)
def add_preview(self, family, face):
'Adds a preview to the list of previews'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]