Re: HIG API for GtkMessageDialog, take 3



On Mon, 2004-08-23 at 10:40, Carlos Garnacho wrote:
> Hi all,
> 
> Sorry very much for the delay, I finally renamed the _set_title_text()
> and _set_title_markup() to:
> 
> void       gtk_message_dialog_set_primary_text (GtkMessageDialog *message_dialog,
>                                                 const gchar      *message_format,
>                                                 ...) G_GNUC_PRINTF (2, 3);
> 
> void       gtk_message_dialog_set_primary_markup (GtkMessageDialog *message_dialog,
>                                                   const gchar      *message_format,
>                                                   ...) G_GNUC_PRINTF (2, 3);
> 
> 
> To keep the backwards API compatibility, the secondary text is simply
> called "text". As usual you can find the changes here:
> 
> 
> http://www.gnome.org/~carlosg/stuff/gtkmessagedialog/
> 
> Hope you like it :)

Thanks for your continued efforts. Owen and I discussed the HIG dialog
API again last week. Here are some highlights from that discussion

- Owen dislikes the _with_buttons () constructor, since   
  GtkMessageDialog already has varargs constructors which 
  use varargs differently, which could be confusing. 
  Multi-varargs functions are technically possible, but we 
  do not want to go there.

- set_primary_text() and set_primary_markup() are not really setters,
  since they format the text, thus we'd prefer a different name,
  e.g s/set/format/

- using printf() style formatting for the primary text seems to be
  fairly common, thus it would be good to have it available in the
  constructor.

- feature-wise, the only missing piece in GtkMessageDialog is the
  secondary text.

To come to a conclusion wrt to a good HIG message dialog api, I have
created a little comparison table showing how some representative use
cases look in different APIs:
http://people.redhat.com/mclasen/higdialog/comparison.html

Matthias




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