[gtkmm] Suggestion: Alert dialogue boxes.



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello again,

The GNOME Human Interface Guidelines, Chapter 3 has a section about
"Alerts" (dialogue boxes).  These are similar to a Gtk::MessageDialog,
but have the alert text divided into two sections: "primary text" in
large, bold text and "secondary text" in the normal font.  The primary
text is the basic message, stating the situation in simple terms, with
the secondary text providing further detail.

I couldn't get the basic Gtk::MessageDialog to do this (you can't use
Pango markup, or get at the label widget), so I've written a new
AlertDialog class to do just this.  It provides methods for setting
both the primary and secondary text, and adds the appropriate Pango
markup.  In all other respects, it's the same as the MessageDialog in
terms of its interface.

I've also created an ErrorDialog which derives from MessageDialog.
This adds a "Show Details >>" button to the left-hand side of the
action area, which displays a TextView containing diagnostic
information when clicked (similar to the "Unhandled Exception"
dialogue in MS Windows).  This could probably be improved slightly.


I've attached the source for both classes, in the hope that they are
useful.  Since they are very generic and useful in many situations, I
thought perhaps they (or at least the ideas behind them) could be
added to a future release of Gtkmm.  You are welcome to license them
under the LGPL, and I'm willing to reassign copyright if needed.


Regards,
Roger

- -- 
Roger Leigh

                Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
                GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQE/dbacVcFcaSW/uEgRAsCqAKCr+umvLL76WaVG1r0cWTC+OJDcewCcCtUB
A/mV6gBsc+tFu/SVdfyZtCs=
=H7eR
-----END PGP SIGNATURE-----

Attachment: alertdialog.h.bz2
Description: AlertDialog header

Attachment: alertdialog.cc.bz2
Description: AlertDialog implementation

Attachment: errordialog.h.bz2
Description: ErrorDialog header

Attachment: errordialog.cc.bz2
Description: ErrorDialog implementation



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