fontchooserwidget: Refactor code so we actually optimize

Previously, we would pango_font_describe() every time the code ran and
we wouldn't ever hit the optimized quick exit.

The code now is a lot more complex because the
compute-actual-value-when-required-the-first-time approach is not
supported out of the box in GtkTreeModel (or GValue).
This commit is contained in:
Benjamin Otte
2015-07-22 15:04:34 +02:00
parent 3fc5d09890
commit 31191d5566
2 changed files with 106 additions and 60 deletions

View File

@ -8,7 +8,7 @@
<!-- column-name face -->
<column type="PangoFontFace"/>
<!-- column-name description -->
<column type="PangoFontDescription"/>
<column type="GtkDelayedFontDescription"/>
<!-- column-name preview-title -->
<column type="gchararray"/>
</columns>