[evince] sidebar links: fix popup



commit a16ac087849df369af660acad90123f77243402a
Author: Jason Crain <jcrain src gnome org>
Date:   Mon Jun 10 18:02:56 2019 -0600

    sidebar links: fix popup
    
    The outline's popup is currently empty because it's being populated with
    a label instead of a menu item, and on Wayland, it prints warning
    messages because the popup is shown without being attached to a widget.
    
    Change this to use a menu item, and attach the menu to the outline's
    tree view.

 shell/ev-sidebar-links.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/shell/ev-sidebar-links.c b/shell/ev-sidebar-links.c
index 29d3997e..e34156a3 100644
--- a/shell/ev-sidebar-links.c
+++ b/shell/ev-sidebar-links.c
@@ -341,11 +341,12 @@ build_popup_menu (EvSidebarLinks *sidebar)
        GtkWidget *item;
 
        menu = gtk_menu_new ();
-       item = gtk_label_new_with_mnemonic(_("Print…"));
+       item = gtk_menu_item_new_with_mnemonic(_("Print…"));
        gtk_widget_show (item);
        gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
        g_signal_connect (item, "activate",
                          G_CALLBACK (print_section_cb), sidebar);
+       gtk_menu_attach_to_widget (menu, sidebar->priv->tree_view, NULL);
 
        return GTK_MENU (menu);
 }


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