[rhythmbox] use Gio.Settings.new to avoid GSettings:schema deprecation warnings



commit a6371f2723264ff93fd4005ea19eec5036055714
Author: Jonathan Matthew <jonathan d14n org>
Date:   Wed Jun 15 21:46:40 2016 +1000

    use Gio.Settings.new to avoid GSettings:schema deprecation warnings
    
    https://bugzilla.gnome.org/show_bug.cgi?id=749388

 plugins/lyrics/LyricsConfigureDialog.py |    2 +-
 plugins/lyrics/LyricsParse.py           |    2 +-
 plugins/lyrics/lyrics.py                |    2 +-
 plugins/magnatune/MagnatuneAccount.py   |    2 +-
 plugins/magnatune/MagnatuneSource.py    |    6 +++---
 plugins/magnatune/magnatune.py          |    6 +++---
 plugins/replaygain/config.py            |    2 +-
 plugins/replaygain/player.py            |    2 +-
 plugins/webremote/webremote.py          |    4 ++--
 9 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/plugins/lyrics/LyricsConfigureDialog.py b/plugins/lyrics/LyricsConfigureDialog.py
index 147ce27..f03e789 100644
--- a/plugins/lyrics/LyricsConfigureDialog.py
+++ b/plugins/lyrics/LyricsConfigureDialog.py
@@ -41,7 +41,7 @@ class LyricsConfigureDialog (GObject.Object, PeasGtk.Configurable):
 
        def __init__(self):
                GObject.Object.__init__(self)
-               self.settings = Gio.Settings("org.gnome.rhythmbox.plugins.lyrics")
+               self.settings = Gio.Settings.new("org.gnome.rhythmbox.plugins.lyrics")
 
        def do_create_configure_widget(self):
                builder = Gtk.Builder()
diff --git a/plugins/lyrics/LyricsParse.py b/plugins/lyrics/LyricsParse.py
index 5722551..f05d897 100644
--- a/plugins/lyrics/LyricsParse.py
+++ b/plugins/lyrics/LyricsParse.py
@@ -35,7 +35,7 @@ class Parser (object):
                self.artist = artist
 
                try:
-                       settings = Gio.Settings("org.gnome.rhythmbox.plugins.lyrics")
+                       settings = Gio.Settings.new("org.gnome.rhythmbox.plugins.lyrics")
                        self.sites = settings['sites']
                except GLib.GError as e:
                        print(e)
diff --git a/plugins/lyrics/lyrics.py b/plugins/lyrics/lyrics.py
index 071d3c0..13124b3 100644
--- a/plugins/lyrics/lyrics.py
+++ b/plugins/lyrics/lyrics.py
@@ -116,7 +116,7 @@ def extract_artist_and_title(stream_song_title):
        return (artist, title)
        
 def build_cache_path(artist, title):
-       settings = Gio.Settings("org.gnome.rhythmbox.plugins.lyrics")
+       settings = Gio.Settings.new("org.gnome.rhythmbox.plugins.lyrics")
        folder = settings['folder']
        if folder is None or folder == "":
                folder = os.path.join(RB.user_cache_dir(), "lyrics")
diff --git a/plugins/magnatune/MagnatuneAccount.py b/plugins/magnatune/MagnatuneAccount.py
index 77d9c91..619bf9a 100644
--- a/plugins/magnatune/MagnatuneAccount.py
+++ b/plugins/magnatune/MagnatuneAccount.py
@@ -58,7 +58,7 @@ def instance():
 
 class MagnatuneAccount(object):
        def __init__(self):
-               self.settings = Gio.Settings("org.gnome.rhythmbox.plugins.magnatune")
+               self.settings = Gio.Settings.new("org.gnome.rhythmbox.plugins.magnatune")
                self.secret = None
                self.keyring_attributes = {"rhythmbox-plugin": "magnatune"}
                if Secret is None:
diff --git a/plugins/magnatune/MagnatuneSource.py b/plugins/magnatune/MagnatuneSource.py
index 3182e74..6df6c6c 100644
--- a/plugins/magnatune/MagnatuneSource.py
+++ b/plugins/magnatune/MagnatuneSource.py
@@ -65,7 +65,7 @@ class MagnatuneSource(RB.BrowserSource):
                self.hate = self
 
                self.__popup = None
-               self.__settings = Gio.Settings("org.gnome.rhythmbox.plugins.magnatune")
+               self.__settings = Gio.Settings.new("org.gnome.rhythmbox.plugins.magnatune")
                # source state
                self.__activated = False
                self.__db = None
@@ -186,7 +186,7 @@ class MagnatuneSource(RB.BrowserSource):
 
                try:
                        # Just use the first library location
