2009-03-10 Alberto Garcia <agarcia@igalia.com>
authorAlberto Garcia <agarcia@igalia.com>
Tue, 10 Mar 2009 18:14:01 +0000 (18:14 +0000)
committerAlberto Garcia <agarcia@igalia.com>
Tue, 10 Mar 2009 18:14:01 +0000 (18:14 +0000)
* src/hildon-app-menu.c (+hildon_app_menu_delete_event_handler)
(hildon_app_menu_class_init): Hide the menu if it receives a
delete-event, but don't destroy it

Fixes: NB#104485 (Not able to address the call when application
menu is opened at background)

ChangeLog
src/hildon-app-menu.c

index 77733f1..c9b0fbe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2009-03-10  Alberto Garcia  <agarcia@igalia.com>
 
+       * src/hildon-app-menu.c (+hildon_app_menu_delete_event_handler)
+       (hildon_app_menu_class_init): Hide the menu if it receives a
+       delete-event, but don't destroy it
+
+       Fixes: NB#104485 (Not able to address the call when application
+       menu is opened at background)
+
+2009-03-10  Alberto Garcia  <agarcia@igalia.com>
+
        * src/hildon-app-menu.c
        (hildon_app_menu_apply_style, hildon_app_menu_class_init):
        Remove the "external-border" style property, let the menu take its
index 0813d8a..a7d4996 100644 (file)
@@ -686,6 +686,15 @@ hildon_app_menu_button_release                  (GtkWidget *widget,
     }
 }
 
+static gboolean
+hildon_app_menu_delete_event_handler                   (GtkWidget   *widget,
+                                                        GdkEventAny *event)
+{
+    /* Hide the menu if it receives a delete-event, but don't destroy it */
+    gtk_widget_hide (widget);
+    return TRUE;
+}
+
 /* Grab transfer window (based on the one from GtkMenu) */
 static GdkWindow *
 grab_transfer_window_get                        (GtkWidget *widget)
@@ -1017,6 +1026,7 @@ hildon_app_menu_class_init                      (HildonAppMenuClass *klass)
     widget_class->button_press_event = hildon_app_menu_button_press;
     widget_class->button_release_event = hildon_app_menu_button_release;
     widget_class->style_set = hildon_app_menu_style_set;
+    widget_class->delete_event = hildon_app_menu_delete_event_handler;
 
     g_type_class_add_private (klass, sizeof (HildonAppMenuPrivate));