[gnumeric] Quieten GTK warning regarding frams sheet objects [#579152]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnumeric] Quieten GTK warning regarding frams sheet objects [#579152]
- Date: Sun, 19 Apr 2009 22:09:08 -0400 (EDT)
commit c7e24ef1f96752a669e893472671582080fecf15
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Sun Apr 19 20:08:21 2009 -0600
Quieten GTK warning regarding frams sheet objects [#579152]
2009-04-19 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/sheet-object-widget.c (so_widget_view_set_bounds): Make sure that the
bounds are at least 6 wide [#579152]
---
ChangeLog | 5 +++++
NEWS | 1 +
src/sheet-object-widget.c | 17 +++++++++++++----
3 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fb75a82..81e5eed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2009-04-19 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * src/sheet-object-widget.c (so_widget_view_set_bounds): Make sure that the
+ bounds are at least 6 wide [#579152]
+
+2009-04-19 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* src/commands.h (cmd_so_set_adjustment): new
* src/commands.c (cmd_so_set_adjustment): new
(cmd_so_set_adjustment_adj): new
diff --git a/NEWS b/NEWS
index 4386e21..f806b72 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Andreas:
* Write metadata from the property dialog to the files
* Complete the list sheet object configuration dialog [#578557]
* Make all sheet object configurations undoable [#114098]
+ * Quieten GTK warning [#579152]
Jean:
* Variable sheet sizes.
diff --git a/src/sheet-object-widget.c b/src/sheet-object-widget.c
index 308c273..9755275 100644
--- a/src/sheet-object-widget.c
+++ b/src/sheet-object-widget.c
@@ -130,13 +130,22 @@ static void
so_widget_view_set_bounds (SheetObjectView *sov, double const *coords, gboolean visible)
{
FooCanvasItem *view = FOO_CANVAS_ITEM (sov);
+ double left = MIN (coords [0], coords [2]);
+ double top = MIN (coords [1], coords [3]);
+ double width = fabs (coords [2] - coords [0]) + 1.;
+ double height = fabs (coords [3] - coords [1]) + 1.;
+
+ /* We only need the next check for frames, but it doesn't hurt otherwise. */
+ if (width < 8.)
+ width = 8.;
+
if (visible) {
/* NOTE : far point is EXCLUDED so we add 1 */
foo_canvas_item_set (view,
- "x", MIN (coords [0], coords [2]),
- "y", MIN (coords [1], coords [3]),
- "width", fabs (coords [2] - coords [0]) + 1.,
- "height", fabs (coords [3] - coords [1]) + 1.,
+ "x", left,
+ "y", top,
+ "width", width,
+ "height", height,
NULL);
foo_canvas_item_show (view);
} else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]