[banshee/gtk3] Lastfm: Remove duplicated SchemaEntry elements



commit 77647c44f5bee131759b34c645a2231f07aefd6e
Author: Andres G. Aragoneses <knocte gmail com>
Date:   Wed Dec 19 01:12:25 2012 +0000

    Lastfm: Remove duplicated SchemaEntry elements
    
    GSettingsSchemaExtractor was complaining about finding duplicated keys:
    
    org.gnome.banshee.gschema.xml: Error on line 268 char 1: <key name='username'> already specified.  --strict was specified; exiting.
    make[2]: *** [org.gnome.banshee.gschema.valid] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2
    
    Even though one could think it is better to fix the extractor to not
    produce duplicate keys, it's not good to have them duplicated in the code
    because they could contain different characteristics (default value,
    descriptions...).

 .../AudioscrobblerService.cs                       |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/AudioscrobblerService.cs b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/AudioscrobblerService.cs
index c33477f..682b0d6 100644
--- a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/AudioscrobblerService.cs
+++ b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/AudioscrobblerService.cs
@@ -86,8 +86,8 @@ namespace Banshee.Lastfm.Audioscrobbler
             account = LastfmCore.Account;
 
             if (account.UserName == null) {
-                account.UserName = LastUserSchema.Get ();
-                account.SessionKey = LastSessionKeySchema.Get ();
+                account.UserName = LastfmSource.LastUserSchema.Get ();
+                account.SessionKey = LastfmSource.LastSessionKeySchema.Get ();
                 account.ScrobbleUrl = LastScrobbleUrlSchema.Get ();
             }
 
@@ -443,14 +443,6 @@ namespace Banshee.Lastfm.Audioscrobbler
 
 #endregion
 
-        public static readonly SchemaEntry<string> LastUserSchema = new SchemaEntry<string> (
-            "plugins.lastfm", "username", "", "Last.fm user", "Last.fm username"
-        );
-
-        public static readonly SchemaEntry<string> LastSessionKeySchema = new SchemaEntry<string> (
-            "plugins.lastfm", "session_key", "", "Last.fm session key", "Last.fm sessions key used in authenticated calls"
-        );
-
         public static readonly SchemaEntry<string> LastScrobbleUrlSchema = new SchemaEntry<string> (
             "plugins.audioscrobbler", "api_url",
             null,



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