Mercurial > pidgin
comparison plugins/perl/perl-handlers.c @ 12872:59ff3e1c874e
[gaim-migrate @ 15224]
Perl plugins can now each have their own plugin pref frame. Plugin actions are
still limited to one per plugin I'll deal with that a bit later.
committer: Tailor Script <tailor@pidgin.im>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Sat, 14 Jan 2006 08:28:05 +0000 |
parents | 2422097a7a5e |
children | e65a7a7eabaf |
comparison
equal
deleted
inserted
replaced
12871:2422097a7a5e | 12872:59ff3e1c874e |
---|---|
128 GaimPluginPrefFrame * | 128 GaimPluginPrefFrame * |
129 gaim_perl_get_plugin_frame(GaimPlugin *plugin) | 129 gaim_perl_get_plugin_frame(GaimPlugin *plugin) |
130 { | 130 { |
131 /* Sets up the Perl Stack for our call back into the script to run the | 131 /* Sets up the Perl Stack for our call back into the script to run the |
132 * plugin_pref... sub */ | 132 * plugin_pref... sub */ |
133 int count; | |
134 GaimPerlScript *gps; | |
133 GaimPluginPrefFrame *ret_frame; | 135 GaimPluginPrefFrame *ret_frame; |
134 int count; | |
135 dSP; | 136 dSP; |
137 | |
138 gps = (GaimPerlScript *)plugin->info->extra_info; | |
136 | 139 |
137 ENTER; | 140 ENTER; |
138 SAVETMPS; | 141 SAVETMPS; |
139 /* Some perl magic to run perl_plugin_pref_frame_SV perl sub and | 142 /* Some perl magic to run perl_plugin_pref_frame_SV perl sub and |
140 * return the frame */ | 143 * return the frame */ |
141 PUSHMARK(SP); | 144 PUSHMARK(SP); |
142 PUTBACK; | 145 PUTBACK; |
143 | 146 |
144 count = call_pv(perl_plugin_pref_cb, G_SCALAR | G_NOARGS); | 147 count = call_pv(gps->prefs_sub, G_SCALAR | G_NOARGS); |
145 | 148 |
146 SPAGAIN; | 149 SPAGAIN; |
147 | 150 |
148 if (count != 1) | 151 if (count != 1) |
149 croak("call_pv: Did not return the correct number of values.\n"); | 152 croak("call_pv: Did not return the correct number of values.\n"); |