Re: embedded perl/Gtk dialog

On Fri, 2005-07-01 at 10:21 +0200, A. Pagaltzis wrote:
* Carl Nygard <cjnygard verizon net> [2005-07-01 05:25]:
a) the first time I run the dialog, it pops up over my app.
The second and subsequent times, it stays under the app

b) When I hit the cancel button, the dialog stays open.

Those two are obviously related, no? The first time you run it,
it is instantiated and pops up. So far so good, but then it is
never actually destroyed, as far as I understand Glade, only
hidden (and I seem to remember that Glade instantiates widgets
only once, if you destroy them afterwards, they are gone).
Apparently it remembers where it was when it is unhidden, just
like it was there all the time, but invisible.

Well, I'm destroy()'ing it directly myself, regardless of what glade may
or may not be doing.  

I had a few more thoughts this morning after a good sleep.  The widget
is a dialog, and I had seen some wierd behavior when setting the
'Center' or 'Center on Parent' behavior, which gave me and idea.
Perhaps the dialog doesn't have a proper parent, so uses RootWindow or
some such.  First time through it can pop to the top, but once I use my
app again, it's brought to the top.  If I run the script again, which
reloads the glade widgets, whatever it's choosing as the dialog parent
is no longer 'on top' so neither is the dialog.  


Iâm not sure how to make it pop over the app window â thereâs
possibly a method to make it go to the front, though. And Iâd say
the solution to your cancel problem is to not destroy the popup,
only hide it.

I looked for a 'raise' type function, couldn't find anything related.
Anyone know how to bring a window to the front?


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