Mercurial > pidgin.yaz
view plugins/test.pl @ 11914:2219f4bf4a57
[gaim-migrate @ 14205]
SF Patch #1342017 from sadrul
"This patch allows a user to change brush color during
the doodle-session.
This patch is mostly a rough one to get an idea whether
the approach is correct. To make things simple, I have
kept brush_size and brush_color in GaimGtkWhiteboard,
although it's there in doodle_session. It could be in
either place, although I would think it's best to be in
GaimGtkWhiteboard because any/most implementations of
doodle-ing would have these attributes. So keeping them
within the prpl may not be the best option?
Anyway, considering the brush-size and color stay at
the prpl for now, I have introduced two functions in
GaimWhiteboardPrplOps to get/set the size and color of
the brush from the prpl.
rekkanoryo (using Y! 7) and I (using gaim) have tested
this, and it seemed to work OK."
Plus, I cleaned up a whole bunch of code.
My apologies for this all being committed together, but it was a case of "Oh, this will be quick." that lead into hours of making intertwined changes.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 31 Oct 2005 02:19:51 +0000 |
parents | b1ea29d1293e |
children |
line wrap: on
line source
#!/usr/bin/perl -w use Gaim; %PLUGIN_INFO = ( perl_api_version => 2, name => 'Test Perl Plugin', version => '1.0', summary => 'Provides as a test base for the perl plugin.', description => 'Provides as a test base for the perl plugin.', author => 'Christian Hammond <chipx86@gnupdate.org>', url => 'http://gaim.sf.net/', load => "plugin_load", unload => "plugin_unload" ); sub account_away_cb { Gaim::debug_info("perl test plugin", "In account_away_cb\n"); my ($account, $state, $message, $data) = @_; Gaim::debug_info("perl test plugin", "Account " . $account->get_username() . " went away.\n"); Gaim::debug_info("perl test plugin", $data . "\n"); } sub plugin_init { return %PLUGIN_INFO; } sub plugin_load { Gaim::debug_info("perl test plugin", "plugin_load\n"); my $plugin = shift; Gaim::debug_info("perl test plugin", "Listing accounts.\n"); foreach $account (Gaim::accounts()) { Gaim::debug_info("perl test plugin", $account->get_username() . "\n"); } Gaim::debug_info("perl test plugin", "Listing buddy list.\n"); foreach $group (Gaim::BuddyList::groups()) { Gaim::debug_info("perl test plugin", $group->get_name() . ":\n"); foreach $buddy ($group->buddies()) { Gaim::debug_info("perl test plugin", " " . $buddy->get_name() . "\n"); } } Gaim::signal_connect(Gaim::Accounts::handle, "account-away", $plugin, \&account_away_cb, "test"); } sub plugin_unload { my $plugin = shift; }