Revision 148434f2c674bfb3937bfd7da3f9d34c43e3e89e
Andreas Monitzer
pidgin at monitzer.com
Mon Jun 25 15:43:26 EDT 2007
Hi,
Right now I committed a patch to add the server's ad-hoc commands as
action menu items, a screenshot is available at http://monitzer.com/
adium/2007/ServerAdHoc.png to show what that looks like (on Adium/
ejabberd). This way, you can use ad-hoc commands to configure the
server even without that discovery browser the pidgin developers
don't want to integrate.
Unfortunately, I had to make a small change to an internal structure
of the core, _PurplePluginAction. The actions menu items didn't have
a way to supply any user_data, which is required for this feature
(since I only have a single callback for all ad-hoc commands). In
functional languages and Java, this could be easily solved using an
anonymous class or a lambda expression, but it's impossible in C
(without falling back to assembler, which is kinda non-portable).
I hope you don't have a problem with that. Since the structure is
created an freed inside the core, this should not cause any troubles
for external plugins. It could cause troubles for applications,
though. For example, Adium seems to re-create the struct on demand,
so it has to take care to set the user_data pointer before calling
the action.
andy
More information about the Devel
mailing list