diff options
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..5d76a7e 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) + Gtk.ComboBox.__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.SORT_ASCENDING) self.set_model(sorter) self.show() |