[banshee] [Audiobook] Add Esc shortcut to return to grid view



commit 0ccf80c214dbe5310737ed0c42d549f061f76832
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Mon May 17 15:48:56 2010 -0700

    [Audiobook] Add Esc shortcut to return to grid view

 .../Banshee.Audiobook/Banshee.Audiobook/Actions.cs |    3 +++
 .../Banshee.Audiobook/Resources/ActiveSourceUI.xml |    5 +++++
 2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/Actions.cs b/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/Actions.cs
index 73b0dc1..22f5e0c 100644
--- a/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/Actions.cs
+++ b/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/Actions.cs
@@ -54,6 +54,7 @@ namespace Banshee.Audiobook
                 new ActionEntry ("AudiobookBookPopup", null, null, null, null, (o, a) => ShowContextMenu ("/AudiobookBookPopup")),
                 new ActionEntry ("AudiobookOpen", null, Catalog.GetString ("Open Book"), null, null, OnOpen),
                 new ActionEntry ("AudiobookMerge", null, Catalog.GetString ("Merge Discs..."), null, null, OnMerge),
+                new ActionEntry ("AudiobookSwitchToGrid", null, "", "Escape", null, (o, a) => library.SwitchToGridView ()),
                 new ActionEntry ("AudiobookEdit", Stock.Edit,
                     Catalog.GetString ("_Edit Track Information"), "E", null, OnEdit),
                 new ActionEntry ("AudiobookResumeSelected", Stock.MediaPlay,
@@ -70,6 +71,8 @@ namespace Banshee.Audiobook
             UpdateActions ();
             library.BooksModel.Selection.Changed += (o, a) => UpdateActions ();
             library.BooksModel.Selection.FocusChanged += (o, a) => UpdateActions ();
+
+            this["AudiobookSwitchToGrid"].Visible = false;
         }
 
         internal void UpdateActions ()
diff --git a/src/Extensions/Banshee.Audiobook/Resources/ActiveSourceUI.xml b/src/Extensions/Banshee.Audiobook/Resources/ActiveSourceUI.xml
index 90b72e9..1314a8c 100644
--- a/src/Extensions/Banshee.Audiobook/Resources/ActiveSourceUI.xml
+++ b/src/Extensions/Banshee.Audiobook/Resources/ActiveSourceUI.xml
@@ -4,4 +4,9 @@
             <toolitem action="AudiobookResume"/>
         </placeholder>
     </toolbar>
+    <menubar name="MainMenu">
+        <menu name="ToolsMenu" action="ToolsMenuAction">
+          <menuitem action="AudiobookSwitchToGrid"/>
+        </menu>
+    </menubar>
 </ui>



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