[banshee] Don't wait for the default URL loading any more



commit 16473cd9def9d706892439c71013e05558f69101
Author: Rodney Dawes <rodney dawes canonical com>
Date:   Thu Oct 20 15:19:46 2011 -0400

    Don't wait for the default URL loading any more
    
    Remove the callback for default URL being loaded
    Just load u1ms:// URLs straight away from startup
    
    Fixes https://bugs.launchpad.net/ubuntu/+source/banshee/+bug/872972
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=660818

 .../UbuntuOneMusicStoreSource.cs                   |   20 +-------------------
 1 files changed, 1 insertions(+), 19 deletions(-)
---
diff --git a/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs b/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs
index d8e8656..6cedff0 100644
--- a/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs
+++ b/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs
@@ -47,7 +47,6 @@ namespace Banshee.UbuntuOneMusicStore
         // In the sources TreeView, sets the order value for this source, small on top
         const int sort_order = 190;
         CustomView custom_view;
-        string cached_startup_uri;
 
         public UbuntuOneMusicStoreSource () : base (
             Catalog.GetString ("Ubuntu One Music Store"),
@@ -62,12 +61,11 @@ namespace Banshee.UbuntuOneMusicStore
 
             // So we can handle u1ms:// URIs
             ServiceManager.Get<DBusCommandService> ().ArgumentPushed += OnCommandLineArgument;
-            custom_view.store.UrlLoaded += OnDefaultStoreUrlLoaded;
 
             // make sure that the u1ms uri gets handled on banshee startup
             foreach (string uri in ApplicationContext.CommandLine.Files) {
                 if (IsU1msUri (uri)) {
-                    cached_startup_uri = uri;
+                    LoadU1msUri (uri);
                     break;
                 }
             }
@@ -83,22 +81,6 @@ namespace Banshee.UbuntuOneMusicStore
             get { return 0; }
         }
 
-        private void OnDefaultStoreUrlLoaded (object o, UbuntuOne.UrlLoadedArgs args)
-        {
-            if (args == null || args.Url == null) {
-                //may happen when there is no internet connection
-                return;
-            }
-
-            if (args.Url.StartsWith( "http://stores.7digital.com/default";)) {
-                // we just do this the first time we load the default store view
-                // so that we can switch to the passed u1ms uri and not have it switch out on us.
-                custom_view.store.UrlLoaded -= OnDefaultStoreUrlLoaded;
-                if (!string.IsNullOrEmpty (cached_startup_uri))
-                    LoadU1msUri (cached_startup_uri);
-            }
-        }
-
         private void OnCommandLineArgument (string uri, object value, bool isFile)
         {
             if (!isFile || String.IsNullOrEmpty (uri)) {



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