Code

libgdl: avoid setting a negative preferred height for dock items,
authorgustav_b <gustav_b@users.sourceforge.net>
Wed, 12 Dec 2007 22:45:04 +0000 (22:45 +0000)
committergustav_b <gustav_b@users.sourceforge.net>
Wed, 12 Dec 2007 22:45:04 +0000 (22:45 +0000)
fixes a runtime warning.

src/libgdl/gdl-dock-item.c

index 3be8dd3e2a216c0b48e6235c74e2f1e08a14f192..e8ae3d54b1cc343052af09c77b8f2b9fa8e9a58a 100644 (file)
@@ -1298,7 +1298,7 @@ gdl_dock_item_dock (GdlDockObject    *object,
             }
             if (req.width > 1)
                 g_object_set (object, "preferred-width", req.width, NULL);
-            if (req.height > 1)
+            if (req.height > 1 && object_req.height > req.height)
                 g_object_set (object, "preferred-height",
                               object_req.height - req.height, NULL);
             break;