Re: window sizing patch
- From: Tim Janik <timj gtk org>
- To: Havoc Pennington <hp redhat com>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: window sizing patch
- Date: Fri, 10 Aug 2001 12:07:29 +0200 (CEST)
On 9 Aug 2001, Havoc Pennington wrote:
>
> Tim Janik <timj gtk org> writes:
> > ok, i think i went through all of the relevant portions of this patch
> > and only have a couple minor issues:
> >
> > +void gtk_widget_get_size_request (GtkWidget *widget,
> > + gint *width,
> > + gint *height);
> > i thought we agreed on not having this function, since people
> > looking for a widget's size will want allocation anyways and
> > would wrongly figure get_usize/get_size_request (yeah, setter/
> > getter symmetrie would be an argument, but a getter here doesn't
> > really make much sense).
>
> You're right, your notes and my notes both say we don't have this.
> I probably just left it there by accident. ;-)
>
> However we did go through and add that huge "getters" patch after our
> discussion, adding getters for all setters on principle. Does that
> change our decision?
i don't think so, it's what i meant to adres with "setter/getter symmetry",
i.e. we shouldn't have a getter if it doesn't make sense just because
we have getters in most other places, don't you agree? ;)
> > +static void
> > +gtk_window_finalize (GObject *object)
> > +{
> > + if (window->geometry_info)
> > + {
> > + if (window->geometry_info->widget)
> > + gtk_signal_disconnect_by_func (GTK_OBJECT (window->geometry_info->widget),
> > + GTK_SIGNAL_FUNC (gtk_widget_destroyed),
> > + &window->geometry_info->widget);
> > + g_free (window->geometry_info);
> > + }
> > +
> > + G_OBJECT_CLASS (parent_class)->finalize (object);
> > +}
> >
> > the disconnect doesn't look right to me, window->geometry_info->widget
> > not being part of window's widget tree is somewhat pathological, if
> > it is however, the widget should already be finalized and you can't
> > disconnect at handler at that point.
>
> I didn't change this code, it's just "diff" having a bad day - look at
> how gtk_window_finalize() being -'d is interleaved with
> gtk_window_move() being +'d, and then gtk_window_finalize() is
> re-added again in its entirety. Go figure.
ok, sure i believe you on this, i didn't pay too much attention to
whether you changed this or not, i just noted it looks kinda odd ;)
> OK, I'm going to do some testing since GTK has changed a bit since I
> wrote this, then put what I have in CVS and let the bug finding begin.
ok, good.
>
> Havoc
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]