Re: About dialog API



On Thu, Apr 10, 2003 at 10:22:35AM +0100, martyn 2 russell bt com 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.
> 
> I agree with this.  Personally, I see would go with either of these methods:
> 
> 	* method 1
> 	gtk_about_dialog_new(parent, 
> 				   GTK_ABOUT_NAME, "myname",
> 				   GTK_ABOUT_VERSION, "version",
> 				   ...
> 				   -1);
> 	* method 2
> 	gtk_about_dialog_new(parent,
> 				   "name",
> 				   "version",
> 				   ...);
> 
> In my applications at the moment, I use the second of the two methods for my
> about box (to set everything in one call).
> 
> The reason I like the first method is that there are some properties which
> will not apply to some developers.  Say for example, the "comments" property
> is not used, you would not want to hide that widget on the about box.
> 
> Also, I have thought of a few properties not yet mentioned.  I use GTK to
> write commercial applications, and the things that are important on the
> about box, are:
> 	 
> 	* license name
> 	* license / serial number
> 	* company  
> 	* company logo

I'd add the 'expires on' and 'build number' properties too to this list - they
are useful in commercial applications mostly.
-- 
 Best regards,
  -Vlad



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