forked from AuroraMiddleware/gtk
warn about &widget->requisition, even for toplevels.
Wed Feb 24 11:19:12 1999 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_size_request): warn about &widget->requisition, even for toplevels. * gtk/gtkwindow.c (gtk_window_move_resize): request size into an automatic variable and check if our size has changed. when we decide to reallocate everything, we need to resize our own GdkWindow as well. * gtk/gtkmain.c: * gtk/gtkobject.c: hack time, make --gtk-debug=objects work even after gtk_type_init(), this is to "fix" gnome's arg parsing oddities. * gtk/gtktypeutils.h: don't segfault in GTK_CHECK_CLASS_TYPE and GTK_CHECK_TYPE upon NULL pointers. * gtk/gtklayout.c: removed bogus prototypes of gtk_layout_gravity_works, gtk_layout_set_static_gravity, gtk_layout_add_child_cb and gtk_layout_remove_child_cb to shut up compiler. * gtk/Makefile.am: added an empty rule gtkrc: : so make doesn't try to "update" gtkrc from gtkrc.c.
This commit is contained in:
parent
082c0c8975
commit
c4fe78345e
26
ChangeLog
26
ChangeLog
@ -1,3 +1,29 @@
|
||||
Wed Feb 24 11:19:12 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_size_request): warn about
|
||||
&widget->requisition, even for toplevels.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_move_resize): request size into an
|
||||
automatic variable and check if our size has changed.
|
||||
when we decide to reallocate everything, we need to resize our
|
||||
own GdkWindow as well.
|
||||
|
||||
* gtk/gtkmain.c:
|
||||
* gtk/gtkobject.c: hack time, make --gtk-debug=objects work even
|
||||
after gtk_type_init(), this is to "fix" gnome's arg parsing oddities.
|
||||
|
||||
* gtk/gtktypeutils.h: don't segfault in GTK_CHECK_CLASS_TYPE and
|
||||
GTK_CHECK_TYPE upon NULL pointers.
|
||||
|
||||
* gtk/gtklayout.c: removed bogus prototypes of gtk_layout_gravity_works,
|
||||
gtk_layout_set_static_gravity, gtk_layout_add_child_cb and
|
||||
gtk_layout_remove_child_cb to shut up compiler.
|
||||
|
||||
* gtk/Makefile.am: added an empty rule
|
||||
gtkrc:
|
||||
:
|
||||
so make doesn't try to "update" gtkrc from gtkrc.c.
|
||||
|
||||
Wed Feb 24 05:53:15 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* gtk/Makefile.am: removed gtkrc rule added by
|
||||
|
@ -1,3 +1,29 @@
|
||||
Wed Feb 24 11:19:12 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_size_request): warn about
|
||||
&widget->requisition, even for toplevels.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_move_resize): request size into an
|
||||
automatic variable and check if our size has changed.
|
||||
when we decide to reallocate everything, we need to resize our
|
||||
own GdkWindow as well.
|
||||
|
||||
* gtk/gtkmain.c:
|
||||
* gtk/gtkobject.c: hack time, make --gtk-debug=objects work even
|
||||
after gtk_type_init(), this is to "fix" gnome's arg parsing oddities.
|
||||
|
||||
* gtk/gtktypeutils.h: don't segfault in GTK_CHECK_CLASS_TYPE and
|
||||
GTK_CHECK_TYPE upon NULL pointers.
|
||||
|
||||
* gtk/gtklayout.c: removed bogus prototypes of gtk_layout_gravity_works,
|
||||
gtk_layout_set_static_gravity, gtk_layout_add_child_cb and
|
||||
gtk_layout_remove_child_cb to shut up compiler.
|
||||
|
||||
* gtk/Makefile.am: added an empty rule
|
||||
gtkrc:
|
||||
:
|
||||
so make doesn't try to "update" gtkrc from gtkrc.c.
|
||||
|
||||
Wed Feb 24 05:53:15 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* gtk/Makefile.am: removed gtkrc rule added by
|
||||
|
@ -1,3 +1,29 @@
|
||||
Wed Feb 24 11:19:12 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_size_request): warn about
|
||||
&widget->requisition, even for toplevels.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_move_resize): request size into an
|
||||
automatic variable and check if our size has changed.
|
||||
when we decide to reallocate everything, we need to resize our
|
||||
own GdkWindow as well.
|
||||
|
||||
* gtk/gtkmain.c:
|
||||
* gtk/gtkobject.c: hack time, make --gtk-debug=objects work even
|
||||
after gtk_type_init(), this is to "fix" gnome's arg parsing oddities.
|
||||
|
||||
* gtk/gtktypeutils.h: don't segfault in GTK_CHECK_CLASS_TYPE and
|
||||
GTK_CHECK_TYPE upon NULL pointers.
|
||||
|
||||
* gtk/gtklayout.c: removed bogus prototypes of gtk_layout_gravity_works,
|
||||
gtk_layout_set_static_gravity, gtk_layout_add_child_cb and
|
||||
gtk_layout_remove_child_cb to shut up compiler.
|
||||
|
||||
* gtk/Makefile.am: added an empty rule
|
||||
gtkrc:
|
||||
:
|
||||
so make doesn't try to "update" gtkrc from gtkrc.c.
|
||||
|
||||
Wed Feb 24 05:53:15 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* gtk/Makefile.am: removed gtkrc rule added by
|
||||
|
@ -1,3 +1,29 @@
|
||||
Wed Feb 24 11:19:12 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_size_request): warn about
|
||||
&widget->requisition, even for toplevels.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_move_resize): request size into an
|
||||
automatic variable and check if our size has changed.
|
||||
when we decide to reallocate everything, we need to resize our
|
||||
own GdkWindow as well.
|
||||
|
||||
* gtk/gtkmain.c:
|
||||
* gtk/gtkobject.c: hack time, make --gtk-debug=objects work even
|
||||
after gtk_type_init(), this is to "fix" gnome's arg parsing oddities.
|
||||
|
||||
* gtk/gtktypeutils.h: don't segfault in GTK_CHECK_CLASS_TYPE and
|
||||
GTK_CHECK_TYPE upon NULL pointers.
|
||||
|
||||
* gtk/gtklayout.c: removed bogus prototypes of gtk_layout_gravity_works,
|
||||
gtk_layout_set_static_gravity, gtk_layout_add_child_cb and
|
||||
gtk_layout_remove_child_cb to shut up compiler.
|
||||
|
||||
* gtk/Makefile.am: added an empty rule
|
||||
gtkrc:
|
||||
:
|
||||
so make doesn't try to "update" gtkrc from gtkrc.c.
|
||||
|
||||
Wed Feb 24 05:53:15 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* gtk/Makefile.am: removed gtkrc rule added by
|
||||
|
@ -1,3 +1,29 @@
|
||||
Wed Feb 24 11:19:12 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_size_request): warn about
|
||||
&widget->requisition, even for toplevels.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_move_resize): request size into an
|
||||
automatic variable and check if our size has changed.
|
||||
when we decide to reallocate everything, we need to resize our
|
||||
own GdkWindow as well.
|
||||
|
||||
* gtk/gtkmain.c:
|
||||
* gtk/gtkobject.c: hack time, make --gtk-debug=objects work even
|
||||
after gtk_type_init(), this is to "fix" gnome's arg parsing oddities.
|
||||
|
||||
* gtk/gtktypeutils.h: don't segfault in GTK_CHECK_CLASS_TYPE and
|
||||
GTK_CHECK_TYPE upon NULL pointers.
|
||||
|
||||
* gtk/gtklayout.c: removed bogus prototypes of gtk_layout_gravity_works,
|
||||
gtk_layout_set_static_gravity, gtk_layout_add_child_cb and
|
||||
gtk_layout_remove_child_cb to shut up compiler.
|
||||
|
||||
* gtk/Makefile.am: added an empty rule
|
||||
gtkrc:
|
||||
:
|
||||
so make doesn't try to "update" gtkrc from gtkrc.c.
|
||||
|
||||
Wed Feb 24 05:53:15 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* gtk/Makefile.am: removed gtkrc rule added by
|
||||
|
@ -1,3 +1,29 @@
|
||||
Wed Feb 24 11:19:12 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_size_request): warn about
|
||||
&widget->requisition, even for toplevels.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_move_resize): request size into an
|
||||
automatic variable and check if our size has changed.
|
||||
when we decide to reallocate everything, we need to resize our
|
||||
own GdkWindow as well.
|
||||
|
||||
* gtk/gtkmain.c:
|
||||
* gtk/gtkobject.c: hack time, make --gtk-debug=objects work even
|
||||
after gtk_type_init(), this is to "fix" gnome's arg parsing oddities.
|
||||
|
||||
* gtk/gtktypeutils.h: don't segfault in GTK_CHECK_CLASS_TYPE and
|
||||
GTK_CHECK_TYPE upon NULL pointers.
|
||||
|
||||
* gtk/gtklayout.c: removed bogus prototypes of gtk_layout_gravity_works,
|
||||
gtk_layout_set_static_gravity, gtk_layout_add_child_cb and
|
||||
gtk_layout_remove_child_cb to shut up compiler.
|
||||
|
||||
* gtk/Makefile.am: added an empty rule
|
||||
gtkrc:
|
||||
:
|
||||
so make doesn't try to "update" gtkrc from gtkrc.c.
|
||||
|
||||
Wed Feb 24 05:53:15 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* gtk/Makefile.am: removed gtkrc rule added by
|
||||
|
@ -1,3 +1,29 @@
|
||||
Wed Feb 24 11:19:12 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_size_request): warn about
|
||||
&widget->requisition, even for toplevels.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_move_resize): request size into an
|
||||
automatic variable and check if our size has changed.
|
||||
when we decide to reallocate everything, we need to resize our
|
||||
own GdkWindow as well.
|
||||
|
||||
* gtk/gtkmain.c:
|
||||
* gtk/gtkobject.c: hack time, make --gtk-debug=objects work even
|
||||
after gtk_type_init(), this is to "fix" gnome's arg parsing oddities.
|
||||
|
||||
* gtk/gtktypeutils.h: don't segfault in GTK_CHECK_CLASS_TYPE and
|
||||
GTK_CHECK_TYPE upon NULL pointers.
|
||||
|
||||
* gtk/gtklayout.c: removed bogus prototypes of gtk_layout_gravity_works,
|
||||
gtk_layout_set_static_gravity, gtk_layout_add_child_cb and
|
||||
gtk_layout_remove_child_cb to shut up compiler.
|
||||
|
||||
* gtk/Makefile.am: added an empty rule
|
||||
gtkrc:
|
||||
:
|
||||
so make doesn't try to "update" gtkrc from gtkrc.c.
|
||||
|
||||
Wed Feb 24 05:53:15 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* gtk/Makefile.am: removed gtkrc rule added by
|
||||
|
@ -312,8 +312,11 @@ libgtk_la_LDFLAGS = \
|
||||
# $(top_builddir)/gdk/libgdk.la
|
||||
|
||||
gtkconfdir = $(sysconfdir)/gtk
|
||||
gtkconf_DATA = gtkrc.ja gtkrc.ko gtkrc.ru
|
||||
gtkconf_DATA = gtkrc gtkrc.ja gtkrc.ko gtkrc.ru
|
||||
|
||||
gtkrc:
|
||||
:
|
||||
|
||||
# We create a dummy theme for the default GTK+ theme
|
||||
|
||||
install-data-local:
|
||||
|
@ -103,19 +103,6 @@ static GdkFilterReturn gtk_layout_main_filter (GdkXEvent *gdk_xevent,
|
||||
GdkEvent *event,
|
||||
gpointer data);
|
||||
|
||||
static gboolean gtk_layout_gravity_works (void);
|
||||
static void gtk_layout_set_static_gravity (GdkWindow *win,
|
||||
gboolean is_parent,
|
||||
gboolean on);
|
||||
|
||||
static void gtk_layout_add_child_cb (GdkWindow *parent,
|
||||
GdkWindow *child,
|
||||
gpointer data);
|
||||
static void gtk_layout_remove_child_cb (GdkWindow *parent,
|
||||
GdkWindow *child,
|
||||
gpointer data);
|
||||
|
||||
|
||||
static GtkWidgetClass *parent_class = NULL;
|
||||
static gboolean gravity_works;
|
||||
|
||||
|
@ -178,6 +178,7 @@ gboolean
|
||||
gtk_init_check (int *argc,
|
||||
char ***argv)
|
||||
{
|
||||
extern void gtk_object_post_arg_parsing_init (void);
|
||||
GSList *gtk_modules = NULL;
|
||||
GSList *slist;
|
||||
gchar *env_string = NULL;
|
||||
@ -385,6 +386,7 @@ gtk_init_check (int *argc,
|
||||
gtk_colormap = gdk_colormap_get_system ();
|
||||
|
||||
gtk_type_init ();
|
||||
gtk_object_post_arg_parsing_init ();
|
||||
gtk_signal_init ();
|
||||
gtk_rc_init ();
|
||||
|
||||
|
@ -96,6 +96,15 @@ gtk_object_debug (void)
|
||||
}
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
|
||||
void
|
||||
gtk_object_post_arg_parsing_init (void)
|
||||
{
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
if (gtk_debug_flags & GTK_DEBUG_OBJECTS)
|
||||
g_atexit (gtk_object_debug);
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
}
|
||||
|
||||
/****************************************************
|
||||
* GtkObject type, class and instance initialization
|
||||
*
|
||||
@ -119,11 +128,6 @@ gtk_object_init_type (void)
|
||||
|
||||
object_type = gtk_type_unique (0, &object_info);
|
||||
g_assert (object_type == GTK_TYPE_OBJECT);
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
if (gtk_debug_flags & GTK_DEBUG_OBJECTS)
|
||||
g_atexit (gtk_object_debug);
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
}
|
||||
|
||||
GtkType
|
||||
|
@ -107,9 +107,11 @@ typedef enum
|
||||
/* Determines whether `type_object' and `type_class' are a type of `otype'.
|
||||
*/
|
||||
#define GTK_CHECK_TYPE(type_object, otype) ( \
|
||||
gtk_type_is_a (((GtkTypeObject*) (type_object))->klass->type, (otype)) \
|
||||
((GtkTypeObject*) (type_object)) != NULL && \
|
||||
GTK_CHECK_CLASS_TYPE (((GtkTypeObject*) (type_object))->klass, (otype)) \
|
||||
)
|
||||
#define GTK_CHECK_CLASS_TYPE(type_class, otype) ( \
|
||||
((GtkTypeClass*) (type_class)) != NULL && \
|
||||
gtk_type_is_a (((GtkTypeClass*) (type_class))->type, (otype)) \
|
||||
)
|
||||
|
||||
|
@ -2361,7 +2361,7 @@ gtk_widget_size_request (GtkWidget *widget,
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
if (!GTK_WIDGET_TOPLEVEL (widget) && (requisition == &widget->requisition))
|
||||
if (requisition == &widget->requisition)
|
||||
g_warning ("gtk_widget_size_request() called on child widget with widget equal\n to widget->requisition. gtk_widget_set_usize() may not work properly.");
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
|
||||
|
@ -1295,6 +1295,7 @@ gtk_window_move_resize (GtkWindow *window)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkWindowGeometryInfo *info;
|
||||
GtkRequisition requisition;
|
||||
GtkContainer *container;
|
||||
gint x, y;
|
||||
gint width, height;
|
||||
@ -1324,33 +1325,37 @@ gtk_window_move_resize (GtkWindow *window)
|
||||
else
|
||||
height = widget->requisition.height;
|
||||
|
||||
gtk_widget_size_request (widget, &widget->requisition);
|
||||
size_changed = FALSE;
|
||||
|
||||
gtk_widget_size_request (widget, &requisition);
|
||||
|
||||
size_changed |= requisition.width != widget->requisition.width;
|
||||
size_changed |= requisition.height != widget->requisition.height;
|
||||
widget->requisition = requisition;
|
||||
|
||||
/* Figure out the new desired size */
|
||||
|
||||
size_changed = FALSE;
|
||||
|
||||
if (info && info->width > 0)
|
||||
{
|
||||
size_changed = size_changed || (width != info->last_width);
|
||||
size_changed |= width != info->last_width;
|
||||
info->last_width = width;
|
||||
new_width = info->width;
|
||||
}
|
||||
else
|
||||
{
|
||||
size_changed = size_changed || (width != widget->requisition.width);
|
||||
size_changed |= width != widget->requisition.width;
|
||||
new_width = widget->requisition.width;
|
||||
}
|
||||
|
||||
if (info && info->height > 0)
|
||||
{
|
||||
size_changed = size_changed || (height != info->last_height);
|
||||
size_changed |= height != info->last_height;
|
||||
info->last_height = height;
|
||||
new_height = info->height;
|
||||
}
|
||||
else
|
||||
{
|
||||
size_changed = size_changed || (height != widget->requisition.height);
|
||||
size_changed |= height != widget->requisition.height;
|
||||
new_height = widget->requisition.height;
|
||||
}
|
||||
|
||||
@ -1493,6 +1498,9 @@ gtk_window_move_resize (GtkWindow *window)
|
||||
allocation.height = new_height;
|
||||
|
||||
gtk_widget_size_allocate (widget, &allocation);
|
||||
gdk_window_resize (widget->window,
|
||||
new_width,
|
||||
new_height);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user