diff options
author | Tim Janik <timj@gtk.org> | 1998-12-02 03:40:03 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1998-12-02 03:40:03 +0000 |
commit | 0d15bc6687e9a9718273a37b3d880f6526fa91ce (patch) | |
tree | a81db6a4b796eccad75dc6b9f0ba04cb664ddebc /gtk/gtkwindow.c | |
parent | 4ebc61c067af80a3cd24f1cfd79ec6b6be80e350 (diff) | |
download | gtk+-0d15bc6687e9a9718273a37b3d880f6526fa91ce.tar.gz |
s/gtk_notebook_nth_page/gtk_notebook_get_nth_page/.
Wed Dec 2 01:39:02 1998 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.h:
* gtk/gtknotebook.c: s/gtk_notebook_nth_page/gtk_notebook_get_nth_page/.
* incremented version number to 1.1.6 and made Gtk
dependant on GLib 1.1.6.
* gtk/gtkwidget.h (struct _GtkRequisition): changed width and height
from guint16 to gint16, since sizes bigger than 32767 are not supported
anyways, and aritmethics with intermediate negative values are possible
now.
Tue Dec 1 00:00:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkscrolledwindow.c:
implementation of GTK_POLICY_NEVER functionality, added rationales
on the policy and size requisition handling at the top.
(gtk_scrolled_window_size_request):
we assume a default minimum for our child's width and height
if [hv]scrollbar_policy != GTK_POLICY_NEVER, except when the user
specified the dimension explicitely.
(gtk_scrolled_window_size_allocate):
do not show scrollbars if [hv]scrollbar_policy == GTK_POLICY_NEVER.
* gtk/gtkviewport.c (gtk_viewport_size_request): report the real
size we require (including the child).
* gtk/gtkclist.c:
(gtk_clist_size_request): report the real size required.
* gtk/gtkenums.h (enum GtkPolicyType): added GTK_POLICY_NEVER.
* gtk/gtkobject.c (gtk_object_init_type): object_type doesn't
need to be a static variable.
Mon Nov 30 22:41:25 1998 Tim Janik <timj@gtk.org>
* gtk/gtkclist.h:
* gtk/gtkclist.c:
* gtk/gtkviewport.h:
* gtk/gtkviewport.c:
* gtk/gtktext.h:
* gtk/gtktext.c:
* gtk/gtklayout.h:
* gtk/gtklayout.c:
* gtk/gtkwidget.h:
* gtk/gtkwidget.c:
* gtk/gtkscrolledwindow.h:
* gtk/gtkscrolledwindow.c:
s/scroll_adjustements/scroll_adjustments/
s/scroll_adjustments/set_scroll_adjustments/g
Diffstat (limited to 'gtk/gtkwindow.c')
-rw-r--r-- | gtk/gtkwindow.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 41e59e8d2e..5f74cb5fdd 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -680,22 +680,24 @@ gtk_window_size_request (GtkWidget *widget, GtkRequisition *requisition) { GtkWindow *window; + GtkBin *bin; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_WINDOW (widget)); g_return_if_fail (requisition != NULL); window = GTK_WINDOW (widget); + bin = GTK_BIN (window); + + requisition->width = GTK_CONTAINER (window)->border_width * 2; + requisition->height = GTK_CONTAINER (window)->border_width * 2; - if (window->bin.child) + if (bin->child && GTK_WIDGET_VISIBLE (bin->child)) { - requisition->width = GTK_CONTAINER (window)->border_width * 2; - requisition->height = GTK_CONTAINER (window)->border_width * 2; - - gtk_widget_size_request (window->bin.child, &window->bin.child->requisition); + gtk_widget_size_request (bin->child, &bin->child->requisition); - requisition->width += window->bin.child->requisition.width; - requisition->height += window->bin.child->requisition.height; + requisition->width += bin->child->requisition.width; + requisition->height += bin->child->requisition.height; } else { @@ -1292,7 +1294,8 @@ gtk_window_set_hints (GtkWidget *widget, if (!window->allow_grow) flags |= GDK_HINT_MAX_SIZE; - gdk_window_set_hints (widget->window, ux, uy, + gdk_window_set_hints (widget->window, + ux, uy, requisition->width, requisition->height, requisition->width, requisition->height, flags); |