View Single Post
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#48
so... back from watching germany against ghana *yay*

tried following code on my laptop and ran it as script:
Code:
void received_im_msg_cb (DBusGProxy *purple_proxy, int account_id, 
                         const char *sender, const char *message, 
                         int conv_id, unsigned int flags,
                         gpointer user_data)
{
    g_print("Account %d receives msg \"%s\" from %s\n",   
            account_id, message, sender);
}
and that was what my console showed me:
Code:
b666m@xb666mx:~/pidgin$ ./pidginnotifyd 
Account 1100 receives msg "-" from xxx767xxx
(i xxx'ed out some numbers to save my contact from your spam :P)
but hey.. i get the data i want to get for the notification

so the notification should show on top the number of your contact and under this the message - and of course the pidgin-logo. (don't know the maximum length of it and what happens if it exceeds it ^^)
would look like:


four things would be to-do:
1. convert the number to the name of the contact (should be easy)
2. check the length of the message and cut it (add "..." at the end)
3. replace the pidgin-icon by the contact's photo (don't know if it's possible because the photos are stored with a very cryptic name)
4. by clicking the notification bring the conversation to foreground (this would be the hardest (impossible) thing to do ^^)

will see what i can do (:
 

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