[wx-dev] RFC: wxNotificationMessage

Vaclav Slavik vslavik at fastmail.fm
Sun Dec 2 09:21:02 PST 2007


Hi,

Vadim Zeitlin wrote:
> Unix. Hence I propose to add "wxOK" as possible value to flags (see
> the recently added wxNotificationMessage::SetFlags()) and only add
> the button and generate the message if it's specified.
>
>  What do you think?

I don't like it for three reasons:
 
1) It doesn't support more than one button and it can't be extended to 
support it later without changing this part of the API completely -- 
and having to keep supporting both wxOK flag and the new actions API.

2) It doesn't allow you to specify button's label for libnotify 
implementation, which makes it unusable in practice (descriptive 
actions buttons are the standard in libnotify apps).

3) wxOK is misused here, default action is not necessarily 
acknowledgment ("OK"). On the contrary, it's most often *not* that, 
it's some follow-up action (open the email, configure something that 
failed to work, install downloaded software updates, etc.). 

I think it would be much better to allow setting the actions as a list 
of commandID+label pairs, plus the ID of default action (which would 
be fired on Windows when the balloon is clicked). Possibly with a 
shorthand form for setting single button (which is admittedly one of 
the two common cases, together with no button at all).

Regards,
Vaclav

-- 
PGP key: 0x465264C9, available from http://pgp.mit.edu/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.wxwidgets.org/pipermail/wx-dev/attachments/20071202/ac71ae85/attachment.pgp


More information about the wx-dev mailing list