Re: HIG Dialog widget proposal



> GtkWidget *dialog = whatever_message_dialog (window,
>                                              GTK_DIALOG_MODAL,
>                                              GTK_MESSAGE_WARNING,
>                                              "Delete filesystem?",                   /* primary text */
>                                              "You will not be able to recover data", /* secondary text */
>                                              GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
>                                              "Delete it!", GTK_RESPONSE_OK,
>                                              NULL);
> 
> I really think that we should have a constructor like this, for not
> needing to do gtk_message_dialog_new(),
> gtk_message_dialog_set_secondary_text() remove the buttons and
> gtk_add_buttons() every time anyone wants to create a HIG-like dialog

That makes sense to me. A one-stop constructor for the common
cases is very convenient.

> void       gst_hig_dialog_set_primary_text (GstHigDialog *dialog,
>                                             const gchar  *message_format,
>                                             ...) G_GNUC_PRINTF (2, 3);
> 
> void       gst_hig_dialog_set_secondary_text (GstHigDialog *dialog,
>                                               const gchar  *message_format,
>                                               ...) G_GNUC_PRINTF (2, 3);

This too. We will need set_{primary,secondary}_markup as well.

Matthias





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