[poe-commits] poe/POE/Loop Gtk.pm,1.38,1.39
Brought to you by:
rcaputo
From: <su...@us...> - 2003-11-22 04:54:35
|
Update of /cvsroot/poe/poe/POE/Loop In directory sc8-pr-cvs1:/tmp/cvs-serv22688/POE/Loop Modified Files: Gtk.pm Log Message: add gtk initialization error checking. fix gtk test suite to skip the whole suite if gtk initialization fails. Index: Gtk.pm =================================================================== RCS file: /cvsroot/poe/poe/POE/Loop/Gtk.pm,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** Gtk.pm 21 Nov 2003 05:08:26 -0000 1.38 --- Gtk.pm 22 Nov 2003 04:54:31 -0000 1.39 *************** *** 41,45 **** # Must Gnome->init() yourselves, as it takes parameters. unless (exists $INC{'Gnome.pm'}) { ! Gtk->init(); } } --- 41,50 ---- # Must Gnome->init() yourselves, as it takes parameters. unless (exists $INC{'Gnome.pm'}) { ! my $res = Gtk->init_check(); ! if(defined $res) { ! Gtk->init(); ! } else { ! POE::Kernel::_die "Gtk initialization failed. Chances are it couldn't connect to a display. Of course, Gtk doesn't put its error message anywhere I can find so we can't be more specific here."; ! } } } |