[goffice] make gog_view_get_view_at_point behave as the doc says.
- From: Jean Bréfort <jbrefort src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [goffice] make gog_view_get_view_at_point behave as the doc says.
- Date: Wed, 9 Dec 2009 20:49:40 +0000 (UTC)
commit e7080508a3c47166c2be8e317c53084f0889651a
Author: Jean Brefort <jean brefort normalesup org>
Date: Wed Dec 9 21:47:00 2009 +0100
make gog_view_get_view_at_point behave as the doc says.
ChangeLog | 7 +++++++
goffice/canvas/goc-graph.c | 3 +--
goffice/graph/gog-view.c | 9 ++++++---
3 files changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 39b7a56..4042e49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2009-12-09 Jean Brefort <jean brefort normalesup org>
+ reviewed by: <delete if not using a buddy>
+
+ * goffice/canvas/goc-graph.c (goc_graph_do_tooltip):
+ * goffice/graph/gog-view.c (gog_view_get_view_at_point):
+
+2009-12-09 Jean Brefort <jean brefort normalesup org>
+
* goffice/graph/gog-grid.c (gog_grid_view_xyz_render): still others.
2009-12-09 Jean Brefort <jean brefort normalesup org>
diff --git a/goffice/canvas/goc-graph.c b/goffice/canvas/goc-graph.c
index 2fccfae..4a01ea5 100644
--- a/goffice/canvas/goc-graph.c
+++ b/goffice/canvas/goc-graph.c
@@ -252,7 +252,6 @@ goc_graph_do_tooltip (GocGraph *graph)
GogView *view;
char *buf = NULL, *s1 = NULL, *s2 = NULL;
GogObject *obj;
- GogTool *tool;
GogChart *chart;
GogViewAllocation alloc;
double xpos, ypos;
@@ -274,7 +273,7 @@ goc_graph_do_tooltip (GocGraph *graph)
/* get the GogView at the cursor position */
g_object_get (G_OBJECT (graph->renderer), "view", &view, NULL);
- gog_view_get_view_at_point (view, x, y, &obj, &tool);
+ gog_view_get_view_at_point (view, x, y, &obj, NULL);
if (!obj)
goto tooltip;
chart = GOG_CHART (gog_object_get_parent_typed (obj, GOG_TYPE_CHART));
diff --git a/goffice/graph/gog-view.c b/goffice/graph/gog-view.c
index dda73ba..dd2ae99 100644
--- a/goffice/graph/gog-view.c
+++ b/goffice/graph/gog-view.c
@@ -981,6 +981,7 @@ gog_view_get_view_at_point (GogView *view, double x, double y, GogObject **obj,
GogView *pointed_view;
GSList const *ptr;
GSList *list;
+ GogTool *current_tool;
g_return_val_if_fail (GOG_IS_VIEW (view), NULL);
@@ -995,11 +996,13 @@ gog_view_get_view_at_point (GogView *view, double x, double y, GogObject **obj,
}
g_slist_free (list);
- *tool = gog_view_get_tool_at_point (view, x, y, obj);
- if (*tool != NULL)
+ if ((current_tool = gog_view_get_tool_at_point (view, x, y, obj))) {
+ if (tool != NULL)
+ *tool = current_tool;
return view;
+ }
- if (*obj)
+ if (obj && *obj)
*obj = NULL;
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]