[Nautilus-list] Closing windows



on 11/1/01 11:02 AM, Havoc Pennington at hp redhat com wrote:

> The idea is really to have "all dialogs" have the same close shortcut
> - dialogs should be user-distinguishable, as they have different
> window manager decorations, and have buttons at the bottom, and so
> on. Ideally I'd like to follow the Mac in having only a very few
> "window types" which are clearly distinguishable and have defined
> behaviors.

Here's an example of the reason this call exists. We have a window, the
bookmarks window, with no menus that doesn't really have the "row of buttons
at the bottom". It's also not parented. We want to have the normal "close
the window" key close that window. But there's no menu in the window to
include that command and that key.

For windows where there's no real "close the window without answering",
which includes most dialogs, it makes sense to have Escape do Cancel or OK,
which will close the window. But that doesn't make Escape be a "close the
window" key, in my opinion, regardless of the implementation details.

The Nautilus bookmarks window doesn't have a Cancel or OK button.

So anyway, your check in the patch to outlaw the call that attaches a close
key to a GtkDialog is fine, I guess. I don't see any immediate problem,
aside from the fact that having a way to close all GtkDialogs still doesn't
help with the "same close window key for all windows" issue.

> Thinking out loud, if Ctrl+w should truly apply to _all_ windows, it
> should probably be in the window manager...

I agree.

A problem I see is that I both want the Close keyboard command to be in the
Window Manager and be visible in menus. A separate Window Manager menu is a
big part of what sucks about having a separate Window Manager. And of course
it's vital that this key requests that the window be closed. In the case of
a document window, that could just lead to a "Save/Don't Save" dialog rather
than a disappearing window.

If GtkDialogs didn't have close boxes in their window manager decoration,
then we wouldn't talk about keys to close them at all. You dismiss dialogs
by hitting the appropriate button or the accelerator for that button, so
there's no need to "close" a dialog. The idea that dialogs can be closed
just as other windows are closed never even comes up on other systems
because of the design; but some window managers raise that issue under X by
including a close control in the decoration even for dialogs.

    -- Darin





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