Re: using popup dialog boxes with perl gladexml



Let me answer my own question, in the hope that someone else may benefit :)

I was not specifying the specific node to retrieve when calling GladeXML->new
ie,
my $gladexml = Gtk2::GladeXML->new('myglade.glade');
my $login = $gladexml->get_widget('mydialog');
$login->show();
$login->run();
so subsequently, it displayed both my dialog and window.

Getting the specific node enabled me to just get the dialog box:

my $gladexml = Gtk2::GladeXML->new('myglade.glade','mydialog');
my $login = $gladexml->get_widget('mydialog');
$login->show();
$login->run();
#verify login
...
$login->destroy();

# now get the main window
$gladexml = Gtk2::GladeXML->new('myglade.glade','window1');
...
Gtk2->main


James Curbo wrote:

B McAndrews wrote:

I've added a dialog box in my glade project so that I can pop it up at program startup to get user info, (ie, login,passwd). After I authenticate the user, then I want to pop up the main application window. However, when I start up the perl script, get the dialog widget, call set_modal with TRUES, and call run() on it, I expected to just see the popup dialog. Yet I got both the dialog box and the main app window. Can anyone shed some light with what's going on here?

Thanks


Have you tried setting the main window's Visibility setting to 'no' in the Properties sheet in Glade?

James
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list



--
Brian McAndrews
Archelon
bmcandrews efs-us com
312.788.6309





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