Re: About dialog API



On Wed, 2003-04-09 at 18:59, Havoc Pennington wrote:
> On Wed, Apr 09, 2003 at 05:04:17PM -0400, Owen Taylor wrote:
> > void       gtk_about_dialog_set_name (GtkAboutDialog *dialog,
> >                                       const gchar    *credits);
> > void       gtk_about_dialog_set_version (GtkAboutDialog dialog,
> >                                          const gchar   *version);
> 
> As an aside, I think these setters are probably bloat - nobody is
> going to change the stuff after creating the dialog, so why not just
> go with properties. Especially if the convenience function already
> requires use of properties.
> 
> Almost everyone's just going to use the convenience function anyway.

I had the same thought. My main nervousness is that GTK+ now 
consistently follows the rule that all properties have 
accompanying setters and getters, and if we start deviating
from that, there is no real principle to go by to decide
when to do what.

Except GtkTextTag and GtkCellRenderer which don't have setters
and getters at all. But they clearly a little different from
widgets.

> >  gtk_about_dialog_show (parent, 
> >                         "name", PACKAGE,
> >                         "version", VERSION,
> >                         [..]);
> 
> Yeah, I'd have to vote for that too I guess. The only real downside 
> is that people might not set all the fields they really should, but 
> it's not such a big deal if they don't. 

I don't think it's different from having 9 string arguments in a
row where some fraction can be NULL and some fraction have to
be provided. Either way, if we have mandatory arguments, we should
provide a clear warning if they aren't provided.

Regards,
                                         Owen





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