17 changed files with 205 additions and 173 deletions
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/perl
|
||||
# -----------------------------------------------------------------------------
|
||||
# Makefile.PL
|
||||
# Currently only works on UNIX-based machines. Downloads and installs the
|
||||
# latest Tk if necessary. Creates a Makefile that can be used to install
|
||||
# milkbone.
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# automatically install dependencies
|
||||
use ExtUtils::AutoInstall ( |
||||
-version => '0.40',
|
||||
-config => {
|
||||
-make_args => "XFT=1"
|
||||
},
|
||||
'GUI' => [
|
||||
'Tk' => '804.025'
|
||||
],
|
||||
'XMMS' => [
|
||||
'Xmms::Remote' => '',
|
||||
]
|
||||
);
|
||||
|
||||
open my $mk, ">Makefile"; |
||||
print $mk <<'END'; |
||||
END |
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
# ----------------------------------------------------------------------------- |
||||
# dots.pm |
||||
# Allows the user to use dots instead of ->'s in OO syntax. This is nothing |
||||
# more than a repackaging of the DotsForArrows source filter from |
||||
# Damian Conway's Filter::Simple module. |
||||
# ----------------------------------------------------------------------------- |
||||
|
||||
package dots; |
||||
|
||||
use Filter::Simple; |
||||
|
||||
FILTER { s/\.(?=[a-z_\$({[])/->/gi }; |
||||
|
||||
|
||||
1; |
@ -1,23 +0,0 @@
@@ -1,23 +0,0 @@
|
||||
DESCRIPTION="IM client written in Perl/Tk" |
||||
HOMEPAGE="http://www.milkbone.org" |
||||
IUSE="" |
||||
|
||||
DEPEND=">=dev-lang/perl-5.6* |
||||
>=dev-perl/perl-tk-800.02*" |
||||
|
||||
SLOT="0" |
||||
LICENSE="GPL-2" |
||||
KEYWORDS="~x86 ~ppc ~alpha ~sparc" |
||||
|
||||
MY_P="$(echo ${P}|sed 's/b$/beta/')" |
||||
SRC_URI="mirror://sourceforge/gaim/${P}.tar.gz" |
||||
S=${WORKDIR}/${MY_P} |
||||
|
||||
src_compile() { |
||||
true |
||||
|
||||
} |
||||
|
||||
src_install() { |
||||
einstall || die "Couldn't install |
||||
} |
@ -0,0 +1,70 @@
@@ -0,0 +1,70 @@
|
||||
# ----------------------------------------------------------------------------- |
||||
# Unit-Test.pl |
||||
# Tests out some hooks; should be run successfully before any commital |
||||
# ----------------------------------------------------------------------------- |
||||
|
||||
register_hook "protocol_signon", sub { |
||||
hook("after", -time => 10, -code => sub { hook("signed_in") }); |
||||
|
||||
register_hook "protocol_add_buddy", sub { hook("buddy_in", |
||||
-buddy => $ARGS{-buddy}, |
||||
-group => $ARGS{-group}); }; |
||||
|
||||
register_hook "protocol_get_groups", sub { return ["Buddies", "You"] }; |
||||
register_hook "protocol_get_realname", sub { return lc $ARGS{-user} }; |
||||
register_hook "protocol_request_info", sub { |
||||
hook("after", -time => 1000, -code => sub { |
||||
hook("protocol_info_received_$ARGS{-user}", |
||||
-profile => 'test', -away => 'test'); |
||||
}); |
||||
}; |
||||
|
||||
register_hook "protocol_send_im", sub { |
||||
hook("after", -time => 500, -code => [sub { |
||||
hook("msg_sent_$_[0]", |
||||
-user => $_[0], |
||||
-msg => $_[1], |
||||
-away => 0); |
||||
hook("after", -time => 500, sub { |
||||
hook("msg_in", -user => $_[0], |
||||
-msg => $_[1], -away => 0); |
||||
hook("msg_in_$_[0]", -user => $_[0], |
||||
-msg => $_[1], -away => 0); |
||||
}); |
||||
}, $ARGS{-dest}, $ARGS{-msg}]); |
||||
}; |
||||
register_hook "protocol_away_status", sub { 0 }; |
||||
|
||||
hook("after", -time => 1000, -code => sub { |
||||
hook("buddy_in", -group => 'Buddies', -buddy => 'test_user'); |
||||
}); |
||||
|
||||
# hook("after", -time => 1000, -code => sub { |
||||
# hook("msg_in", -user => 'thatguy', -msg => '<b>hey</b>'); |
||||
# }); |
||||
|
||||
# hook("after", -time => 1500, -code => sub { |
||||
# hook("protocol_send_im", -dest => 'thatguy', |
||||
# -msg => '<b>hey there</b>'); |
||||
|
||||
hook("after", -time => 500, -code => sub { |
||||
register_hook "protocol_chat_accept", sub { |
||||
hook("protocol_chat_joined", -name => 'erer', -user => 'er', |
||||
-url => 'ere'); |
||||
hook("protocol_chat_buddy_in_ere", -user => 'charles'); |
||||
}; |
||||
|
||||
hook("protocol_chat_invited", -user => 'thatguy', |
||||
-url => 'er'); |
||||
}); |
||||
register_hook "protocol_get_groups", sub { |
||||
return ["guys"]; |
||||
}; |
||||
|
||||
register_hook "signed_in", sub { |
||||
hook("buddy_in", -buddy => 'guy', -group => 'guys'); |
||||
}; |
||||
}; |
||||
|
||||
protocol_signon -user => 'test', -pass => 'test'; |
||||
data("me") = "lala"; |
@ -1,5 +1,31 @@
@@ -1,5 +1,31 @@
|
||||
<?xml version='1.0' encoding='UTF-8' ?> |
||||
<milkbone> |
||||
|
||||
<core> |
||||
<fatal_log>fatals.txt</fatal_log> |
||||
</core> |
||||
|
||||
<goodbye default="true">sorry gotta go</goodbye> |
||||
|
||||
<logging>heavy</logging> |
||||
|
||||
<item name="buddy-list"> |
||||
<showlogo>0</showlogo> |
||||
</item> |
||||
|
||||
<plugin name="Monitor"> |
||||
<recipient>savannah@batkins.com</recipient> |
||||
<server>mail.batkins.com</server> |
||||
|
||||
<username>yourname_here</username> |
||||
<password>yourpass_here</password> |
||||
</plugin> |
||||
|
||||
<plugin name="Win32-Tray"> |
||||
<active>0</active> |
||||
</plugin> |
||||
|
||||
<plugin name="Away-Manager"> |
||||
<timeout>500</timeout> |
||||
</plugin> |
||||
|
||||
</milkbone> |
@ -1,35 +0,0 @@
@@ -1,35 +0,0 @@
|
||||
# ----------------------------------------------------------------------------- |
||||
# tktest.pl |
||||
# Desc: Testing guidance script; loads and intializes the Tk interfacey |
||||
# ----------------------------------------------------------------------------- |
||||
|
||||
use Milkbone::Hooks qw(create_logon_prompt pre_mainloop mainloop |
||||
post_mainloop protocol_signon); |
||||
|
||||
Milkbone->init; |
||||
|
||||
load_plugin "Tk-GUI"; |
||||
|
||||
load_plugin "Tk-About"; |
||||
load_plugin "Tk-AddBuddy"; |
||||
load_plugin "Tk-BList"; |
||||
load_plugin "Tk-Convo"; |
||||
load_plugin "Tk-Chat"; |
||||
load_plugin "Tk-Conf"; |
||||
load_plugin "Tk-File"; |
||||
load_plugin "Tk-Logon"; |
||||
load_plugin "Tk-PluginsConf"; |
||||
load_plugin "Tk-Profile"; |
||||
|
||||
# begin unit testing code |
||||
|
||||
protocol_signon -user => 'test', -pass => 'test'; |
||||
data("me") = "lala"; |
||||
|
||||
# end unit testing code |
||||
|
||||
pre_mainloop; |
||||
mainloop; |
||||
post_mainloop; |
||||
|
||||
1; |
Loading…
Reference in new issue