Fix deprecation warning

only keyword args should be used
This commit is contained in:
Philipp Hörist 2018-08-18 00:13:51 +02:00
parent 7392883607
commit 042d8aa687
4 changed files with 7 additions and 7 deletions

View File

@ -313,7 +313,7 @@ class AddAccount(Gtk.Box):
self.account = None
self.label = Gtk.Label(_('Add Account…'))
self.label = Gtk.Label(label=_('Add Account…'))
self.label.set_halign(Gtk.Align.START)
self.label.set_hexpand(True)
@ -342,7 +342,7 @@ class Preferences(Gtk.Box):
self.parent = parent
self.account = None
self.label = Gtk.Label(_('Preferences'))
self.label = Gtk.Label(label=_('Preferences'))
self.label.set_halign(Gtk.Align.START)
self.label.set_hexpand(True)

View File

@ -1071,7 +1071,7 @@ class FileRow(Gtk.ListBoxRow):
def __init__(self, path):
Gtk.ListBoxRow.__init__(self)
self.path = Path(path)
label = Gtk.Label(self.path.name)
label = Gtk.Label(label=self.path.name)
label.set_ellipsize(Pango.EllipsizeMode.END)
label.set_xalign(0)
self.add(label)

View File

@ -297,7 +297,7 @@ class ContactRow(Gtk.Grid):
else:
self.name = _('New Contact')
self.name_label = Gtk.Label(self.name)
self.name_label = Gtk.Label(label=self.name)
self.name_label.set_ellipsize(Pango.EllipsizeMode.END)
self.name_label.set_xalign(0)
self.name_label.set_width_chars(25)
@ -310,7 +310,7 @@ class ContactRow(Gtk.Grid):
self.name_label.get_style_context().add_class(css_class)
middle_box.add(self.name_label)
self.jid_label = Gtk.Label(jid)
self.jid_label = Gtk.Label(label=jid)
self.jid_label.set_ellipsize(Pango.EllipsizeMode.END)
self.jid_label.set_xalign(0)
self.jid_label.set_width_chars(25)
@ -320,7 +320,7 @@ class ContactRow(Gtk.Grid):
self.add(middle_box)
if show_account:
account_label = Gtk.Label(self.account_label)
account_label = Gtk.Label(label=self.account_label)
account_label.set_halign(Gtk.Align.START)
account_label.set_valign(Gtk.Align.START)

View File

@ -409,7 +409,7 @@ class ChooseOption(Gtk.ListBoxRow):
def __init__(self, option):
Gtk.ListBoxRow.__init__(self)
self.option = option
label = Gtk.Label(option.label)
label = Gtk.Label(label=option.label)
label.set_xalign(0)
self.add(label)
self.show_all()