Patches item #1672389, was opened at 2007-03-02 07:12 Message generated for change (Comment added) made by rlaager You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300235&aid=1672389&group_id=235
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: newfeature Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: filippo_a (filippo_a) Assigned to: Nobody/Anonymous (nobody) Summary: Attention request signals.. Initial Comment: Hi i was trying to write, just for fun, a plugin that shakes the window when a nudge arrives but the only way i've found to do it was listening to displayed-im-msg signal. Since i don't think that's the better way i've added two conversation signals that are emitted when msn receives and sends a nudge. They can also be emitted by yahoo buzz or whenever an "attention request" event is needed. The received-attention-request signal takes also a string as an argument to contain the buddy name who requested our attention. Please let me know if am i doing something wrong or if it isn't the right way to do it. I've also writed a small plugin to test the signals and make window shake on nudge.. let me know if you want to test it. Thanks Filippo ---------------------------------------------------------------------- >Comment By: Richard Laager (rlaager) Date: 2007-03-03 10:33 Message: Logged In: YES user_id=156487 Originator: NO Sadrul, you make an interesting argument. I'm going to have to do some more thinking to come up with a good reply. ---------------------------------------------------------------------- Comment By: filippo_a (filippo_a) Date: 2007-03-03 04:44 Message: Logged In: YES user_id=1733309 Originator: YES ..and this is my sample plugin to make window shake like on official clients Instructions: - copy shake.c to gtk/plugins/ dir on patched source code - make shake.so - copy shake.so to ~/.gaim/plugins - the plugin looks for a nudge.wav on ~/.gaim/plugins so if you want it copy a test sound there.. File Added: shake.c ---------------------------------------------------------------------- Comment By: filippo_a (filippo_a) Date: 2007-03-03 04:37 Message: Logged In: YES user_id=1733309 Originator: YES I'm sorry, i forgot to attach the new patch :P File Added: gaim-bell-2.diff ---------------------------------------------------------------------- Comment By: filippo_a (filippo_a) Date: 2007-03-03 04:36 Message: Logged In: YES user_id=1733309 Originator: YES Hey, here's a new patch coming to better fit rlaager requests: - changed variable passed to signal handler from username to who - changed system messages' text - added yahoo buzz support. Here i've experienced a little problem: Yahoo seems to implement buzz just sending "<ding>" string to conversation. Since using gaim_conv_im_send to send this string caused a blank line to be printed before my system message i replaced it with serv_send_im.. I don't think this is the best solution.. Maybe a new GAIM_MESSAGE_INVISIBLE flag to tag a message to be just sent to server and not to be printed would do the work? Filippo ---------------------------------------------------------------------- Comment By: Sadrul Habib Chowdhury (sadrul) Date: 2007-03-03 03:56 Message: Logged In: YES user_id=1132702 Originator: NO I didn't follow the idea of bells in the core. Looking at how Yahoo deals with buzzes now (setting the GAIM_MESSAGE_NICK flag), I would've thought the same could be done for nudges. Apart from this use, the flag is currently used only when someone says your nick in a chat. I think we could rename the flag to GAIM_MESSAGE_REQUEST_ATTENTION or some such, set it for chats as it is now, and for ims for buzz/nudge etcs, and deal with it from the UI if/as it wants to. ---------------------------------------------------------------------- Comment By: Richard Laager (rlaager) Date: 2007-03-02 21:09 Message: Logged In: YES user_id=156487 Originator: NO At a quick look, I like this. Here are some things to look at: 1. I don't think you should be passing the username variable to the signal handler. This means the plugin could get an alias, which is suboptimal. Pass it the who variable instead. 2. "sent an attention request to %s!"... how about something more symetrical with the incoming message, like "You have requested %s's attention." or "You have requested the attention of %s."? I personally like the possessive, but given the crazy MSN "friendly names" that people use, the latter approach might be best. If you finish this off with Yahoo support, I think we can get this in, either for 2.0.0 or 2.1.0. ---------------------------------------------------------------------- Comment By: filippo_a (filippo_a) Date: 2007-03-02 15:38 Message: Logged In: YES user_id=1733309 Originator: YES Hey, I've written another patch to better follow what rlaager said and what i've discussed with etan on irc.. I've added gaim_conv_bell_send and _receive functions to the core, and a new prpl_info function pointer send_bell. gaim_conv_bell_receive simply prints a system message and emits a bell receive signal that can be catched on plugins. gaim_conv_bell_send just prints a system message. prpl->send_bell is intended for future use for example bell sending button or something else. I've just changed the msn protocol only, still have to make yahoo use my core api. I don't know if other protocols support sending attention requests. I've moved part of msn_cmd_nudge to msn_send_bell leaving the command function just to manage command return value. As i recall that's all. Please let me know if it is the right way to fit your requests! Thanks Filippo PS. as i said before i've written also a sample plugin to make the window shake (please don't hate me for this :P) if you want to try it let me know! File Added: gaim-bell.diff ---------------------------------------------------------------------- Comment By: filippo_a (filippo_a) Date: 2007-03-02 10:00 Message: Logged In: YES user_id=1733309 Originator: YES i didnt't catch you on im.. i don't know if i understood what you mean.. you want me to write the common function to replace msn_nudge and the equivalent of yahoo with a cross-protocol one? and emit my signal from there? i'm new to gaim development what do you mean when you say core? libgaim? isn't conversation.c the right place to register my signals? ---------------------------------------------------------------------- Comment By: Richard Laager (rlaager) Date: 2007-03-02 08:32 Message: Logged In: YES user_id=156487 Originator: NO The plan we've had for this is to add a concept of a "bell" (or similar) to the core. The protocols would call some common function to deal with the receipt of a nudge or buzz, and the core would sent the signal and print the message to the conversation window. If you're going to start adding signals for this, I'd like to see the core functionality taken care of at the same time. If you want to talk about this more, feel free to catch me online. Given that you've written patches for them, the following protocols will probably work best for you: Yahoo: rlaager or MSN: [EMAIL PROTECTED] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300235&aid=1672389&group_id=235 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Gaim-patches mailing list Gaim-patches@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gaim-patches