Mercurial > pidgin
annotate plugins/perl/scripts/gtk_frame_test.pl @ 12629:fee6a32644a4
[gaim-migrate @ 14965]
I read the commit messages a little too closely. But, hey, what better way than to start another Gaim hacking day than with a bunch of little changes.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Thu, 22 Dec 2005 19:39:23 +0000 |
parents | 4d9686e7c234 |
children |
rev | line source |
---|---|
11170 | 1 $MODULE_NAME = "GTK Frame Test"; |
2 | |
3 use Gaim; | |
4 | |
5 %PLUGIN_INFO = ( | |
6 perl_api_version => 2, | |
7 name => " Perl: $MODULE_NAME", | |
8 version => "0.1", | |
9 summary => "Test plugin for the Perl interpreter.", | |
10 description => "Implements a set of test proccedures to ensure all functions that work in the C API still work in the Perl plugin interface. As XSUBs are added, this *should* be updated to test the changes. Furthermore, this will function as the tutorial perl plugin.", | |
11457
4d9686e7c234
[gaim-migrate @ 13696]
Richard Laager <rlaager@wiktel.com>
parents:
11170
diff
changeset
|
11 author => "John H. Kelm <johnhkelm\@gmail.com>", |
11170 | 12 url => "http://gaim.sourceforge.net/", |
13 | |
14 GTK_UI => TRUE, | |
15 gtk_prefs_info => "foo", | |
16 load => "plugin_load", | |
17 unload => "plugin_unload", | |
18 ); | |
19 | |
20 | |
21 sub plugin_init { | |
22 return %PLUGIN_INFO; | |
23 } | |
24 | |
25 sub button_cb { | |
26 my $widget = shift; | |
27 my $data = shift; | |
28 print "Clicked button with message: " . $data . "\n"; | |
29 } | |
30 | |
31 sub foo { | |
32 eval ' | |
33 use Glib; | |
34 use Gtk2 \'-init\'; | |
35 | |
36 $frame = Gtk2::Frame->new(\'Gtk Test Frame\'); | |
37 $button = Gtk2::Button->new(\'Print Message\'); | |
38 | |
39 $frame->set_border_width(10); | |
40 $button->set_border_width(150); | |
41 $button->signal_connect("clicked" => \&button_cb, "Message Text"); | |
42 $frame->add($button); | |
43 | |
44 $button->show(); | |
45 $frame->show(); | |
46 '; | |
47 return $frame; | |
48 } | |
49 | |
50 sub plugin_load { | |
51 my $plugin = shift; | |
52 print "#" x 80 . "\n"; | |
53 | |
54 | |
55 ######### TEST CODE HERE ########## | |
56 | |
57 print "$MODULE_NAME: Loading...\n"; | |
58 | |
59 | |
60 Gaim::debug_info("plugin_load()", "Testing $MODULE_NAME Completed."); | |
61 print "#" x 80 . "\n\n"; | |
62 } | |
63 | |
64 sub plugin_unload { | |
65 | |
66 } |