Displaying a popup before the main window


As my program needs a few seconds to start, I would like to display a popup to tell the user that it's working. Looks pretty simple, but for some reason the popup shows up empty, and I can't figure out what I've done wrong.

I would be grateful for any clue, here's a short example which shows the problem.

#!/usr/bin/perl -w

use strict;
use Gtk2 -init;

my $window = Gtk2::Window->new;
$window->set_title ("My window");

my $popup = Gtk2::MessageDialog->new ($window, 'destroy-with-parent', 'info', 'none', "Please wait for 10 seconds...");
sleep 10;

my $label = Gtk2::Label->new ("Hello, world!");
$window->add ($label);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]