From: morty Date: Thu, 8 Jul 2010 07:08:01 +0000 (+0200) Subject: Fixe problem when calling from different path X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/snom-frontend/commitdiff_plain/b4c10db9bc70e920a92cff57002c06cfa4d2daa2?hp=9307ec52aff2dbbd2fd1feb1a4b46ab53a376ce7 Fixe problem when calling from different path --- diff --git a/snom.pl b/snom.pl index 34d61a2..93b1eee 100755 --- a/snom.pl +++ b/snom.pl @@ -11,6 +11,8 @@ use Glib qw/TRUE FALSE/; use Gtk2 '-init'; use Gtk2::Gdk::Keysyms; use LWP::UserAgent; +use FindBin qw($Bin); + my %g_key = (); my %g_arrows; @@ -234,21 +236,21 @@ sub activate_icon_cb { } } -my $status_icon = Gtk2::StatusIcon->new_from_file('snom.ico'); +my $status_icon = Gtk2::StatusIcon->new_from_file($Bin.'/snom.ico'); my $menu = Gtk2::Menu->new(); my $menuItem = Gtk2::ImageMenuItem->new_from_stock('gtk-quit'); $menuItem->signal_connect('activate', \&quit_cb, $status_icon); $menu->append($menuItem); -$status_icon->set_tooltip(" Snom Tray "); +$status_icon->set_tooltip('Snom Tray'); $status_icon->signal_connect('activate', \&activate_icon_cb); $status_icon->signal_connect('popup-menu', \&popup_menu_cb, $menu); $status_icon->set_visible(1); ########################################################################333 $window->add($mainbox); -$window->set_icon_from_file('snom.ico'); +$window->set_icon_from_file($Bin.'/snom.ico'); $window->show(); $g_key{OK}->grab_focus();