my @ver = split (/\./, $fver[3]);
$res .= "$ver[0].";
$res .= "$ver[1].";
- if ($ver[2] =~ /(\d+)cvs(\d+)/) {
+ if ($ver[2] =~ /(\d+)git(\d+)/) {
$res .= "$1.$2";
}
else {
return $hbox;
}
+sub get_app_icons {
+ my $dir = $DATADIR . '/icons/hicolor';
+ my @names = map {
+ join ('/', ($dir, , $_ . 'x' . $_, 'apps', $NAME . '.png'))
+ } (64, 128);
+ my @icons = ();
+ foreach (@names) {
+ my $icon = undef;
+ $icon = Gtk2::Gdk::Pixbuf->new_from_file($_) if (-f $_);
+ push @icons, $icon if ($icon);
+ }
+ return @icons;
+}
+
# initialise
exit unless parse_command_line ();
Gtk2->init;
$box->pack_end (new_button_box ($main_window, $about), FALSE, FALSE, 0);
$main_window->signal_connect (delete_event => sub { Gtk2->main_quit });
$main_window->set_title ($xl::s{win_title});
+$main_window->set_icon_list (get_app_icons ());
$main_window->add ($box);
$main_window->show_all;
Gtk2->main;