[maemo-commits] [maemo-commits] r13269 - in projects/haf/trunk/hildon-1: . src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Aug 16 18:09:03 EEST 2007
Author: xan
Date: 2007-08-16 18:09:02 +0300 (Thu, 16 Aug 2007)
New Revision: 13269

Modified:
   projects/haf/trunk/hildon-1/ChangeLog
   projects/haf/trunk/hildon-1/src/hildon-banner.c
Log:
2007-08-16  Xan Lopez  <xan.lopez at nokia.com>

	* src/hildon-banner.c: (hildon_banner_client_event): connect directly to
	the client event and ignore it, since we use the delete event to close
	after timeouts.


Modified: projects/haf/trunk/hildon-1/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-1/ChangeLog	2007-08-16 15:07:05 UTC (rev 13268)
+++ projects/haf/trunk/hildon-1/ChangeLog	2007-08-16 15:09:02 UTC (rev 13269)
@@ -1,3 +1,9 @@
+2007-08-16  Xan Lopez  <xan.lopez at nokia.com>
+
+	* src/hildon-banner.c: (hildon_banner_client_event): connect directly to
+	the client event and ignore it, since we use the delete event to close
+	after timeouts.
+
 2007-08-16  Michael Dominic Kostrzewa  <michael.kostrzewa at nokia.com> 
 
 	* src/hildon-helper.c: Remove the bogus warning about color not being

Modified: projects/haf/trunk/hildon-1/src/hildon-banner.c
===================================================================
--- projects/haf/trunk/hildon-1/src/hildon-banner.c	2007-08-16 15:07:05 UTC (rev 13268)
+++ projects/haf/trunk/hildon-1/src/hildon-banner.c	2007-08-16 15:09:02 UTC (rev 13269)
@@ -557,12 +557,25 @@
 }  
 
 #if defined(MAEMO_GTK)
-/* Do nothing for the delete event that will come from _GTK_DELETE_TEMPORARIES */
+
+static GdkAtom atom_temporaries = GDK_NONE;
+
+/* Do nothing for _GTK_DELETE_TEMPORARIES */
 static gint
-hildon_banner_delete_event                      (GtkWidget *widget,
-                                                 GdkEvent  *event)
+hildon_banner_client_event                      (GtkWidget *widget,
+                                                 GdkEventClient  *event)
 {
-    return TRUE;
+  gboolean handled = FALSE;
+
+  if (atom_temporaries == GDK_NONE)
+    atom_temporaries = gdk_atom_intern_static_string ("_GTK_DELETE_TEMPORARIES");
+
+  if (event->message_type == atom_temporaries)
+    {
+      handled = TRUE;
+    }
+
+  return handled;
 }
 #endif
 
@@ -663,7 +676,7 @@
     widget_class->map_event = hildon_banner_map_event;
     widget_class->realize = hildon_banner_realize;
 #if defined(MAEMO_GTK)
-    widget_class->delete_event = hildon_banner_delete_event;
+    widget_class->client_event = hildon_banner_client_event;
 #endif
 
     /* Install properties.


More information about the maemo-commits mailing list