[banshee/podcast-ng] [PaasActions] Re-applied 'RunSubscribeDialog' changes



commit 88cbfbc68a9fcf7c786c518d0b094d13e465d703
Author: Mike Urbanski <michael c urbanski gmail com>
Date:   Tue Mar 30 05:19:42 2010 -0500

    [PaasActions] Re-applied 'RunSubscribeDialog' changes

 .../Banshee.Paas/Banshee.Paas.Gui/PaasActions.cs   |   46 +++++++++++---------
 1 files changed, 25 insertions(+), 21 deletions(-)
---
diff --git a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.Gui/PaasActions.cs b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.Gui/PaasActions.cs
index def4142..f8c08b1 100644
--- a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.Gui/PaasActions.cs
+++ b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.Gui/PaasActions.cs
@@ -362,32 +362,36 @@ namespace Banshee.Paas.Gui
 
         private void RunSubscribeDialog ()
         {
+            string url = null;
+            DownloadPreference download_pref = DownloadPreference.One;
+            
             SubscribeDialog dialog = new SubscribeDialog ();
             ResponseType response = (ResponseType) dialog.Run ();
-            dialog.Destroy ();
 
             if (response == ResponseType.Ok) {
-                if (String.IsNullOrEmpty (dialog.Url)) {
-                    return;
-                }
+                download_pref = dialog.DownloadPreference;;
+                url = dialog.Url.Trim ().Trim ('/');
+            }
 
-                string url = dialog.Url.Trim ().Trim ('/');
-                DownloadPreference download_pref = dialog.DownloadPreference;;
-
-                try {
-                    service.SyndicationClient.SubscribeToChannel (url, download_pref);
-                } catch (Exception e) {
-                    Hyena.Log.Exception (e);
-
-                    HigMessageDialog.RunHigMessageDialog (
-                        null,
-                        DialogFlags.Modal,
-                        MessageType.Warning,
-                        ButtonsType.Ok,
-                        Catalog.GetString ("Invalid URL"),
-                        Catalog.GetString ("Podcast URL is invalid.")
-                    );
-                }
+            dialog.Destroy ();
+
+            if (String.IsNullOrEmpty (url)) {
+                return;
+            }
+
+            try {
+                service.SyndicationClient.SubscribeToChannel (url, download_pref);
+            } catch (Exception e) {
+                Hyena.Log.Exception (e);
+
+                HigMessageDialog.RunHigMessageDialog (
+                    null,
+                    DialogFlags.Modal,
+                    MessageType.Warning,
+                    ButtonsType.Ok,
+                    Catalog.GetString ("Invalid URL"),
+                    Catalog.GetString ("Podcast URL is invalid.")
+                );
             }
         }
 



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