View Single Post
Posts: 189 | Thanked: 171 times | Joined on Jul 2011
#165
Originally Posted by Scorpius View Post
OK I think I got it, and this is why I hate the lack of documentation of Maemo, or actually, how broken it is. It's such a nice OS, and it could have been so powerful, but it was always in the wrong hands, and Nokia haven't released the whole code yet.

So here it is for all the developers out there that tried to stack notifications and never could and wondered why, and this is why: All the notifications have to have ID = 0 to be stacked. For them I hope they can find this through Google.

And no, there's no function to set the ID of a notification. How can you do it? like this:
Code:
n = notify_notification_new(summary,body,"icon",NULL);
g_object_set (G_OBJECT (n),"id", 0, NULL);
That's the first notification. You have to keep your list of notifications of course. When you want to update it, you retreive it from your list and have to do it again:

Code:
n = myList.value(key);
g_object_set (G_OBJECT (n),"id", 0, NULL);

/* Set the number of new notifications */
notify_notification_set_hint_int32 (n,"amount", myList.length());
notify_notification_update(n,new_summary,new_body,"icon");
To show the notification you have to use notify_notification_show after that as usual.

And if you're wondering how I found out the g_object_set (G_OBJECT (notification),"id", 0, NULL); ???

Well I had to read half of the hildon source code for that
hehe, love the sad face from reading all the source, must have been a pain Yes, I believe that is how it was done, shame I was that little bit too late, I was just as lost as you while making a simple `a la` NET SEND chat app on the N900 Let me see if I can find the source code and send it to you, it could have some useful data like this

EDIT: No, sorry, not backing up before a formatting tends to mean you lose data

Last edited by pablocrossa; 2012-06-05 at 05:28.
 

The Following User Says Thank You to pablocrossa For This Useful Post: