[banshee/better-now-playing: 3/3] [NowPlaying] Use radio action correctly for context buttons
- From: Alex Launi <alexlauni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/better-now-playing: 3/3] [NowPlaying] Use radio action correctly for context buttons
- Date: Tue, 25 May 2010 00:22:08 +0000 (UTC)
commit bc7ce1ae37d391f5efa2560a510cd54f94bb1729
Author: Alex Launi <alex launi gmail com>
Date: Mon May 24 20:06:56 2010 -0400
[NowPlaying] Use radio action correctly for context buttons
Correctly use RadioActionEntry for now playing actions with
respect to the context pane sources.
.../Banshee.NowPlaying/Actions.cs | 23 +++++++++++--------
1 files changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/Actions.cs b/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/Actions.cs
index dcc12d8..24c82b1 100644
--- a/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/Actions.cs
+++ b/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/Actions.cs
@@ -44,19 +44,22 @@ namespace Banshee.NowPlaying
{
public Actions () : base ("NowPlaying")
{
- RadioAction act = new RadioAction ("StandardNpOpen", null, "Now Playing", null, 0);
- act.IconName = "applications-multimedia";
- Add (act);
+ Add (new RadioActionEntry [] {
+ new RadioActionEntry ("StandardNpOpen", null, null, null, "Now Playing"),
+ new RadioActionEntry ("LastFmOpen", null, null, null, "Last.fm recommendations"),
+ new RadioActionEntry ("WikipediaOpen", null, null, null, "Wikipedia")
+ }, 2, OnChanged);
- act = new RadioAction ("LastFmOpen", null, "Last.fm recommendations", null, 1);
- act.IconName = "lastfm-audioscrobbler";
- Add (act);
-
- act = new RadioAction ("WikipediaOpen", null, "Wikipedia", null, 2);
- act.IconName = "wikipedia";
- Add (act);
+ this["StandardNpOpen"].IconName = "applications-multimedia";
+ this["LastFmOpen"].IconName = "lastfm-audioscrobbler";
+ this["WikipediaOpen"].IconName = "wikipedia";
Register ();
}
+
+ public void OnChanged (System.Object o, ChangedArgs args)
+ {
+ Log.DebugFormat ("Changed to {0}", args.Current.CurrentValue);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]