[pitivi] ui.dynamic: add font selector widget
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi] ui.dynamic: add font selector widget
- Date: Thu, 30 Apr 2009 12:20:15 -0400 (EDT)
commit 948944ab88c7283d5eab02aadfca90219dfea4fb
Author: Brandon Lewis <brandon lewis berkeley edu>
Date: Wed Apr 29 23:17:31 2009 -0700
ui.dynamic: add font selector widget
---
pitivi/ui/dynamic.py | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/pitivi/ui/dynamic.py b/pitivi/ui/dynamic.py
index b6521a2..2c99c39 100644
--- a/pitivi/ui/dynamic.py
+++ b/pitivi/ui/dynamic.py
@@ -292,6 +292,21 @@ class ColorWidget(gtk.ColorButton):
return color
return color.to_string()
+class FontWidget(gtk.FontButton):
+
+ def __init__(self):
+ gtk.FontButton.__init__(self)
+ self.set_use_font(True)
+
+ def connectValueChanged(self, callback, *args):
+ self.connect("font-set", callback, *args)
+
+ def setWidgetValue(self, font_name):
+ self.set_font_name(font_name)
+
+ def getWidgetValue(self):
+ return self.get_font_name()
+
if __name__ == '__main__':
def valueChanged(unused_widget, widget, target):
@@ -308,6 +323,7 @@ if __name__ == '__main__':
("apple", "apple"),
("pear", "pear")),)),
(ColorWidget, 0x336699FF, (int,)),
+ (FontWidget, "Sans 9", ()),
)
W = gtk.Window()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]