On Sat, 2004-04-17 at 21:00, Carlos Garnacho wrote: > Hi all, > > I've developed a simple widget for doing HIG-style alert dialogs, it has > replaced all GtkMessageDialogs in the GNOME System Tools and a has a > quite simple API: > > GtkWidget* gst_hig_dialog_new (GtkWindow *parent, > GtkDialogFlags flags, > GstHigMessageType type, > const gchar *primary_text, > const gchar *secondary_text, > const gchar *first_button_text, > ...) G_GNUC_PRINTF (6, 7); Here (some months later) my thoughts on the issue... * I don't think a separate widget makes sense. If you had both, how would you explain to a developer when to use one or when to use another? I don't think there is a sensible explanation. And the difference between the two widgets is really small; basically, the only real difference is that the alert dialog has the "secondary text" * gtk_message_dialog_new() already has too many arguments. Therefore, I don't think sense to create a gtk_message_dialog_new_alert(). Rather we should add gtk_message_dialog_set_secondary_text() gtk_message_dialog_set_secondary_markup() That's marginally more verbose than adding more arguments to a single constructor, but also more readable. * the way I'd handle bolding of the main text, is that - If we aren't using markup for the main text and the secondary text should be should be displayed in bold - If we are using markup for the main text, we leave it unmodified. Two other possibilities are: - We should implicitly add a <b></b> around the main text in the case where the main text has markup. - We should have gtk_message_dialog_set_title_text() instead and use the current text as the main text. But that strikes me as making the code read backwards from the display and hence bad. * The separator can simply be turned off on GtkMessageDialog for all message dialogs. Regards, Owen
Attachment:
signature.asc
Description: This is a digitally signed message part