Current implementation of HIG compliant alerts in Nautilus is sub
optimal. There are several UI and code issues, such as:
* GtkMessageDialog API is not used
* primary and secondary labels don't fully respect HIG [1]
* question alerts are deprecated [2]
* alerts provide a window title
* some alerts provide an expander to show secondary label [3]
I like to see in Nautilus 1) GtkMessageDialog based- and 2) HIG
compliant- alerts
Point number one, as per Alex request, should be solved in eel. Here is
my proposal, a replacement for functions provided by eel-stock-dialogs.h
and eel-alert-dialog.h: eel-message-dialogs.h
The purpose of those 6 functions is to provide HIG compliant alerts
based on GtkMessageDialog widget in the most simple and KISS way. If a
developer needs more control, then he should use GtkMessageDialog API
directly.
Moreover those functions depend only on GTK+, so it will be trivial for
other projects cut&paste in their source trees. As well as include them
directly in GTK+ or in another Development Platform module.
Of course there are still some issues. First of all there are some FIXME
here and there in eel-message-dialogs.c to solve, and of course code
cleanup and enhancement. Secondary, maybe we need a replacement for
eel_run_simple_dialog function in eel-stock-dialogs.h: this function is
used about 15 times in nautilus code.
Unfortunately I don't know I'll have the time, at least just in time for
2.11|12 code/UI/string freeze :-( Anyone interested?
---- Notes -------------------------------------------------------------
[1] i.e. the primary label "Are you sure you want to permanently delete
\"%s\" from the trash?" should be something like "Really delete
\"FILENAME" from trash?". As well as some secondary labels should be
more descriptive, just like: "If you choose to delete this file from
trash, it will be permanently lost. Be careful before delete ."
[2] HIG suggest to use the WARNING icon, not the QUESTION.
[3] i.e. the one alerting you about no media in the CD tray. BTW please
note that the "same" alert is provided by the gnome-vfs backend to
FileChooser, but it's more HIG compliant
Attachment:
eel-message-dialogs.h
Description: Binary data
Attachment:
eel-message-dialogs.c
Description: Binary data