[easytag] Attach menus to browser tree view widgets



commit 2d27dee5f8a444cbdbef598a5315b425dc726d06
Author: David King <amigadave amigadave com>
Date:   Sun Mar 24 13:10:08 2013 +0000

    Attach menus to browser tree view widgets
    
    Additionally, fix a typo to add the context-menu handler to
    BrowserAlbumList (it was previously added twice to BrowserArtistList).

 src/browser.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/browser.c b/src/browser.c
index 624d367..5e2b7e4 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -3152,6 +3152,7 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
 
     /* Create Popup Menu on browser tree view */
     PopupMenu = gtk_ui_manager_get_widget(UIManager, "/DirPopup");
+    gtk_menu_attach_to_widget (GTK_MENU (PopupMenu), BrowserTree, NULL);
     g_signal_connect (G_OBJECT (BrowserTree), "button-press-event",
                       G_CALLBACK (Browser_Popup_Menu_Handler), PopupMenu);
 
@@ -3241,6 +3242,7 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
 
     // Create Popup Menu on browser artist list
     PopupMenu = gtk_ui_manager_get_widget(UIManager, "/DirArtistPopup");
+    gtk_menu_attach_to_widget (GTK_MENU (PopupMenu), BrowserArtistList, NULL);
     g_signal_connect (G_OBJECT (BrowserArtistList), "button-press-event",
                       G_CALLBACK (Browser_Popup_Menu_Handler), PopupMenu);
     // Not available yet!
@@ -3304,7 +3306,8 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
 
     // Create Popup Menu on browser album list
     PopupMenu = gtk_ui_manager_get_widget(UIManager, "/DirAlbumPopup");
-    g_signal_connect (G_OBJECT (BrowserArtistList), "button-press-event",
+    gtk_menu_attach_to_widget (GTK_MENU (PopupMenu), BrowserAlbumList, NULL);
+    g_signal_connect (G_OBJECT (BrowserAlbumList), "button-press-event",
                       G_CALLBACK (Browser_Popup_Menu_Handler), PopupMenu);
     // Not available yet!
     //ui_widget_set_sensitive(MENU_FILE, AM_ALBUM_OPEN_FILE_WITH, FALSE);
@@ -3582,8 +3585,9 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
      * Create Popup Menu on file list
      */
     PopupMenu = gtk_ui_manager_get_widget(UIManager, "/FilePopup");
+    gtk_menu_attach_to_widget (GTK_MENU (PopupMenu), BrowserList, NULL);
     g_signal_connect(G_OBJECT(BrowserList),"button-press-event",
-                             G_CALLBACK(Browser_Popup_Menu_Handler), G_OBJECT(PopupMenu));
+                     G_CALLBACK (Browser_Popup_Menu_Handler), PopupMenu);
 
     /*
      * The list store for run program combos


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