diff options
author | Simon Schampijer <simon@laptop.org> | 2013-01-23 11:38:44 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@laptop.org> | 2013-01-31 20:18:02 (GMT) |
commit | ccf711ae1acaea90e37ab61ff0213927c21afc0e (patch) | |
tree | 2c904a10f705598dbc17159ad25b5eb2a5839141 /fontcombobox.py | |
parent | 15218740927681efd27b52e576a35d2b45973cde (diff) |
Running pygi-convert.sh as a first step to port to GTK+ 3
Diffstat (limited to 'fontcombobox.py')
-rw-r--r-- | fontcombobox.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fontcombobox.py b/fontcombobox.py index 58f9140..2b3a8f2 100644 --- a/fontcombobox.py +++ b/fontcombobox.py @@ -15,21 +15,21 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -import gtk +from gi.repository import Gtk FONT_BLACKLIST = ['cmex10', 'cmmi10', 'cmr10', 'cmsy10', 'esint10', 'eufm10', 'msam10', 'msbm10', 'rsfs10', 'wasy10'] -class FontComboBox(gtk.ComboBox): +class FontComboBox(Gtk.ComboBox): def __init__(self): - gtk.ComboBox.__init__(self) - font_renderer = gtk.CellRendererText() - self.pack_start(font_renderer) + GObject.GObject.__init__(self) + font_renderer = Gtk.CellRendererText() + self.pack_start(font_renderer, True, True, 0) self.add_attribute(font_renderer, 'text', 0) self.add_attribute(font_renderer, 'font', 0) - font_model = gtk.ListStore(str) + font_model = Gtk.ListStore(str) context = self.get_pango_context() font_index = 0 @@ -45,8 +45,8 @@ class FontComboBox(gtk.ComboBox): font_faces.append(face_name) self.faces[name] = font_faces - sorter = gtk.TreeModelSort(font_model) - sorter.set_sort_column_id(0, gtk.SORT_ASCENDING) + sorter = Gtk.TreeModelSort(font_model) + sorter.set_sort_column_id(0, Gtk.SortType.ASCENDING) self.set_model(sorter) self.show() |