[gnome-panel] na: Fix handling of SYSTEM_TRAY_CANCEL_MESSAGE
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] na: Fix handling of SYSTEM_TRAY_CANCEL_MESSAGE
- Date: Tue, 1 Feb 2011 11:03:31 +0000 (UTC)
commit 8ff843458425d525b10fc5d9b7bb357248c637c8
Author: Vincent Untz <vuntz gnome org>
Date: Tue Feb 1 12:02:41 2011 +0100
na: Fix handling of SYSTEM_TRAY_CANCEL_MESSAGE
We were not looking at the right field for the message ID: the ID is in
the 4th field for BEGIN_MESSAGE, but 2nd field for CANCEL_MESSAGE.
applets/notification_area/na-tray-manager.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/applets/notification_area/na-tray-manager.c b/applets/notification_area/na-tray-manager.c
index 6d124c3..533c1fb 100644
--- a/applets/notification_area/na-tray-manager.c
+++ b/applets/notification_area/na-tray-manager.c
@@ -374,13 +374,17 @@ na_tray_manager_handle_begin_message (NaTrayManager *manager,
if (!socket)
return;
+ timeout = xevent->data.l[2];
+ len = xevent->data.l[3];
+ id = xevent->data.l[4];
+
/* Check if the same message is already in the queue and remove it if so */
for (p = manager->messages; p; p = p->next)
{
PendingMessage *pmsg = p->data;
if (xevent->window == pmsg->window &&
- xevent->data.l[4] == pmsg->id)
+ id == pmsg->id)
{
/* Hmm, we found it, now remove it */
pending_message_free (pmsg);
@@ -390,10 +394,6 @@ na_tray_manager_handle_begin_message (NaTrayManager *manager,
}
}
- timeout = xevent->data.l[2];
- len = xevent->data.l[3];
- id = xevent->data.l[4];
-
if (len == 0)
{
g_signal_emit (manager, manager_signals[MESSAGE_SENT], 0,
@@ -420,6 +420,9 @@ na_tray_manager_handle_cancel_message (NaTrayManager *manager,
{
GList *p;
GtkSocket *socket;
+ long id;
+
+ id = xevent->data.l[2];
/* Check if the message is in the queue and remove it if so */
for (p = manager->messages; p; p = p->next)
@@ -427,7 +430,7 @@ na_tray_manager_handle_cancel_message (NaTrayManager *manager,
PendingMessage *msg = p->data;
if (xevent->window == msg->window &&
- xevent->data.l[4] == msg->id)
+ id == msg->id)
{
pending_message_free (msg);
manager->messages = g_list_remove_link (manager->messages, p);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]