in reply to Windows/Linux System Tray and tk
Well just for your information, Gtk2 has the ability
I'm not really a human, but I play one on earth. Cogito ergo sum a bum
See Wooty for a little more pizazz.#!/usr/bin/perl use warnings; use strict; use Gtk2::TrayIcon; Gtk2->init; my $icon= Gtk2::TrayIcon->new("test"); $icon->add( Gtk2::Label->new("test") ); $icon->show_all; Gtk2->main;
Now Gtk2 and Tk mainloops can be made to work together, so that may give you an option. Basically, you make a Tk timer to update the Gtk2 loop every 10 millisecs. You can do the reverse too .... let a Gtk2 timer do a $mw->update every so often.
#!/usr/bin/perl -w use strict; use Gtk2; use Tk; my $mw = MainWindow->new(-title=>'Tk Window'); Gtk2->init; my $window = Gtk2::Window->new('toplevel'); $window->set_title('Gtk2 Window'); my $glabel = Gtk2::Label->new("This is a Gtk2 Label"); $window->add($glabel); $window->show_all; my $tktimer = $mw->repeat(10, sub{ Gtk2->main_iteration while Gtk2->events_pending; }); $mw->Button(-text=>' Quit ', -command => sub{exit} )->pack(); MainLoop;
I'm not really a human, but I play one on earth. Cogito ergo sum a bum
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Windows/Linux System Tray and tk
by deadpickle (Pilgrim) on Jul 15, 2007 at 20:12 UTC | |
by zentara (Archbishop) on Jul 15, 2007 at 22:20 UTC | |
by deadpickle (Pilgrim) on Jul 16, 2007 at 02:29 UTC |
In Section
Seekers of Perl Wisdom