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: Thu, 9 Aug 2001 02:53:02 +0200 (CEST)
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).
+static void
+gtk_window_finalize (GObject *object)
+{
+ GtkWindow *window;
+
+ g_return_if_fail (GTK_IS_WINDOW (object));
+
+ window = GTK_WINDOW (object);
+
+ toplevel_list = g_slist_remove (toplevel_list, window);
+
+ g_free (window->title);
+ g_free (window->wmclass_name);
+ g_free (window->wmclass_class);
+ g_free (window->wm_role);
+
+ g_hash_table_foreach_remove (mnemonic_hash_table,
+ gtk_window_mnemonic_hash_remove,
+ window);
+ 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.
auto_shrink:
we wanted to remove this, however the way i read your patch, you removed
the property installation code in the class but still handle it in
get/set?
PROP_WIDTH_REQUEST/PROP_HEIGHT_REQUEST:
from what i see, you only handle these in the setter, not the
getter though they are readwrite props.
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]