[KLUG Members] Alert Annoyance

Marr marr at flex.com
Tue Jul 20 02:25:48 EDT 2004


On Monday 19 July 2004 10:53am, Adam Tauno WIlliams wrote:
> The GNOME HIG 1.0 states -
>
> http://developer.gnome.org/projects/gup/hig/1.0/windows.html#alert-windows
>
> "An alert provides information about the state of the application
> system, or asks for essential information about how to proceed with a
> particular task. It is distinct from other types of window in that it is
> not directly requested by the user, and usually contains a message or a
> question rather than editable controls. Since alerts are an unwelcome
> intrusion into the user's work, do not use them except where necessary
> to avoid potential data loss or other serious problems."
>
> If this is a GNOME application, and you feel the pop-up doesn't indicate
> a "potential data loss or other serious problems" you should e-mail the
> author/maintainer of the application.
>
> Current GNOME desktops provide a notification area/applett for just this
> purpose, as described in the GNOME HIG (current draft) -
>
> "The GNOME desktop features a status notification area that the user can
> add to any panel on their desktop. This area is reserved for notifying
> the user of non-critical, application-related events (for example,
> arrival of new email, or a chat 'buddy' having logged on), and for
> monitoring the status of system tasks (for example, network or printer
> activity, or laptop battery charging)."
>
> http://developer.gnome.org/projects/gup/hig/draft_hig_new/desktop-notificat
>ion-area.html
>
> Many apps don't use the notification subsystem - but this is the correct
> solution to your problem.

I've been intrigued by all this discussion because I've got an old 'remind-me' 
type program that pops up a very simple dialog (some textual reminders and an 
'OK' pushbutton to close the dialog) via a 'cron' job several times a day, so 
it often pops up in the middle of my typing something in another application.

However, I've never inadvertently closed the popup dialog because, thankfully, 
the keyboard focus is never on the 'OK' pushbutton widget until I make it 
that way (e.g. via the 'Tab' key or the arrow keys).

This application is ancient (originally written by me for Windows, but long 
since modified so that it can be compiled under Linux as well, using the Gtk 
toolkit).

I initially thought that the label widget was somehow left with the keyboard 
focus (although veteran GUI designers will realize how non-sensical that 
sounds) rather than the 'OK' pushbutton.

I decided to strip it down to the bare essentials (see attached), making it 
compile only under Linux/Gtk, and do some testing.

No matter what order I added the widgets to the dialog, the focus was never on 
the 'OK' pushbutton. I'm not sure if this is somehow handled by Gtk or if 
it's just "luck of the draw".

Either way, it works the way I'd prefer since it's harder (but not impossible) 
to accidentally close the popup while typing in some other application. You'd 
have to accidentally hit a focus-changing key ('Tab' or one of the arrow 
keys) then hit 'Enter' before you realized the popup was there.

Aside: It's been a while since I wrote anything new using the Motif toolkit, 
but I think the 'OK' pushbutton would have focus by default in Motif.

Attached is the code for the simplified Gtk popup application, with compile 
instructions within the header.  Give it a try and see what I mean.

Not a solution to the overall problem but (hopefully) an interesting 
observation.  :^)

Bill Marr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simple-popup-focus-test.c
Type: text/x-csrc
Size: 2131 bytes
Desc: not available
Url : http://www.kalamazoolinux.org/pipermail/members/attachments/20040720/3c088762/simple-popup-focus-test.bin


More information about the Members mailing list