X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fgtk-contrib%2Fgtkxpaned.c;h=7b30bfa1f58b3ab26486dd2dc8d08546ac2a7d9b;hb=refs%2Fbuilds%2F20121225032008%2Fpspp;hp=2167606c0768995a94483d917789c421048f4fab;hpb=634c9eb2cf9ba7ba021e52c9fd5fee957ec18f5c;p=pspp diff --git a/lib/gtk-contrib/gtkxpaned.c b/lib/gtk-contrib/gtkxpaned.c index 2167606c07..7b30bfa1f5 100644 --- a/lib/gtk-contrib/gtkxpaned.c +++ b/lib/gtk-contrib/gtkxpaned.c @@ -3,6 +3,7 @@ ** 10 20 30 40 50 60 70 80 ** ** library for GtkXPaned-widget, a 2x2 grid-like variation of GtkPaned of gtk+ +** Copyright (C) 2012 Free Software Foundation, Inc. ** Copyright (C) 2005-2006 Mirco "MacSlow" Müller ** ** This library is free software; you can redistribute it and/or @@ -31,12 +32,11 @@ #include #include "gtkxpaned.h" + +#include #include -#include -#include #include -#include -#include + enum WidgetProperties { @@ -688,8 +688,8 @@ static void gtk_xpaned_size_request (GtkWidget* widget, { gtk_widget_size_request (xpaned->bottom_right_child, &child_requisition); - requisition->width = MAX (requisition->width, child_requisition.width); - requisition->height = MAX (requisition->height, child_requisition.height); + requisition->width = child_requisition.width; + requisition->height = child_requisition.height; } /* add 2 times the set border-width to the GtkXPaneds requisition */ @@ -2413,8 +2413,6 @@ gtk_xpaned_compute_position (GtkXPaned* xpaned, GdkPoint old_max_position; gint handle_size; gint border_width = GTK_CONTAINER (xpaned)->border_width; - float fX; - float fY; g_return_if_fail (GTK_IS_XPANED (xpaned)); @@ -2425,9 +2423,6 @@ gtk_xpaned_compute_position (GtkXPaned* xpaned, old_max_position.x = xpaned->max_position.x; old_max_position.y = xpaned->max_position.y; - fX = 100.0f * (float) old_position.x / (float) allocation->width; - fY = 100.0f * (float) old_position.y / (float) allocation->height; - xpaned->min_position.x = xpaned->top_left_child_shrink ? 0 : top_left_child_req->width; xpaned->min_position.y = xpaned->top_left_child_shrink ? 0 : top_left_child_req->height; @@ -2451,14 +2446,6 @@ gtk_xpaned_compute_position (GtkXPaned* xpaned, xpaned->top_left_child_size.width = top_left_child_req->width; xpaned->top_left_child_size.height = top_left_child_req->height; } - else if (top_left_child_req->width + top_right_child_req->width != 0) - { - xpaned->top_left_child_size.width = allocation->width * ((gdouble)top_left_child_req->width / (top_left_child_req->width + top_right_child_req->width)) + 0.5; - } - else if (top_left_child_req->height + top_right_child_req->height != 0) - { - xpaned->top_left_child_size.height = allocation->height * ((gdouble)top_left_child_req->height / (top_left_child_req->height + top_right_child_req->height)) + 0.5; - } else { xpaned->top_left_child_size.width = allocation->width * 0.5 + 0.5; @@ -2575,9 +2562,6 @@ gtk_xpaned_compute_position (GtkXPaned* xpaned, xpaned->last_allocation.width = allocation->width; xpaned->last_allocation.height = allocation->height; - - fX = 100.0f * (float) old_position.x / (float) allocation->width; - fY = 100.0f * (float) old_position.y / (float) allocation->height; } static void gtk_xpaned_set_saved_focus (GtkXPaned* xpaned, GtkWidget* widget)