From d6f1c65325b268267104778dfdbe85d127dcccfb Mon Sep 17 00:00:00 2001 From: Josip Date: Fri, 17 Apr 2015 12:42:50 +0200 Subject: [PATCH] Deprecated (since gtk-3.0): Gtk.Widget.modify_font --- gramps/gui/editors/editperson.py | 2 +- gramps/gui/widgets/labels.py | 2 +- gramps/gui/widgets/validatedmaskedentry.py | 4 ++-- gramps/plugins/gramplet/persondetails.py | 4 ++-- gramps/plugins/gramplet/placedetails.py | 4 ++-- gramps/plugins/gramplet/repositorydetails.py | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gramps/gui/editors/editperson.py b/gramps/gui/editors/editperson.py index ffa9fa4ff..9d047e0ce 100644 --- a/gramps/gui/editors/editperson.py +++ b/gramps/gui/editors/editperson.py @@ -444,7 +444,7 @@ class EditPerson(EditPrimary): obj.connect('changed', self._changed_name) self.preview_name = self.top.get_object("full_name") - self.preview_name.modify_font(Pango.FontDescription('sans bold 12')) + self.preview_name.override_font(Pango.FontDescription('sans bold 12')) def get_start_date(self): """ diff --git a/gramps/gui/widgets/labels.py b/gramps/gui/widgets/labels.py index ca4dc512a..fba1d0bf0 100644 --- a/gramps/gui/widgets/labels.py +++ b/gramps/gui/widgets/labels.py @@ -221,7 +221,7 @@ class GenderLabel(Gtk.Label): self.set_alignment(0, 0.5) if win(): pangoFont = Pango.FontDescription('Arial') - self.modify_font(pangoFont) + self.override_font(pangoFont) self.show() #------------------------------------------------------------------------- diff --git a/gramps/gui/widgets/validatedmaskedentry.py b/gramps/gui/widgets/validatedmaskedentry.py index 8920cb6ed..02c6dbeb9 100644 --- a/gramps/gui/widgets/validatedmaskedentry.py +++ b/gramps/gui/widgets/validatedmaskedentry.py @@ -308,7 +308,7 @@ class MaskedEntry(UndoableEntry): :param mask: the mask to set """ if not mask: - self.modify_font(Pango.FontDescription("sans")) + self.override_font(Pango.FontDescription("sans")) self._mask = mask return @@ -338,7 +338,7 @@ class MaskedEntry(UndoableEntry): pos += 1 self._mask_fields.append((field_begin, field_end)) - self.modify_font(Pango.FontDescription("monospace")) + self.override_font(Pango.FontDescription("monospace")) self._really_delete_text(0, -1) self._insert_mask(0, input_length) diff --git a/gramps/plugins/gramplet/persondetails.py b/gramps/plugins/gramplet/persondetails.py index 1fedc6ad4..515f0018b 100644 --- a/gramps/plugins/gramplet/persondetails.py +++ b/gramps/plugins/gramplet/persondetails.py @@ -50,7 +50,7 @@ class PersonDetails(Gramplet): self.photo.show() self.name = Gtk.Label() self.name.set_alignment(0, 0) - self.name.modify_font(Pango.FontDescription('sans bold 12')) + self.name.override_font(Pango.FontDescription('sans bold 12')) vbox.pack_start(self.name, fill=True, expand=False, padding=7) self.grid = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL) self.grid.set_column_spacing(10) @@ -141,7 +141,7 @@ class PersonDetails(Gramplet): Display an empty row to separate groupd of entries. """ label = Gtk.Label(label='') - label.modify_font(Pango.FontDescription('sans 4')) + label.override_font(Pango.FontDescription('sans 4')) label.show() self.grid.add(label) diff --git a/gramps/plugins/gramplet/placedetails.py b/gramps/plugins/gramplet/placedetails.py index 0f00d2d78..67211537c 100644 --- a/gramps/plugins/gramplet/placedetails.py +++ b/gramps/plugins/gramplet/placedetails.py @@ -45,7 +45,7 @@ class PlaceDetails(Gramplet): self.photo = Photo(self.uistate.screen_height() < 1000) self.title = Gtk.Label() self.title.set_alignment(0, 0) - self.title.modify_font(Pango.FontDescription('sans bold 12')) + self.title.override_font(Pango.FontDescription('sans bold 12')) vbox.pack_start(self.title, False, True, 7) self.grid = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL) self.grid.set_column_spacing(10) @@ -145,7 +145,7 @@ class PlaceDetails(Gramplet): Display an empty row to separate groupd of entries. """ label = Gtk.Label(label='') - label.modify_font(Pango.FontDescription('sans 4')) + label.override_font(Pango.FontDescription('sans 4')) label.show() self.grid.add(label) diff --git a/gramps/plugins/gramplet/repositorydetails.py b/gramps/plugins/gramplet/repositorydetails.py index 0ff8679d6..459832535 100644 --- a/gramps/plugins/gramplet/repositorydetails.py +++ b/gramps/plugins/gramplet/repositorydetails.py @@ -41,7 +41,7 @@ class RepositoryDetails(Gramplet): vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.name = Gtk.Label() self.name.set_alignment(0, 0) - self.name.modify_font(Pango.FontDescription('sans bold 12')) + self.name.override_font(Pango.FontDescription('sans bold 12')) vbox.pack_start(self.name, fill=True, expand=False, padding=7) self.grid = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL) self.grid.set_column_spacing(10) @@ -143,6 +143,6 @@ class RepositoryDetails(Gramplet): Display an empty row to separate groupd of entries. """ label = Gtk.Label(label='') - label.modify_font(Pango.FontDescription('sans 4')) + label.override_font(Pango.FontDescription('sans 4')) label.show() self.grid.add(label)