On Wed, 29 May 2019 20:27:30 +0200, Mike Wey wrote:
On 29-05-2019 20:12, Alex X wrote:
On Wed, 29 May 2019 08:52:52 GMT, Ron Tarrant wrote:
You do know about the gtkDcoding blog, right? I'm in the middle of posting an entire series on Dialogs. Perhaps it'll help.
I don't have an issue using dialogs, I have many in my app and they all work, it's this one case where I use a popup window that shows a dialog and it doesn't work.
Also, the dialog itself is not even shown correctly the first time when shown within the onactivate.
Using
dialog.destroy() does nothing.
Try creating a popup window and have that open a dialog and see if that works(must open it multiple times).
Again, I have about 20 dialogs in my app and all of them work fine. It's only this one and only when I open it up a second time. It's as if something is getting corrupted by the popup aspect.
Does the same thing happen when you use
dialog.run()
instead ofshowAll
?
[SKIP TO------>HERE]
There is no run:
Error: no property run
for type gtk.Window.Window
(I'm using a window, trying with a real dialog)
Same problem. Shows up the first time but then corrupt the second(the window that pops up is smaller and just a gray rectangle with a square).
I feeling is that some how the popup handler is corrupting the window. I'm going to try to dispatch it... same issue.
dialog.run();
dialog.destroy();
dialog.run();
dialog.destroy();
dialog.run();
dialog.destroy();
does not work, unlike when I use a window and hide and show
For example, this works:
dialog.run();
dialog.showAll();
dialog.hide();
dialog.showAll();
dialog.hide();
dialog.showAll();
dialog.hide();
dialog.run();
dialog.run();
The showAll doesn't seem do do anything.
but running it 3 times requires me to close it 3 times... but it always shows up properly.
[------HERE]
What seems to be happening is something like this:
When closing out the window/dialog it destroys the window and it is not recovered(Remember, I'm using glade builder to generate the window).
If I do
dialog.run();
dialog.destroy();
dialog.run();
Then after the first close the window is screwed up on the next run
So it seems like the window is being destroyed and I'm trying to run a destroyed window/dialog.
I do not destroy it but only click on the x in upper right corner. So somewhere there is an implicit destroy in the code or something is trashing the window/dialog somehow.