openshot.code team mailing list archive
-
openshot.code team
-
Mailing list archive
-
Message #00273
[Branch ~openshot.code/openshot/main] Rev 608: Applied patch from Diaa Sami (diaa.sami), to improve the font dialog on the title window, to have...
------------------------------------------------------------
revno: 608
fixes bug: https://launchpad.net/bugs/863679
committer: Jonathan Thomas <Jonathan.Oomph@xxxxxxxxx>
branch nick: openshot
timestamp: Mon 2012-01-02 01:31:17 -0600
message:
Applied patch from Diaa Sami (diaa.sami), to improve the font dialog on the title window, to have interactive search.
modified:
openshot/windows/fontselector.py
--
lp:openshot
https://code.launchpad.net/~openshot.code/openshot/main
Your team OpenShot Code is subscribed to branch lp:openshot.
To unsubscribe from this branch go to https://code.launchpad.net/~openshot.code/openshot/main/+edit-subscription
=== modified file 'openshot/windows/fontselector.py'
--- openshot/windows/fontselector.py 2010-04-03 18:52:42 +0000
+++ openshot/windows/fontselector.py 2012-01-02 07:31:17 +0000
@@ -38,19 +38,18 @@
self.calling_form = instance
#get the list of available fonts
- fonts = gtk.ListStore(pango.FontFamily, str)
+ fonts = gtk.ListStore(str)
self.init_treeview(self.treeFontList)
pc = self.frmFontProperties.get_pango_context()
for family in pc.list_families():
- markup = "<span font_family=\"%s\">%s</span>" % (family.get_name(), family.get_name())
- fonts.append([family, markup])
+ fonts.append([family.get_name()])
self.treeFontList.set_model(fonts)
#sort the fonts alphabetically
- fonts.set_sort_column_id(1, gtk.SORT_ASCENDING)
+ fonts.set_sort_column_id(0, gtk.SORT_ASCENDING)
#add the callbacks
self.treeFontList.connect("cursor-changed", self.family_changed_cb)
@@ -61,17 +60,16 @@
def init_treeview(self, tv):
cell = gtk.CellRendererText()
- column = gtk.TreeViewColumn("Font family", cell, markup=1)
+ column = gtk.TreeViewColumn("Font family", cell, text=0, family=0)
tv.append_column(column)
-
def family_changed_cb(self, widget):
index = self.treeFontList.get_cursor()[0][0]
font_family = self.treeFontList.get_model()[index][0]
pc = self.treeFontList.get_pango_context()
fd = pc.get_font_description()
- fd.set_family(font_family.get_name())
+ fd.set_family(font_family)
size = int(30) * pango.SCALE
fd.set_size(size)
@@ -113,7 +111,7 @@
index = self.treeFontList.get_cursor()[0][0]
font_family = self.treeFontList.get_model()[index][0]
- self.calling_form.font_family = font_family.get_name()
+ self.calling_form.font_family = font_family
self.calling_form.set_font_style()