[banshee/source-contents: 15/15] Merge commit 'HEAD'; branch 'master' into source-contents



commit f4e137e497809d113c9ef9c4f21ffd08d5c73e79
Merge: cc8540c... a499fb6...
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Wed May 13 15:22:39 2009 -0500

    Merge commit 'HEAD'; branch 'master' into source-contents
    
    Conflicts:
    	src/Clients/Nereid/Nereid/ViewContainer.cs
    Merged the latest from master into source-contents, fixing conflict in
    Nereid/ViewContainer.cs with the context pane and the new
    source-contents notebook and explicit content.

 Banshee.sln                                        |    5 +
 build/TranslatorExtractor.cs                       |    6 +-
 build/m4/banshee/gstreamer.m4                      |    3 +-
 build/m4/banshee/mediaweb.m4                       |   14 -
 build/m4/banshee/webkit.m4                         |   13 +
 configure.ac                                       |    7 +-
 libbanshee/banshee-bpmdetector.c                   |    2 +-
 libbanshee/banshee-player-pipeline.c               |    3 +-
 libbanshee/banshee-player-private.h                |   10 +-
 libbanshee/banshee-player-vis.c                    |  234 +++++++++++---
 libbanshee/banshee-player-vis.h                    |    1 -
 po/es.po                                           |  227 +++++++-------
 .../Banshee.GStreamer/PlayerEngine.cs              |   11 +-
 src/Clients/Nereid/Nereid/ViewContainer.cs         |   14 +-
 src/Core/Banshee.Core/Banshee.Core.csproj          |    2 +-
 src/Core/Banshee.Core/Resources/translators.xml    |   55 ++--
 src/Core/Banshee.Services/Banshee.Services.csproj  |    6 +-
 .../Banshee.ContextPane/BaseContextPage.cs         |   73 +++++
 .../Banshee.ContextPane/ContextPageManager.cs      |   66 ++++
 .../Banshee.ContextPane/ContextPane.cs             |  332 ++++++++++++++++++++
 .../Banshee.Gui.TrackEditor/TrackEditorDialog.cs   |   15 +-
 .../Banshee.Gui.Widgets/TitledList.cs              |   67 ++++
 .../Banshee.Gui/GlobalActions.cs                   |    4 +-
 .../Banshee.ThickClient/Banshee.Gui/ViewActions.cs |    9 +
 .../Banshee.Library.Gui/ImportDialog.cs            |    7 +-
 .../Banshee.Sources.Gui/SourceView_DragAndDrop.cs  |    2 +-
 .../Banshee.ThickClient.addin.xml                  |    5 +
 .../Banshee.ThickClient/Banshee.ThickClient.csproj |   16 +-
 src/Core/Banshee.ThickClient/Makefile.am           |    6 +
 .../Resources/banshee-dialogs.glade                |    7 +-
 .../Resources/context-pane-close.png               |  Bin 0 -> 239 bytes
 .../Resources/context-pane-maximize.png            |  Bin 0 -> 237 bytes
 .../Resources/core-ui-actions-layout.xml           |    1 +
 .../Banshee.Widgets/Banshee.Widgets/SeekSlider.cs  |    6 +-
 .../Banshee.Lastfm.Radio/LastfmSourceContents.cs   |   32 +--
 .../Banshee.Lastfm.Recommendations/ContextPage.cs  |   63 ++++
 .../RecommendationActions.cs                       |   93 ------
 .../RecommendationPane.cs                          |   27 +-
 .../RecommendationService.cs                       |  160 ----------
 .../Banshee.Lastfm/Banshee.Lastfm.addin.xml        |    8 +-
 src/Extensions/Banshee.Lastfm/Makefile.am          |    3 +-
 .../Banshee.MediaWeb/Banshee.MediaWeb.addin.xml    |    2 +-
 .../Banshee.Wikipedia/Banshee.Wikipedia.addin.xml  |   23 ++
 .../Banshee.Wikipedia/Banshee.Wikipedia.csproj     |   74 +++++
 .../Banshee.Wikipedia/ContextPage.cs               |   67 ++++
 .../Banshee.Wikipedia/WikipediaView.cs             |   90 ++++++
 src/Extensions/Banshee.Wikipedia/Makefile.am       |   16 +
 .../ThemeIcons/16x16/categories/wikipedia.png      |  Bin 0 -> 701 bytes
 .../ThemeIcons/22x22/categories/wikipedia.png      |  Bin 0 -> 1021 bytes
 .../ThemeIcons/32x32/categories/wikipedia.png      |  Bin 0 -> 1410 bytes
 .../ThemeIcons/48x48/categories/wikipedia.png      |  Bin 0 -> 2322 bytes
 src/Extensions/Banshee.Wikipedia/ThemeIcons/README |   32 ++
 .../ThemeIcons/scalable/categories/wikipedia.svg   |  327 +++++++++++++++++++
 src/Extensions/Makefile.am                         |    3 +-
 .../Hyena.Gui/Hyena.Widgets/MessageBar.cs          |   15 +-
 .../Hyena.Query/RelativeTimeSpanQueryValue.cs      |    7 +-
 .../Hyena/Hyena.Query/TimeSpanQueryValue.cs        |   50 ++-
 src/Libraries/Hyena/Hyena.csproj                   |    7 +
 src/Libraries/Hyena/Hyena/StringUtil.cs            |   11 +-
 59 files changed, 1771 insertions(+), 568 deletions(-)

