Re: Bogus (?) GtkDialog/GtkMessageDialog separator handling



On Sun, 2004-10-10 at 19:46 +0200, Christian Neumair wrote:
> When browsing the GTK+ source code, I noted that GtkDialog contains a
> private data struct with a ignore_separator bool, plus a pseudo-private
> (protected in terms of java, through _gtk_dialog_set_ignore_separator)
> setter API for that variable.
> GtkMessageDialog sets ignore_separator to FALSE, calls the public
> GtkDialog set_separator API and re-sets ignore_separator to TRUE. I
> really don't see any point in doing so. Why should the public separator
> property of the dialog be ignored and instead be overridden by the
> message dialog property? Why does the message dialog class have the
> "use_separator" property, while the dialog parent class already has a
> "has_separator" property?

The ignore_separator flag is meant so that GtkMessageDialog can prevent
people setting the has_separator flag on GtkMessageDialog, even though
it's a subclass of GtkDialog.

It doesn't make sense to have different GtkMessageDialogs having
separators or not depending only on application programmer whim. The
reason that it was settable on GtkDialog was for adjusting to 
dialog content; but all message dialogs have the same content.

Does that make the code make more sense?

Regards,
					Owne

Attachment: signature.asc
Description: This is a digitally signed message part



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