Fwd: [Glade-users] Using Gtk2::GladeXML -- "reusing" popups



Christopher...

Thanks for the reply.

There are basically two approaches:

1. Load the dialog with glade_xml_new every time you need it

I'm sorry...I've been using Glade for about a week, and I just don't
know how to load the dialog each time.  Here is the XML line:

<widget class="GtkDialog" id="edit_dialog">

This is the method I've used thus far to get widgets:

my $edit_dialog = $xml->get_widget('edit_dialog');

The documentation mentions this method:
$gladexml = Gtk2::GladeXML->new(GLADE_FILE, [ROOT, DOMAIN])

I just don't know how to get it from the XML each time.

2. Hide the window instead of destroying it when you don't need it

I had this same idea, but again, I don't know how to do it.  I tried
using the "close" signal, and hiding on that, but it didn't seem to
matter.  I even put in a print statement to show me that it was going
into that block of code.  I tried hiding, but I don't know how to stop
it from destroying.

Thanks for the help.  This is a lot of fun for me but at the same time
I've been all over the Internet looking for
documentation/examples/support.

Dale




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