libgaim/plugins/perl/scripts/plugin_action.pl

Tue, 29 Aug 2006 02:22:08 +0000

author
Hil <allhilbert@users.sourceforge.net>
date
Tue, 29 Aug 2006 02:22:08 +0000
changeset 14432
3710852cdab5
parent 14254
77edc7a6191a
child 20470
77693555855f
permissions
-rw-r--r--

[gaim-migrate @ 17076]
SF Patch #1547720 from Hilbert
Fixes SF Bug #1541097

If you search, leave the Find dialog open, switch tabs, and search again, the search happens in the original tab. This patch fixes that bug. Now when you search, it searches in the active conversation window.

committer: Richard Laager <rlaager@pidgin.im>

$MODULE_NAME = "Plugin Action Test Plugin";
use Gaim;

sub plugin_init {
	return %PLUGIN_INFO;
}

sub plugin_load {
	my $plugin = shift;
}

sub plugin_unload {
	my $plugin = shift;
}

sub fun1 {
	print "1\n";
}

sub fun2 {
	print "2\n";
}

sub fun3 {
	print "3\n";
}

%plugin_actions = (
	"Action 1" => \&fun1,
	"Action 2" => \&fun2,
	"Action 3" => \&fun3
#	"Action 1" => sub { print "1\n"; },
#	"Action 2" => sub { print "2\n"; },
#	"Action 3" => sub { print "3\n"; }
);

sub plugin_action_names {
	foreach $key (keys %plugin_actions) {
		push @array, $key;
	}

	return @array;
}

# All the information Gaim gets about our nifty plugin
%PLUGIN_INFO = (
	perl_api_version => 2,
	name => "Perl: $MODULE_NAME",
	version => "0.1",
	summary => "Test plugin for the Perl interpreter.",
	description => "Just a basic test plugin template.",
	author => "Etan Reisner <deryni\@gmail.com>",
	url => "http://sourceforge.net/users/deryni9/",

	load => "plugin_load",
	unload => "plugin_unload",
	plugin_action_sub => "plugin_action_names"
);

mercurial