Before I dig into this, I bet someone has already investigated this and decided it can't be done. When you close the Squeak with the desktop manager's "Close Window" (the "X"), squeak closes without a confirmation dialog. Windows has an "Are you sure?" and I expect the Mac version does too. Why not Linux?
(I'm running XFCE, but KDE and Gnome do the same thing.)
brad
On Aug 27, 2007, at 16:38 , Brad Fuller wrote:
Before I dig into this, I bet someone has already investigated this and decided it can't be done. When you close the Squeak with the desktop manager's "Close Window" (the "X"), squeak closes without a confirmation dialog. Windows has an "Are you sure?" and I expect the Mac version does too. Why not Linux?
It would add considerably to the complexity of the X11 VM - Xlib does not provide a dialog box call, whereas Win and Mac libraries do.
You could try to write it using Xlib calls, which would involve laying out text, drawing a button, having another event loop etc. No fun, besides you would get complains that it does not follow the user's desktop theme or native language. Or you could make the VM depend on GTK or KDE which we have avoided so far.
- Bert -
On Mon August 27 2007, Bert Freudenberg wrote:
On Aug 27, 2007, at 16:38 , Brad Fuller wrote:
Before I dig into this, I bet someone has already investigated this and decided it can't be done. When you close the Squeak with the desktop manager's "Close Window" (the "X"), squeak closes without a confirmation dialog. Windows has an "Are you sure?" and I expect the Mac version does too. Why not Linux?
It would add considerably to the complexity of the X11 VM - Xlib does not provide a dialog box call, whereas Win and Mac libraries do.
You could try to write it using Xlib calls, which would involve laying out text, drawing a button, having another event loop etc. No fun, besides you would get complains that it does not follow the user's desktop theme or native language.
Maybe, but it's better than closing w/o saving for the user, wouldn't it?
Or you could make the VM depend on GTK or KDE which we have avoided so far.
what about "borrowing" firefox's confirmation dialog box on quit? It's reasonable looking, and the work is already done -- not that it would take me days to find it and then implement it ;-(
brad
On 8/28/07, Bert Freudenberg bert@freudenbergs.de wrote:
On Aug 27, 2007, at 16:38 , Brad Fuller wrote:
Before I dig into this, I bet someone has already investigated this and decided it can't be done. When you close the Squeak with the desktop manager's "Close Window" (the "X"), squeak closes without a confirmation dialog. Windows has an "Are you sure?" and I expect the Mac version does too. Why not Linux?
It would add considerably to the complexity of the X11 VM - Xlib does not provide a dialog box call, whereas Win and Mac libraries do.
Would it be possible to send an event/message back to the VM so that the image could pop up a Morphic-based dialog box?
Michael.
Michael van der Gulik schrieb:
Would it be possible to send an event/message back to the VM so that the image could pop up a Morphic-based dialog box?
That would be the best solution in my opinion. The image could then decide what to do (default would be some dialog, but some images might quietly store some state or write a snapshot and quit).
Cheers, Hans-Martin
On Mon August 27 2007, Michael van der Gulik wrote:
On 8/28/07, Bert Freudenberg bert@freudenbergs.de wrote:
On Aug 27, 2007, at 16:38 , Brad Fuller wrote:
Before I dig into this, I bet someone has already investigated this and decided it can't be done. When you close the Squeak with the desktop manager's "Close Window" (the "X"), squeak closes without a confirmation dialog. Windows has an "Are you sure?" and I expect the Mac version does too. Why not Linux?
It would add considerably to the complexity of the X11 VM - Xlib does not provide a dialog box call, whereas Win and Mac libraries do.
Would it be possible to send an event/message back to the VM so that the image could pop up a Morphic-based dialog box?
Yeah, that would be the best because the experience would be (potentially) more consistent across platforms. I've never written a Linux app, except Squeak plugin - so I would have to figure out how to do it. It just seems we should have a confirmation so a user doesn't accidentally hit the "X" when s/he meant to hit the "Maximize" icon.
In fact, I'm now thinking this should be labelled a defect. What do you think?
brad.
On Aug 28, 2007, at 8:43 AM, Brad Fuller wrote:
On Mon August 27 2007, Michael van der Gulik wrote:
On 8/28/07, Bert Freudenberg bert@freudenbergs.de wrote:
On Aug 27, 2007, at 16:38 , Brad Fuller wrote:
Before I dig into this, I bet someone has already investigated this and decided it can't be done. When you close the Squeak with the desktop manager's "Close Window" (the "X"), squeak closes without a confirmation dialog. Windows has an "Are you sure?" and I expect the Mac version does too. Why not Linux?
It would add considerably to the complexity of the X11 VM - Xlib does not provide a dialog box call, whereas Win and Mac libraries do.
Would it be possible to send an event/message back to the VM so that the image could pop up a Morphic-based dialog box?
Yeah, that would be the best because the experience would be (potentially) more consistent across platforms. I've never written a Linux app, except Squeak plugin - so I would have to figure out how to do it. It just seems we should have a confirmation so a user doesn't accidentally hit the "X" when s/he meant to hit the "Maximize" icon.
In fact, I'm now thinking this should be labelled a defect. What do you think?
I *think* this issue with this is that Squeak has no visibility into those Window Manager functions. I hope I'm incorrect, but the window close message will happen and Squeak won't know about it.
- Brian
On Tue August 28 2007, Brian Brown wrote:
On Aug 28, 2007, at 8:43 AM, Brad Fuller wrote:
On Mon August 27 2007, Michael van der Gulik wrote:
On 8/28/07, Bert Freudenberg bert@freudenbergs.de wrote:
On Aug 27, 2007, at 16:38 , Brad Fuller wrote:
Before I dig into this, I bet someone has already investigated this and decided it can't be done. When you close the Squeak with the desktop manager's "Close Window" (the "X"), squeak closes without a confirmation dialog. Windows has an "Are you sure?" and I expect the Mac version does too. Why not Linux?
It would add considerably to the complexity of the X11 VM - Xlib does not provide a dialog box call, whereas Win and Mac libraries do.
Would it be possible to send an event/message back to the VM so that the image could pop up a Morphic-based dialog box?
Yeah, that would be the best because the experience would be (potentially) more consistent across platforms. I've never written a Linux app, except Squeak plugin - so I would have to figure out how to do it. It just seems we should have a confirmation so a user doesn't accidentally hit the "X" when s/he meant to hit the "Maximize" icon.
In fact, I'm now thinking this should be labelled a defect. What do you think?
I *think* this issue with this is that Squeak has no visibility into those Window Manager functions. I hope I'm incorrect, but the window close message will happen and Squeak won't know about it.
There are plenty of apps in Linux that will present a confirmation dialog when the user clicks on the X icon. So, it can be done.
On 8/29/07, Brian Brown rbb@techgame.net wrote:
On Aug 28, 2007, at 8:43 AM, Brad Fuller wrote:
On Mon August 27 2007, Michael van der Gulik wrote:
On 8/28/07, Bert Freudenberg bert@freudenbergs.de wrote:
On Aug 27, 2007, at 16:38 , Brad Fuller wrote:
Before I dig into this, I bet someone has already investigated this and decided it can't be done. When you close the Squeak with the desktop manager's "Close Window" (the "X"), squeak closes without a confirmation dialog. Windows has an "Are you sure?" and I expect the Mac version does too. Why not Linux?
It would add considerably to the complexity of the X11 VM - Xlib does not provide a dialog box call, whereas Win and Mac libraries do.
Would it be possible to send an event/message back to the VM so that the image could pop up a Morphic-based dialog box?
Yeah, that would be the best because the experience would be (potentially) more consistent across platforms. I've never written a Linux app, except Squeak plugin - so I would have to figure out how to do it. It just seems we should have a confirmation so a user doesn't accidentally hit the "X" when s/he meant to hit the "Maximize" icon.
In fact, I'm now thinking this should be labelled a defect. What do you think?
If the user is likely to lose data, then yes.
I usually use Squeak full-screen, and IceWM asks me for confirmation anyway.
I *think* this issue with this is that Squeak has no visibility into those Window Manager functions. I hope I'm incorrect, but the window close message will happen and Squeak won't know about it.
It can be done... see here: http://www.tronche.com/gui/x/icccm/sec-4.html#s-4.2.8.1
Michael.
On 8/28/07, Bert Freudenberg bert@freudenbergs.de wrote:
It would add considerably to the complexity of the X11 VM - Xlib does not provide a dialog box call, whereas Win and Mac libraries do.
You could try to write it using Xlib calls, which would involve laying out text, drawing a button, having another event loop etc. No fun, besides you would get complains that it does not follow the user's desktop theme or native language. Or you could make the VM depend on GTK or KDE which we have avoided so far.
- Bert -
Couldn't you just use a dialog that already exists in Squeak? Like the one that pops up with you try to change a method that's been modified since you started editing?
squeak-dev@lists.squeakfoundation.org