[evince] shell: use popover for view-menu and action-menu



commit cb3d4b2820d9e6584d4b3df105edb3bae73d6e50
Author: Felipe Borges <felipeborges gnome org>
Date:   Tue Jan 12 14:51:52 2016 +0100

    shell: use popover for view-menu and action-menu
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760527

 shell/ev-toolbar.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/shell/ev-toolbar.c b/shell/ev-toolbar.c
index a91788a..eff5a08 100644
--- a/shell/ev-toolbar.c
+++ b/shell/ev-toolbar.c
@@ -130,17 +130,17 @@ ev_toolbar_create_menu_button (EvToolbar   *ev_toolbar,
                                GMenuModel  *menu,
                                GtkAlign     menu_align)
 {
-        GtkWidget *button;
-        GtkMenu *popup;
+        GtkWidget  *button;
+        GtkPopover *popup;
 
         button = gtk_menu_button_new ();
-        gtk_menu_button_set_use_popover (GTK_MENU_BUTTON (button), FALSE);
         gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
         gtk_button_set_image (GTK_BUTTON (button), gtk_image_new ());
         gtk_image_set_from_icon_name (GTK_IMAGE (gtk_button_get_image (GTK_BUTTON (button))),
                                       icon_name, GTK_ICON_SIZE_MENU);
         gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (button), menu);
-        popup = gtk_menu_button_get_popup (GTK_MENU_BUTTON (button));
+        popup = gtk_menu_button_get_popover (GTK_MENU_BUTTON (button));
+        gtk_popover_set_position (popup, GTK_POS_BOTTOM);
         gtk_widget_set_halign (GTK_WIDGET (popup), menu_align);
 
         return button;


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