[banshee] Don't destroy the subscribe dialog too early
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] Don't destroy the subscribe dialog too early
- Date: Fri, 26 Mar 2010 17:21:55 +0000 (UTC)
commit f4d67028f6faacdfc4277f1425cac5fe8d43c2f9
Author: Iain Lane <laney ubuntu com>
Date: Fri Mar 26 11:29:00 2010 +0000
Don't destroy the subscribe dialog too early
The subscribe dialog was being destroyed before all of the data had been
read from it. Rework the code here slightly to destroy after reading the
URL. Fixes bgo#614003.
Signed-off-by: Gabriel Burt <gabriel burt gmail com>
.../Banshee.Podcasting.Gui/PodcastActions.cs | 38 ++++++++++---------
1 files changed, 20 insertions(+), 18 deletions(-)
---
diff --git a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs
index 452914e..930d1fc 100644
--- a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs
+++ b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs
@@ -298,33 +298,35 @@ namespace Banshee.Podcasting.Gui
{
Uri feedUri = null;
FeedAutoDownload syncPreference;
+ string url = null;
PodcastSubscribeDialog subscribeDialog = new PodcastSubscribeDialog ();
ResponseType response = (ResponseType) subscribeDialog.Run ();
- syncPreference = subscribeDialog.SyncPreference;
- subscribeDialog.Destroy ();
+ syncPreference = subscribeDialog.SyncPreference;
if (response == ResponseType.Ok) {
- string url = subscribeDialog.Url.Trim ().Trim ('/');
+ url = subscribeDialog.Url.Trim ().Trim ('/');
+ }
- if (String.IsNullOrEmpty (subscribeDialog.Url)) {
- return;
- }
+ subscribeDialog.Destroy ();
- if (!TryParseUrl (url, out feedUri)) {
- HigMessageDialog.RunHigMessageDialog (
- null,
- DialogFlags.Modal,
- MessageType.Warning,
- ButtonsType.Ok,
- Catalog.GetString ("Invalid URL"),
- Catalog.GetString ("Podcast URL is invalid.")
- );
- } else {
- SubscribeToPodcast (feedUri, syncPreference);
- }
+ if (String.IsNullOrEmpty (url)) {
+ return;
+ }
+
+ if (!TryParseUrl (url, out feedUri)) {
+ HigMessageDialog.RunHigMessageDialog (
+ null,
+ DialogFlags.Modal,
+ MessageType.Warning,
+ ButtonsType.Ok,
+ Catalog.GetString ("Invalid URL"),
+ Catalog.GetString ("Podcast URL is invalid.")
+ );
+ } else {
+ SubscribeToPodcast (feedUri, syncPreference);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]