diff --cc src/Clients/Nereid/Nereid/ViewContainer.cs
index b53901a,bd86c50..a4af8ed
--- a/src/Clients/Nereid/Nereid/ViewContainer.cs
+++ b/src/Clients/Nereid/Nereid/ViewContainer.cs
@@@ -48,17 -46,12 +48,18 @@@ namespace Nerei
      {
          private SearchEntry search_entry;
          private HBox header;
 +        private Label title_button_label;
          private Label title_label;
 +        private SourceContentMenu content_menu;
          private Label search_label;
+         private Banshee.ContextPane.ContextPane context_pane;
          private VBox footer;
 +        private MenuButton title_button;
          
 -        private ISourceContents content;
 +        private ISourceContents explicit_content;
 +        private SourceContentNotebook notebook;
 +
 +        private SourceContentManager content_manager;
          
          public ViewContainer ()
          {
@@@ -123,6 -113,14 +124,17 @@@
              
              PackStart (header, false, false, 0);
              PackEnd (footer, false, false, 0);
+ 
+             context_pane = new Banshee.ContextPane.ContextPane ();
+             context_pane.ExpandHandler = b => {
 -                SetChildPacking (content.Widget, !b, true, 0, PackType.Start);
++                if (explicit_content != null) {
++                    SetChildPacking (explicit_content.Widget, !b, true, 0, PackType.Start);
++                }
++                SetChildPacking (notebook, !b, true, 0, PackType.Start);
+                 SetChildPacking (context_pane, b, b, 0, PackType.End);
+             };
+             PackEnd (context_pane, false, false, 0);
+ 
              PackEnd (new ConnectedMessageBar (), false, true, 0);
          }
          
@@@ -212,64 -210,32 +224,64 @@@
          public SearchEntry SearchEntry {
              get { return search_entry; }
          }
 -        
 -        public ISourceContents Content {
 -            get { return content; }
 -            set {
 -                if (content == value) {
 -                    return;
 -                }
  
 -                // Hide the old content widget
 -                if (content != null && content.Widget != null) {
 -                    content.Widget.Hide ();
 -                }
 +        public void SetSource (Source source)
 +        {
 +            if (source == null) {
 +                return;
 +            }
  
 -                // Add and show the new one
 -                if (value != null && value.Widget != null) {
 -                    PackStart (value.Widget, !context_pane.Large, true, 0);
 -                    value.Widget.Show ();
 +            bool show_menu = false;
 +
 +            if (explicit_content != null) {
 +                explicit_content.Widget.Hide ();
 +                explicit_content = null;
 +            }
 +
 +            // If the Source has an explicit view set in its Properties, then honor that, otherwise
 +            // determine what content to show from the content extensions that are compatible
 +            explicit_content = source.GetProperty<ISourceContents> ("Nereid.SourceContents",
 +                source.GetInheritedProperty<bool> ("Nereid.SourceContentsPropagate"));
 +
 +            if (explicit_content != null) {
 +                Hyena.Log.DebugFormat ("Honoring explicit content request ({0}) from source ({1})", explicit_content, source);
 +                explicit_content.SetSource (source);
 +                notebook.Hide ();
 +                if (explicit_content.Widget.Parent == null) {
-                     PackStart (explicit_content.Widget, true, true, 0);
++                    PackStart (explicit_content.Widget, !context_pane.Large, true, 0);
                  }
 -                
 -                // Remove the old one
 -                if (content != null && content.Widget != null) {
 -                    Remove (content.Widget);
 +                explicit_content.Widget.Show ();
 +            } else {
 +                List<SourceContentProvider> providers = new List<SourceContentProvider> (content_manager.GetProvidersFor (source));
 +                SourceContentProvider default_provider = content_manager.GetLastOrDefaultProviderFor (source);
 +                if (default_provider == null) {
 +                    Hyena.Log.ErrorFormat ("No default content provider found for source '{0}' (type {1})", source, source.GetType ());
 +                    source.SetStatus (Catalog.GetString ("Error: No view found for this source"), true);
 +                    notebook.Hide ();
 +                    return;
                  }
 -                
 -                content = value;
 +
 +                notebook.SetSource (source, default_provider);
 +                content_menu.SetSource (source, providers, default_provider);
 +
 +                show_menu = (content_menu.Children.Length > 1);
 +                notebook.Show ();
 +            }
 +
 +            if (show_menu) {
 +                title_label.Hide ();
 +                content_menu.ShowAll ();
 +                title_button.Show ();
 +            } else {
 +                title_button.Hide ();
 +                title_label.Show ();
              }
 +
 +            Show ();
 +        }
 +
 +        public ISourceContents Content {
 +            get { return explicit_content ?? notebook.Content; }
          }
          
          public string Title {
diff --cc src/Core/Banshee.ThickClient/Banshee.ThickClient.addin.xml
index 593465b,cc20699..59b6623
--- a/src/Core/Banshee.ThickClient/Banshee.ThickClient.addin.xml
+++ b/src/Core/Banshee.ThickClient/Banshee.ThickClient.addin.xml
@@@ -41,10 -36,15 +41,15 @@@
      <ExtensionNode name="ActionGroup"/>
    </ExtensionPoint>
  
 -  <ExtensionPoint path="/Banshee/ThickClient/SourceView">
 +  <ExtensionPoint path="/Banshee/ThickClient/SourceContentProvider">
      <Description>Defines a new GTK+ source view, possibly in conjunction with a Source extension.</Description>
 -    <ExtensionNode name="SourceView"/>
 +    <ExtensionNode name="Provider"/>
    </ExtensionPoint>
+ 
+   <ExtensionPoint path="/Banshee/ThickClient/ContextPage">
+     <Description>Defines a new GTK+ context page, for showing contextual information beneath the main track source view.</Description>
+     <ExtensionNode name="ContextPage"/>
+   </ExtensionPoint>
    
    <ExtensionPoint path="/Banshee/Gui/TrackEditor/NotebookPage">
      <Description>Defines a new notebook page for the track editor.</Description>



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