[gnome-tweak-tool] PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated
- Date: Wed, 17 Sep 2014 17:09:08 +0000 (UTC)
commit 2a139da299113dd7b405135ec0f420fd7158a7ab
Author: Dominique Leuenberger <dimstar opensuse org>
Date: Sat Mar 8 00:27:26 2014 +0100
PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated.
PyGTKDeprecationWarning: Using positional arguments with the GObject
constructor has been deprecated. Please specify keywords for label or
use a class specific constructor. See:
https://wiki.gnome.org/PyGObject/InitializerDeprecations
https://bugzilla.gnome.org/show_bug.cgi?id=725926
gtweak/gsettings.py | 4 ++--
gtweak/tweaks/tweak_group_shell_extensions.py | 2 +-
gtweak/tweaks/tweak_group_startup.py | 6 +++---
gtweak/tweakview.py | 8 ++++----
gtweak/utils.py | 2 +-
gtweak/widgets.py | 8 ++++----
6 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/gtweak/gsettings.py b/gtweak/gsettings.py
index a00fe19..8815131 100644
--- a/gtweak/gsettings.py
+++ b/gtweak/gsettings.py
@@ -122,9 +122,9 @@ class GSettingsSetting(Gio.Settings):
raise GSettingsMissingError(schema_name)
if schema_path is None:
- Gio.Settings.__init__(self, schema_name)
+ Gio.Settings.__init__(self, schema=schema_name)
else:
- Gio.Settings.__init__(self, schema_name, path=schema_path)
+ Gio.Settings.__init__(self, schema=schema_name, path=schema_path)
else:
GioSSS = Gio.SettingsSchemaSource
schema_source = GioSSS.new_from_directory(schema_dir,
diff --git a/gtweak/tweaks/tweak_group_shell_extensions.py b/gtweak/tweaks/tweak_group_shell_extensions.py
index 6ce2787..750eee7 100644
--- a/gtweak/tweaks/tweak_group_shell_extensions.py
+++ b/gtweak/tweaks/tweak_group_shell_extensions.py
@@ -105,7 +105,7 @@ class _ShellExtensionTweak(Gtk.ListBoxRow, Tweak):
btn.connect("clicked", self._on_configure_clicked, uuid)
self.hbox.pack_start(btn, False, False, 0)
- btn = Gtk.Button(_("Remove"))
+ btn = Gtk.Button(label=_("Remove"))
btn.props.vexpand = False
btn.props.valign = Gtk.Align.CENTER
btn.set_sensitive(False)
diff --git a/gtweak/tweaks/tweak_group_startup.py b/gtweak/tweaks/tweak_group_startup.py
index da79d7c..7bf81a9 100644
--- a/gtweak/tweaks/tweak_group_startup.py
+++ b/gtweak/tweaks/tweak_group_startup.py
@@ -123,12 +123,12 @@ class _StartupTweak(Gtk.ListBoxRow, Tweak):
else:
img = None #attach_next_to treats this correctly
- lbl = Gtk.Label(df.get_name(), xalign=0.0)
+ lbl = Gtk.Label(label=df.get_name(), xalign=0.0)
grid.attach_next_to(lbl,img,Gtk.PositionType.RIGHT,1,1)
lbl.props.hexpand = True
lbl.props.halign = Gtk.Align.START
- btn = Gtk.Button(_("Remove"))
+ btn = Gtk.Button(label=_("Remove"))
grid.attach_next_to(btn,lbl,Gtk.PositionType.RIGHT,1,1)
btn.props.vexpand = False
btn.props.valign = Gtk.Align.CENTER
@@ -148,7 +148,7 @@ class AddStartupTweak(Gtk.ListBoxRow, Tweak):
_("Add a new application to be run at startup"),
**options)
- self.btn = Gtk.Button("")
+ self.btn = Gtk.Button(label="")
self.btn.get_style_context().remove_class("button")
img = Gtk.Image()
img.set_from_icon_name("list-add-symbolic", Gtk.IconSize.BUTTON)
diff --git a/gtweak/tweakview.py b/gtweak/tweakview.py
index c487002..cc0b914 100644
--- a/gtweak/tweakview.py
+++ b/gtweak/tweakview.py
@@ -36,7 +36,7 @@ class Window(Gtk.ApplicationWindow):
self.set_position(Gtk.WindowPosition.CENTER)
self.set_icon_name("gnome-tweak-tool")
- self.hsize_group = Gtk.SizeGroup(Gtk.SizeGroupMode.HORIZONTAL)
+ self.hsize_group = Gtk.SizeGroup(mode=Gtk.SizeGroupMode.HORIZONTAL)
main_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
left_box = self.sidebar()
@@ -78,7 +78,7 @@ class Window(Gtk.ApplicationWindow):
right_header.props.decoration_layout = ":" + tokens[1]
left_header.props.decoration_layout = tokens[0]
- self.title = Gtk.Label("")
+ self.title = Gtk.Label(label="")
self.title.get_style_context().add_class("title")
right_header.set_custom_title(self.title)
@@ -91,7 +91,7 @@ class Window(Gtk.ApplicationWindow):
self.button.get_style_context().add_class("image-button")
left_header.pack_start(self.button)
- lbl = Gtk.Label(_("Tweaks"))
+ lbl = Gtk.Label(label=_("Tweaks"))
lbl.get_style_context().add_class("title")
left_header.set_custom_title(lbl)
@@ -155,7 +155,7 @@ class Window(Gtk.ApplicationWindow):
def load_model_data(self):
def _make_items_listbox(text):
- lbl = Gtk.Label(text, xalign=0.0)
+ lbl = Gtk.Label(label=text, xalign=0.0)
lbl.set_name('row')
row = Gtk.ListBoxRow()
row.get_style_context().add_class("tweak-category")
diff --git a/gtweak/utils.py b/gtweak/utils.py
index 1384afb..8ec9e2d 100644
--- a/gtweak/utils.py
+++ b/gtweak/utils.py
@@ -240,7 +240,7 @@ class XSettingsOverrides:
}
def __init__(self):
- self._settings = Gio.Settings('org.gnome.settings-daemon.plugins.xsettings')
+ self._settings = Gio.Settings(schema='org.gnome.settings-daemon.plugins.xsettings')
self._variant = self._settings.get_value("overrides")
def _dup_variant_as_dict(self):
diff --git a/gtweak/widgets.py b/gtweak/widgets.py
index 024400a..fb016fe 100644
--- a/gtweak/widgets.py
+++ b/gtweak/widgets.py
@@ -56,7 +56,7 @@ def build_label_beside_widget(txt, *widget, **kwargs):
hbox = Gtk.HBox()
hbox.props.spacing = UI_BOX_SPACING
- lbl = Gtk.Label(txt)
+ lbl = Gtk.Label(label=txt)
lbl.props.ellipsize = Pango.EllipsizeMode.END
lbl.props.xalign = 0.0
lbl.set_has_tooltip(True)
@@ -140,7 +140,7 @@ def adjust_schema_for_overrides(originalSchema, key, options):
overridesSchema = "org.gnome.shell.overrides"
overridesFile = "org.gnome.shell.gschema.xml"
- if (key in Gio.Settings(overridesSchema).list_keys()):
+ if (key in Gio.Settings(schema=overridesSchema).list_keys()):
options['schema_filename'] = overridesFile
return overridesSchema
return originalSchema
@@ -311,7 +311,7 @@ class GSettingsSpinButtonTweak(Gtk.Box, _GSettingsTweak, _DependableMixin):
#returned variant is range:(min, max)
_min, _max = self.settings.get_range(key_name)[1]
- adjustment = Gtk.Adjustment(0, _min, _max, options.get('adjustment_step', 1))
+ adjustment = Gtk.Adjustment(value=0, lower=_min, upper=_max,
step_increment=options.get('adjustment_step', 1))
w = Gtk.SpinButton()
w.set_adjustment(adjustment)
w.set_digits(options.get('digits', 0))
@@ -483,7 +483,7 @@ class DarkThemeSwitcher(Gtk.Box, Tweak):
hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
hbox.props.spacing = UI_BOX_SPACING
- lbl = Gtk.Label(title)
+ lbl = Gtk.Label(label=title)
lbl.props.ellipsize = Pango.EllipsizeMode.END
lbl.props.xalign = 0.0
hbox.pack_start(lbl, True, True, 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]