[banshee: 31/61] [InternetArchive] dblclick on result opens details
- From: Gabriel Burt <gburt src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee: 31/61] [InternetArchive] dblclick on result opens details
- Date: Tue, 3 Nov 2009 06:30:27 +0000 (UTC)
commit e0c635ff485412a2bbd8ffa764609bda1e6721d1
Author: Gabriel Burt <gabriel burt gmail com>
Date: Mon Oct 12 18:00:55 2009 -0700
[InternetArchive] dblclick on result opens details
.../Banshee.InternetArchive/Actions.cs | 4 ++++
.../Banshee.InternetArchive/SearchView.cs | 14 ++++++++++++--
.../Resources/SearchSourceActiveUI.xml | 10 +++-------
3 files changed, 19 insertions(+), 9 deletions(-)
---
diff --git a/src/Extensions/Banshee.InternetArchive/Banshee.InternetArchive/Actions.cs b/src/Extensions/Banshee.InternetArchive/Banshee.InternetArchive/Actions.cs
index e80daef..5b189fb 100644
--- a/src/Extensions/Banshee.InternetArchive/Banshee.InternetArchive/Actions.cs
+++ b/src/Extensions/Banshee.InternetArchive/Banshee.InternetArchive/Actions.cs
@@ -42,6 +42,10 @@ namespace Banshee.InternetArchive
public Actions (SearchSource source) : base ("InternetArchive")
{
Add (
+ new ActionEntry ("IaResultPopup", null, null, null, null, (o, a) => {
+ ShowContextMenu ("/IaResultPopup");
+ }),
+
new ActionEntry ("ViewItemDetails", null, Catalog.GetString ("View Item Details"), null, null, (o, a) => {
var item = source.FocusedItem;
if (item != null && item.Id != null) {
diff --git a/src/Extensions/Banshee.InternetArchive/Banshee.InternetArchive/SearchView.cs b/src/Extensions/Banshee.InternetArchive/Banshee.InternetArchive/SearchView.cs
index b947078..648aac3 100644
--- a/src/Extensions/Banshee.InternetArchive/Banshee.InternetArchive/SearchView.cs
+++ b/src/Extensions/Banshee.InternetArchive/Banshee.InternetArchive/SearchView.cs
@@ -73,15 +73,25 @@ namespace Banshee.InternetArchive
IsEverReorderable = false,
ColumnController = new ColumnController ()
};
+
AddColumns ();
+ list_view.SetModel (source.Model);
+
+ list_view.PopupMenu += (o, a) => {
+ ServiceManager.Get<InterfaceActionService> ()["InternetArchive.IaResultPopup"].Activate ();
+ };
+
+ list_view.RowActivated += (o, a) => {
+ ServiceManager.Get<InterfaceActionService> ()["InternetArchive.ViewItemDetails"].Activate ();
+ };
+
+ // Packing
var sw = new Gtk.ScrolledWindow ();
sw.Child = list_view;
PackStart (sw, true, true, 0);
ShowAll ();
-
- list_view.SetModel (source.Model);
}
private void AddColumns ()
diff --git a/src/Extensions/Banshee.InternetArchive/Resources/SearchSourceActiveUI.xml b/src/Extensions/Banshee.InternetArchive/Resources/SearchSourceActiveUI.xml
index 0caf3bd..1a4478c 100644
--- a/src/Extensions/Banshee.InternetArchive/Resources/SearchSourceActiveUI.xml
+++ b/src/Extensions/Banshee.InternetArchive/Resources/SearchSourceActiveUI.xml
@@ -24,12 +24,8 @@
<menuitem action="VisitInternetArchive" />
</popup>
- <popup name="TrackContextMenu" action="TrackContextMenuAction">
- <placeholder name="BelowAddToPlaylist">
- <separator />
- <menuitem action="ViewItemDetails" />
- <menuitem action="OpenItemWebsite" />
- <separator />
- </placeholder>
+ <popup action="IaResultPopup">
+ <menuitem action="ViewItemDetails" />
+ <menuitem action="OpenItemWebsite" />
</popup>
</ui>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]