Common Save Confirmation Dialogue

Hi all,

The inconsistency of the save changes confirmation has been mentioned
a few times recently on the lists:

At the moment, any application that asks the user to confirm that they
want to save or discard changes has to implement the dialogue box
themselves. This results in inconsistent dialogue boxes, and
duplicated code and effort. It would make more sense to have a stock
dialog box for such a common alert. My proposal is to add a
GtkSaveConfirmationAlert as originally mentioned by Murray C, in
December 2004.

The HIG recommends this as the layout for such an alert:

The most convenient API to provide to developers would be a single
function call that opens a modal save confirmation dialogue box, and
returns one of three values for the three outcomes. I have written a
quick function definition here (I have no access to a GNOME box to
write any real code this month).

typedef enum
} GtkSaveConfirmationType;

GtkSaveConfirmationType gtk_save_confirmation_alert (
    GtkWindow *parent,
    const gchar *document_name, /* The HIG recommends that the
document name be given in the dialogue box */
    const GTimeVal* last_save); /* The HIG recommends that the time
since the last save is given to the user */

The client application would call gtk_save_confirmation_alert, which
would open a modal dialogue box asking the user for confirmation. The
function would return one of the three options (discard changes, don't
close the application, save changes).

Does anyone have any objections to something like this being
incorporated into GTK, or a better way to do this?

Best Regards,

Marc O'Morain

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