Re: embedded perl/Gtk dialog



On Fri, 2005-07-01 at 21:01 -0400, Carl Nygard wrote:
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.

Putzing around with it, I've got it working to my satisfaction --almost.
I need to figure out how to get Glade to stop cacheing the widgets.  For
example, if I run the script, then edit the glade file, then run the
script again, the second iteration doesn't see the changes I've made.

Anyone know how to turn off the caching in GladeXML?  If I suck in the
file as a buffer, then pass the buffer to GladeXML, will that defeat the
caching (ie. is the cache filename based?)

Reading the file myself and using GladeXML::new_from_buffer() doesn't
cache the widget per-se, I can see changes to the xml file when I re-run
the script.  But it still pops up under the main app, and
$window->present() does nothing to help.

Any clues?


Alternatively, a method to make the widget popup over the main app would
be good, and $window->present doesn't seem to work in this case.



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.

In any case, Iâm only making educated guesses, but what I know
for sure is that you need a better understanding of how Glade
manages its widgets. I could tell you more if I had ever used it
myself, but so far thatâs not been the case.

Regards,

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




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