[totem] Fix state of the button popup when popup is dismissed
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [totem] Fix state of the button popup when popup is dismissed
- Date: Thu, 14 Jan 2010 15:49:26 +0000 (UTC)
commit 3b04ce36bb7155ae0e68a69953dec661647f58d3
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jan 14 15:30:30 2010 +0000
Fix state of the button popup when popup is dismissed
browser-plugin/totem-plugin-viewer.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/browser-plugin/totem-plugin-viewer.c b/browser-plugin/totem-plugin-viewer.c
index 05aa0c7..45c3184 100644
--- a/browser-plugin/totem-plugin-viewer.c
+++ b/browser-plugin/totem-plugin-viewer.c
@@ -1284,6 +1284,16 @@ on_popup_button_button_pressed (GtkToggleButton *button,
return FALSE;
}
+static void
+on_popup_menu_unmap (GtkWidget *menu,
+ TotemEmbedded *emb)
+{
+ GtkWidget *button;
+
+ button = GTK_WIDGET (gtk_builder_get_object (emb->xml, "popup_button"));
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), FALSE);
+}
+
static char *
resolve_redirect (const char *old_mrl, const char *mrl)
{
@@ -1752,6 +1762,7 @@ totem_embedded_construct (TotemEmbedded *emb,
{
GtkWidget *child, *container, *image;
GtkWidget *popup_button;
+ GtkWidget *menu;
BvwUseType type;
GError *err = NULL;
GConfClient *gc;
@@ -1897,6 +1908,9 @@ totem_embedded_construct (TotemEmbedded *emb,
G_CALLBACK (on_popup_button_toggled), emb);
g_signal_connect (G_OBJECT (popup_button), "button-press-event",
G_CALLBACK (on_popup_button_button_pressed), emb);
+ menu = GTK_WIDGET (gtk_builder_get_object (emb->menuxml, "menu"));
+ g_signal_connect (G_OBJECT (menu), "unmap",
+ G_CALLBACK (on_popup_menu_unmap), emb);
gc = gconf_client_get_default ();
volume = ((double) gconf_client_get_int (gc, GCONF_PREFIX"/volume", NULL)) / 100.0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]