[totem] main: Disable popover transitions for video menus



commit b8ebe5244e425769dfad9a5dd610deeb23024427
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Mar 13 10:30:16 2015 +0100

    main: Disable popover transitions for video menus
    
    The underlying clutter-gst/clutter-gtk widget doesn't like transparent
    widgets on top of it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745819

 src/backend/bacon-video-controls-actor.c |   13 +++++++++++++
 src/totem-object.c                       |    5 +++++
 2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/backend/bacon-video-controls-actor.c b/src/backend/bacon-video-controls-actor.c
index 094cfc7..83e1c78 100644
--- a/src/backend/bacon-video-controls-actor.c
+++ b/src/backend/bacon-video-controls-actor.c
@@ -89,6 +89,17 @@ setup_object (BaconVideoControlsActor *controls,
 }
 
 static void
+disable_popover_transitions (BaconVideoControlsActor *controls)
+{
+       GtkPopover *popover;
+       GObject *obj;
+
+       obj = gtk_builder_get_object (controls->priv->builder, "volume_button");
+       popover = GTK_POPOVER (gtk_scale_button_get_popup (GTK_SCALE_BUTTON (obj)));
+       gtk_popover_set_transitions_enabled (popover, FALSE);
+}
+
+static void
 bacon_video_controls_actor_init (BaconVideoControlsActor *controls)
 {
        const char *objects[] = { "toolbar", NULL };
@@ -107,6 +118,8 @@ bacon_video_controls_actor_init (BaconVideoControlsActor *controls)
        setup_object (controls, "volume_button");
        setup_object (controls, "time_label");
        setup_object (controls, "time_rem_label");
+
+       disable_popover_transitions (controls);
 }
 
 ClutterActor *
diff --git a/src/totem-object.c b/src/totem-object.c
index ab32fea..d81c631 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -3739,6 +3739,7 @@ totem_callback_connect (TotemObject *totem)
        GtkBox *box;
        GAction *gaction;
        GMenuModel *menu;
+       GtkPopover *popover;
 
        /* Menu items */
        gaction = g_action_map_lookup_action (G_ACTION_MAP (totem), "repeat");
@@ -3786,6 +3787,8 @@ totem_callback_connect (TotemObject *totem)
        item = g_object_get_data (totem->controls, "go_button");
        menu = (GMenuModel *) gtk_builder_get_object (totem->xml, "gomenu");
        gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (item), menu);
+       popover = gtk_menu_button_get_popover (GTK_MENU_BUTTON (item));
+       gtk_popover_set_transitions_enabled (GTK_POPOVER (popover), FALSE);
        g_signal_connect (G_OBJECT (item), "toggled",
                          G_CALLBACK (popup_menu_shown_cb), totem);
        /* Cog wheel */
@@ -3795,6 +3798,8 @@ totem_callback_connect (TotemObject *totem)
                                                                          GTK_PACK_END);
        menu = (GMenuModel *) gtk_builder_get_object (totem->xml, "playermenu");
        gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (item), menu);
+       popover = gtk_menu_button_get_popover (GTK_MENU_BUTTON (item));
+       gtk_popover_set_transitions_enabled (GTK_POPOVER (popover), FALSE);
        g_signal_connect (G_OBJECT (item), "toggled",
                          G_CALLBACK (popup_menu_shown_cb), totem);
 


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