private void OnModelPodcastFeedAdded(object sender, PodcastFeedEventArgs args) { PodcastFeedInfo feed = args.Feed; if (feed != null) { SelectFeed(feed); } }
private void PodcastFeedAddedOrRemoved(PodcastFeedEventArgs args, bool added) { if (args.Feed != null) { PodcastFeedInfo feed = args.Feed; if (added) { podcast_feed_model.QueueAdd(feed); } else { // Only single select is handled at the moment. // This will need to be updated if multiple feed selection becomes available. TreeIter iter = feed.TreeIter; podcast_feed_model.QueueRemove(feed); podcast_feed_model.IterNext(ref iter); if (podcast_feed_model.GetPath(iter) != null) { podcast_feed_view.Selection.SelectIter(iter); podcast_feed_view.ScrollToIter(iter); return; } // Should not select first, should select previous. Why // is there no 'TreeModel.IterPrev' method? podcast_feed_model.GetIterFirst(out iter); if (podcast_feed_model.GetPath(iter) != null) { podcast_feed_view.Selection.SelectIter(iter); podcast_feed_view.ScrollToIter(iter); } } } else if (args.Feeds != null) { ICollection feeds = args.Feeds; if (added) { podcast_feed_model.QueueAdd(feeds); } else { podcast_feed_model.QueueRemove(feeds); } } Update(); }
private void OnModelPodcastFeedAdded(object sender, PodcastFeedEventArgs args) { PodcastFeedInfo feed = args.Feed; if (feed != null) { SelectFeed (feed); } }
private void OnPodcastFeedRemovedHandler(object sender, PodcastFeedEventArgs args) { PodcastFeedAddedOrRemoved(args, false); }