[banshee] [NowPlaying] Add a Simplify action that declutters the UI
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [NowPlaying] Add a Simplify action that declutters the UI
- Date: Sun, 15 Aug 2010 22:53:51 +0000 (UTC)
commit b9fb0e1901c5e1fa6f144a8f2a5f9089cda6a75d
Author: Gabriel Burt <gabriel burt gmail com>
Date: Sun Aug 15 15:52:49 2010 -0700
[NowPlaying] Add a Simplify action that declutters the UI
It's a button by the Fullscreen one, and toggles the visibility of the
main menu, status bar, and source list.
src/Clients/Nereid/Nereid/PlayerInterface.cs | 12 ++++++++++++
.../Banshee.NowPlaying/NowPlayingSource.cs | 11 +++++++++++
.../Resources/ActiveSourceUI.xml | 1 +
3 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/src/Clients/Nereid/Nereid/PlayerInterface.cs b/src/Clients/Nereid/Nereid/PlayerInterface.cs
index a3dd1ff..b8f8dbe 100644
--- a/src/Clients/Nereid/Nereid/PlayerInterface.cs
+++ b/src/Clients/Nereid/Nereid/PlayerInterface.cs
@@ -92,6 +92,13 @@ namespace Nereid
{
}
+ private void SetSimple (bool simple)
+ {
+ main_menu.Visible = !simple;
+ source_box.Visible = !simple;
+ footer_toolbar.Visible = !simple;
+ }
+
public PlayerInterface () : base (Catalog.GetString ("Banshee Media Player"), "player_window", 1024, 700)
{
// if (PlatformDetection.IsMeeGo) {
@@ -464,6 +471,8 @@ namespace Nereid
UpdateSourceInformation ();
view_container.SearchEntry.Ready = true;
+
+ SetSimple (source.Properties.Get<bool> ("Nereid.SimpleUI"));
});
}
@@ -487,6 +496,9 @@ namespace Nereid
});
}
break;
+ case "Nereid.SimpleUI":
+ SetSimple (ServiceManager.SourceManager.ActiveSource.Properties.Get<bool> ("Nereid.SimpleUI"));
+ break;
}
}
diff --git a/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/NowPlayingSource.cs b/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/NowPlayingSource.cs
index c4d15bb..0cdfb15 100644
--- a/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/NowPlayingSource.cs
+++ b/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/NowPlayingSource.cs
@@ -53,6 +53,17 @@ namespace Banshee.NowPlaying
Properties.Set<bool> ("Nereid.SourceContents.HeaderVisible", false);
Properties.SetString ("ActiveSourceUIResource", "ActiveSourceUI.xml");
+ var actions = new BansheeActionGroup ("NowPlaying");
+ actions.AddImportant (new ToggleActionEntry ("SimplifyNowPlaying", null, Catalog.GetString ("Simplify"),
+ "F9", Catalog.GetString ("Simplify the Now Playing interface by hiding the source list and more"),
+ delegate {
+ bool simple = !Properties.Get<bool> ("Nereid.SimpleUI");
+ Properties.Set<bool> ("Nereid.SimpleUI", simple);
+ (actions["SimplifyNowPlaying"] as ToggleAction).Active = simple;
+ }, false)
+ );
+ Properties.Set<BansheeActionGroup> ("ActiveSourceActions", actions);
+
ServiceManager.SourceManager.AddSource (this);
ServiceManager.PlaybackController.Transition += OnPlaybackControllerTransition;
diff --git a/src/Extensions/Banshee.NowPlaying/Resources/ActiveSourceUI.xml b/src/Extensions/Banshee.NowPlaying/Resources/ActiveSourceUI.xml
index 6b938de..d07bfbf 100644
--- a/src/Extensions/Banshee.NowPlaying/Resources/ActiveSourceUI.xml
+++ b/src/Extensions/Banshee.NowPlaying/Resources/ActiveSourceUI.xml
@@ -1,6 +1,7 @@
<ui>
<toolbar name="HeaderToolbar">
<placeholder name="SourceActions">
+ <toolitem action="SimplifyNowPlaying"/>
<toolitem action="FullScreenAction" />
</placeholder>
</toolbar>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]