Archive for 12月 1st, 2007

画了1天的房子 星期六, 12月 1st, 2007

sweethome3d画的,还是没画下去。虽然操作简单。

screenshot-2007-12-01-21-50-54.png

Gtk2::Sexy::Tooltip用于个人提示脚本 星期六, 12月 1st, 2007

☎ perl test-tooltip.pl “正在下载 <span size=\”large\” color=\”red\” weight=\”bold\”>sdkj.avi </span>”

改成支持html提示的写法。延时5秒退出。可怜,perl的,竟然没人帮忙。都自己瞎搞。

screenshot-2007-12-01-18-03-06.png

use strict;
use warnings;
use Glib qw(TRUE FALSE);
use Gtk2 -init;
use Gtk2::Sexy;
use encoding ‘utf8′;
my $tooltip = Gtk2::Sexy::Tooltip->new;
my $hbox = Gtk2::HBox->new(FALSE, 5);
$hbox->show;
$tooltip->add($hbox);
my $image = Gtk2::Image->new_from_stock(’gtk-dialog-authentication’, ‘dialog’);
#my $image = Gtk2::Image->new_from_file(’/home/exp/dd.png’); #如果使用本地文件。就这样调用。
$image->show;
$hbox->pack_start_defaults($image);
my $label = Gtk2::Label->new;
$label->set_markup( $ARGV[0] );
$label->show;
$hbox->pack_start_defaults($label);
$tooltip->show;
eval {
alarm(5);
Gtk2->main;
alarm(0);
}

瞎搞cpan 星期六, 12月 1st, 2007

第一次用这个。没怎么看。闭着眼睛乱测试。看提示少了什么,就复制到cpan后面。改那目录的/为::。

sudo cpan ExtUtils::Depends

sudo cpan ExtUtils::PkgConfig

ai libsexy-dev

sudo cpan Gtk2::Sexy

这个sexy,竟然要c的库。

perl test-tooltip.pl 测试了下。

screenshot-2007-12-01-02-33-36.png