Exemple #1
0
        private void BuildView()
        {
            podcast_view_scroller = new ScrolledWindow();

            podcast_view_scroller.ShadowType       = ShadowType.In;
            podcast_view_scroller.VscrollbarPolicy = PolicyType.Automatic;
            podcast_view_scroller.HscrollbarPolicy = PolicyType.Automatic;

            podcast_feed_view_scroller = new ScrolledWindow();

            podcast_feed_view_scroller.ShadowType       = ShadowType.In;
            podcast_feed_view_scroller.VscrollbarPolicy = PolicyType.Automatic;
            podcast_feed_view_scroller.HscrollbarPolicy = PolicyType.Automatic;

            podcast_model      = new PodcastPlaylistModel();
            podcast_feed_model = new PodcastFeedModel();

            podcast_model.ClearModel();
            podcast_feed_model.ClearModel();

            podcast_model.QueueAdd(PodcastCore.Library.Podcasts);
            podcast_feed_model.QueueAdd(PodcastCore.Library.Feeds);

            podcast_view = new PodcastPlaylistView(podcast_model);
            podcast_view.ButtonPressEvent += OnPlaylistViewButtonPressEvent;

            podcast_feed_view = new PodcastFeedView(podcast_feed_model);
            podcast_feed_view.Selection.Changed += OnFeedViewSelectionChanged;
            podcast_feed_view.ButtonPressEvent  += OnPodcastFeedViewButtonPressEvent;
            podcast_feed_view.SelectAll         += OnSelectAllHandler;

            podcast_view_scroller.Add(podcast_view);
            podcast_feed_view_scroller.Add(podcast_feed_view);

            feed_info_pane = new HPaned();
            feed_info_pane.Add1(podcast_feed_view_scroller);
            // -- later-- feed_info_pane.Add2 ();

            feed_playlist_pane = new VPaned();
            feed_playlist_pane.Add1(feed_info_pane);
            feed_playlist_pane.Add2(podcast_view_scroller);

            try
            {
                feed_playlist_pane.Position =
                    GConfSchemas.PlaylistSeparatorPositionSchema.Get();
            }
            catch {
                feed_playlist_pane.Position = 300;
                GConfSchemas.PlaylistSeparatorPositionSchema.Set(
                    feed_playlist_pane.Position
                    );
            }

            update_button = new ActionButton(Globals.ActionManager ["PodcastUpdateFeedsAction"]);
            viewWidget    = feed_playlist_pane;

            viewWidget.ShowAll();
        }
Exemple #2
0
        private void DestroyView()
        {
            viewWidget = null;

            if (podcast_view != null)
            {
                podcast_view.Shutdown();
            }

            podcast_view  = null;
            podcast_model = null;

            podcast_feed_view  = null;
            podcast_feed_model = null;

            feed_view_popup_menu = null;
        }
        private void DestroyView()
        {
            viewWidget = null;

            if (podcast_view != null)
            {
                podcast_view.Shutdown ();
            }

            podcast_view = null;
            podcast_model = null;

            podcast_feed_view = null;
            podcast_feed_model = null;

            feed_view_popup_menu = null;
        }
        private void BuildView()
        {
            podcast_view_scroller = new ScrolledWindow();

            podcast_view_scroller.ShadowType = ShadowType.In;
            podcast_view_scroller.VscrollbarPolicy = PolicyType.Automatic;
            podcast_view_scroller.HscrollbarPolicy = PolicyType.Automatic;

            podcast_feed_view_scroller = new ScrolledWindow();

            podcast_feed_view_scroller.ShadowType = ShadowType.In;
            podcast_feed_view_scroller.VscrollbarPolicy = PolicyType.Automatic;
            podcast_feed_view_scroller.HscrollbarPolicy = PolicyType.Automatic;

            podcast_model = new PodcastPlaylistModel ();
            podcast_feed_model = new PodcastFeedModel ();

            podcast_model.ClearModel ();
            podcast_feed_model.ClearModel ();

            podcast_model.QueueAdd (PodcastCore.Library.Podcasts);
            podcast_feed_model.QueueAdd (PodcastCore.Library.Feeds);

            podcast_view = new PodcastPlaylistView (podcast_model);
            podcast_view.ButtonPressEvent += OnPlaylistViewButtonPressEvent;

            podcast_feed_view = new PodcastFeedView (podcast_feed_model);
            podcast_feed_view.Selection.Changed += OnFeedViewSelectionChanged;
            podcast_feed_view.ButtonPressEvent += OnPodcastFeedViewButtonPressEvent;
            podcast_feed_view.SelectAll += OnSelectAllHandler;

            podcast_view_scroller.Add (podcast_view);
            podcast_feed_view_scroller.Add (podcast_feed_view);

            feed_info_pane = new HPaned ();
            feed_info_pane.Add1 (podcast_feed_view_scroller);
            // -- later-- feed_info_pane.Add2 ();

            feed_playlist_pane = new VPaned ();
            feed_playlist_pane.Add1 (feed_info_pane);
            feed_playlist_pane.Add2 (podcast_view_scroller);

            try
            {
                feed_playlist_pane.Position =
                    GConfSchemas.PlaylistSeparatorPositionSchema.Get ();
            }
            catch {
                feed_playlist_pane.Position = 300;
                GConfSchemas.PlaylistSeparatorPositionSchema.Set (
                    feed_playlist_pane.Position
                );
            }

            update_button = new ActionButton (Globals.ActionManager ["PodcastUpdateFeedsAction"]);
            viewWidget = feed_playlist_pane;

            viewWidget.ShowAll ();
        }