-                       library = Gio.Settings("org.gnome.rhythmbox.rhythmdb")
+                       library = Gio.Settings.new("org.gnome.rhythmbox.rhythmdb")
                        library_location = library['locations'][0]
                except IndexError as e:
                        RB.error_dialog(title = _("Couldn't download album"),
@@ -452,7 +452,7 @@ class MagnatuneSource(RB.BrowserSource):
 
                def unzip_album():
                        # just use the first library location
-                       library = Gio.Settings("org.gnome.rhythmbox.rhythmdb")
+                       library = Gio.Settings.new("org.gnome.rhythmbox.rhythmdb")
                        library_location = Gio.file_new_for_uri(library['locations'][0])
 
                        print("unzipping %s" % dest.get_path())
diff --git a/plugins/magnatune/magnatune.py b/plugins/magnatune/magnatune.py
index 27a0058..6899afe 100644
--- a/plugins/magnatune/magnatune.py
+++ b/plugins/magnatune/magnatune.py
@@ -94,7 +94,7 @@ class Magnatune(GObject.GObject, Peas.Activatable):
                self.entry_type = MagnatuneEntryType()
                self.db.register_entry_type(self.entry_type)
 
-               self.settings = Gio.Settings("org.gnome.rhythmbox.plugins.magnatune")
+               self.settings = Gio.Settings.new("org.gnome.rhythmbox.plugins.magnatune")
 
                app = Gio.Application.get_default()
                action = Gio.SimpleAction(name="magnatune-album-download")
@@ -111,7 +111,7 @@ class Magnatune(GObject.GObject, Peas.Activatable):
                app.link_shared_menus(toolbar)
 
                group = RB.DisplayPageGroup.get_by_id ("stores")
-               settings = Gio.Settings("org.gnome.rhythmbox.plugins.magnatune")
+               settings = Gio.Settings.new("org.gnome.rhythmbox.plugins.magnatune")
                self.source = GObject.new(MagnatuneSource,
                                          shell=shell,
                                          entry_type=self.entry_type,
@@ -152,7 +152,7 @@ class MagnatuneConfig(GObject.GObject, PeasGtk.Configurable):
 
        def __init__(self):
                GObject.GObject.__init__(self)
-               self.settings = Gio.Settings("org.gnome.rhythmbox.plugins.magnatune")
+               self.settings = Gio.Settings.new("org.gnome.rhythmbox.plugins.magnatune")
                self.account = MagnatuneAccount.instance()
 
        def do_create_configure_widget(self):
diff --git a/plugins/replaygain/config.py b/plugins/replaygain/config.py
index 0e99e77..b0e0226 100644
--- a/plugins/replaygain/config.py
+++ b/plugins/replaygain/config.py
@@ -45,7 +45,7 @@ class ReplayGainConfig(GObject.Object, PeasGtk.Configurable):
        object = GObject.property(type=GObject.Object)
 
        def do_create_configure_widget(self):
-               self.settings = Gio.Settings("org.gnome.rhythmbox.plugins.replaygain")
+               self.settings = Gio.Settings.new("org.gnome.rhythmbox.plugins.replaygain")
 
                ui_file = rb.find_plugin_file(self, "replaygain-prefs.ui")
                self.builder = Gtk.Builder()
diff --git a/plugins/replaygain/player.py b/plugins/replaygain/player.py
index 0b1eea3..2ae9d9a 100644
--- a/plugins/replaygain/player.py
+++ b/plugins/replaygain/player.py
@@ -55,7 +55,7 @@ class ReplayGainPlayer(object):
 
                self.shell_player = shell.props.shell_player
                self.player = self.shell_player.props.player
-               self.settings = Gio.Settings("org.gnome.rhythmbox.plugins.replaygain")
+               self.settings = Gio.Settings.new("org.gnome.rhythmbox.plugins.replaygain")
 
                self.settings.connect("changed::limiter", self.limiter_changed_cb)
 
diff --git a/plugins/webremote/webremote.py b/plugins/webremote/webremote.py
index ab70ffd..fa51f75 100644
--- a/plugins/webremote/webremote.py
+++ b/plugins/webremote/webremote.py
@@ -204,7 +204,7 @@ class WebRemotePlugin(GObject.Object, Peas.Activatable):
 
        def __init__(self):
                GObject.Object.__init__(self)
-               self.settings = Gio.Settings("org.gnome.rhythmbox.plugins.webremote")
+               self.settings = Gio.Settings.new("org.gnome.rhythmbox.plugins.webremote")
                self.settings.connect("changed", self.settings_changed_cb)
                self.server = None
                self.next_connid = 0
@@ -589,7 +589,7 @@ class WebRemoteConfig(GObject.Object, PeasGtk.Configurable):
                        self.update_port()
 
        def do_create_configure_widget(self):
-               self.settings = Gio.Settings("org.gnome.rhythmbox.plugins.webremote")
+               self.settings = Gio.Settings.new("org.gnome.rhythmbox.plugins.webremote")
                self.settings.connect("changed", self.settings_changed_cb)
 
                ui_file = rb.find_plugin_file(self, "webremote-config.ui")


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]