[banshee] [Banshee.WebSource] Fix adding/removing zoom actions when activated
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [Banshee.WebSource] Fix adding/removing zoom actions when activated
- Date: Sun, 15 Aug 2010 22:53:46 +0000 (UTC)
commit d4bc020bcca8ca7f425146af63c48e0475fa331a
Author: Gabriel Burt <gabriel burt gmail com>
Date: Sun Aug 15 15:51:12 2010 -0700
[Banshee.WebSource] Fix adding/removing zoom actions when activated
.../Banshee.WebSource/WebSource.cs | 32 ++++++++++----------
1 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/src/Core/Banshee.WebBrowser/Banshee.WebSource/WebSource.cs b/src/Core/Banshee.WebBrowser/Banshee.WebSource/WebSource.cs
index 274aa4e..59a0f2f 100644
--- a/src/Core/Banshee.WebBrowser/Banshee.WebSource/WebSource.cs
+++ b/src/Core/Banshee.WebBrowser/Banshee.WebSource/WebSource.cs
@@ -57,6 +57,22 @@ namespace Banshee.WebSource
new ActionEntry ("Zoom100" + id, Stock.Zoom100, null, "<control>0", null, (o, a) => view.Zoom = 1f)
);
+ Properties.Set<string> ("ActiveSourceUIString", String.Format (@"
+ <ui>
+ <menubar name=""MainMenu"" action=""MainMenuAction"">
+ <menu name=""ViewMenu"" action=""ViewMenuAction"">
+ <placeholder name=""ViewMenuAdditions"">
+ <separator/>
+ <menuitem action=""ZoomIn{0}""/>
+ <menuitem action=""ZoomOut{0}""/>
+ <menuitem action=""Zoom100{0}""/>
+ <separator/>
+ </placeholder>
+ </menu>
+ </menubar>
+ </ui>", TypeUniqueId
+ ));
+
Properties.Set<BansheeActionGroup> ("ActiveSourceActions", actions);
}
@@ -75,22 +91,6 @@ namespace Banshee.WebSource
source_contents = new WebSourceContents (this, shell));
Properties.Set<Banshee.Widgets.SearchEntry> ("Nereid.SearchEntry", shell.SearchEntry);
- actions.AddUiFromString (String.Format (@"
- <ui>
- <menubar name=""MainMenu"" action=""MainMenuAction"">
- <menu name=""ViewMenu"" action=""ViewMenuAction"">
- <placeholder name=""ViewMenuAdditions"">
- <separator/>
- <menuitem action=""ZoomIn{0}""/>
- <menuitem action=""ZoomOut{0}""/>
- <menuitem action=""Zoom100{0}""/>
- <separator/>
- </placeholder>
- </menu>
- </menubar>
- </ui>", TypeUniqueId
- ));
-
// Add additional menu item keybindings
var item = actions.ActionManager.UIManager.GetWidget ("/MainMenu/ViewMenu/ViewMenuAdditions/ZoomIn" + TypeUniqueId);
item.AddAccelerator ("activate", actions.ActionManager.UIManager.AccelGroup,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]