public SyncPreferenceComboBox(FeedAutoDownload syncPref)
     : base(combo_text_entries)
 {
     if ((int) syncPref >= (int) FeedAutoDownload.All &&
         (int) syncPref <= (int) FeedAutoDownload.None) {
         Active = (int) syncPref;
     } else {
         Active = (int) FeedAutoDownload.One;
     }
 }
Example #2
0
 public SyncPreferenceComboBox(FeedAutoDownload syncPref) : base(combo_text_entries)
 {
     if ((int)syncPref >= (int)FeedAutoDownload.All &&
         (int)syncPref <= (int)FeedAutoDownload.None)
     {
         Active = (int)syncPref;
     }
     else
     {
         Active = (int)FeedAutoDownload.One;
     }
 }
Example #3
0
        public Feed CreateFeed(string url, FeedAutoDownload autoDownload, bool is_subscribed)
        {
            Feed feed = null;

            url = url.Trim().TrimEnd('/');

            if (!Feed.Exists(url))
            {
                feed = new Feed(url, autoDownload);
                feed.IsSubscribed = is_subscribed;
                feed.Save();
                feed.Update();
            }

            return(feed);
        }
Example #4
0
        public Feed CreateFeed(string url, string title, FeedAutoDownload autoDownload, int max_items, bool is_subscribed)
        {
            Feed feed = null;

            url = url.Trim().TrimEnd('/');

            if (!Feed.Exists(url))
            {
                feed              = new Feed(url, autoDownload);
                feed.Title        = title;
                feed.IsSubscribed = is_subscribed;
                feed.MaxItemCount = max_items;
                feed.Save();
                feed.Update();
            }

            return(feed);
        }
        private void OnResponse(object sender, ResponseArgs args)
        {
            Destroy();

            if (args.ResponseId == Gtk.ResponseType.Ok)
            {
                FeedAutoDownload new_sync_pref = new_episode_option_combo.ActiveSyncPreference;

                if (feed.AutoDownload != new_sync_pref || feed.Title != name_entry.Text)
                {
                    feed.AutoDownload = new_sync_pref;
                    feed.Title        = name_entry.Text;
                    feed.Save();
                }
            }

            (sender as Dialog).Response -= OnResponse;
            (sender as Dialog).Destroy();
        }
Example #6
0
 private void SubscribeToPodcast(Uri uri, FeedAutoDownload syncPreference, int max_items)
 {
     FeedsManager.Instance.FeedManager.CreateFeed (uri.ToString (), syncPreference, max_items);
 }
 public Feed(string url, FeedAutoDownload auto_download) : this()
 {
     Url = url;
     this.auto_download = auto_download;
 }
Example #8
0
 public Feed CreateFeed(string url, string title, FeedAutoDownload autoDownload, int max_items)
 {
     return(CreateFeed(url, title, autoDownload, max_items, true));
 }
Example #9
0
 public Feed CreateFeed(string url, FeedAutoDownload autoDownload)
 {
     return(CreateFeed(url, autoDownload, 0));
 }
 private void SubscribeToPodcast(Uri uri, FeedAutoDownload syncPreference, int max_items)
 {
     FeedsManager.Instance.FeedManager.CreateFeed(uri.ToString(), syncPreference, max_items);
 }
Example #11
0
 public Feed CreateFeed(string url, FeedAutoDownload autoDownload, int max_items)
 {
     return CreateFeed (url, null, autoDownload, max_items, true);
 }
Example #12
0
 public Feed CreateFeed(string url, FeedAutoDownload autoDownload)
 {
     return CreateFeed (url, autoDownload, 0);
 }
Example #13
0
        public Feed CreateFeed(string url, string title, FeedAutoDownload autoDownload, int max_items, bool is_subscribed)
        {
            Feed feed = null;
            url = url.Trim ().TrimEnd ('/');

            if (!Feed.Exists (url)) {
                feed = new Feed (url, autoDownload);
                feed.Title = title;
                feed.IsSubscribed = is_subscribed;
                feed.MaxItemCount = max_items;
                feed.Save ();
                feed.Update ();
            }

            return feed;
        }