[tasks] Use gtk_tree_view_get_tooltip_context to clarify tooltip code
- From: Ross Burton <rburton src gnome org>
- To: svn-commits-list gnome org
- Subject: [tasks] Use gtk_tree_view_get_tooltip_context to clarify tooltip code
- Date: Mon, 8 Jun 2009 16:35:26 -0400 (EDT)
commit bd535808d343727effa8776df021696b55ab0d1c
Author: Ross Burton <ross linux intel com>
Date: Fri Apr 24 17:27:37 2009 +0100
Use gtk_tree_view_get_tooltip_context to clarify tooltip code
---
libkoto/koto-task-view.c | 20 ++++----------------
1 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/libkoto/koto-task-view.c b/libkoto/koto-task-view.c
index 1dd7ef9..1661136 100644
--- a/libkoto/koto-task-view.c
+++ b/libkoto/koto-task-view.c
@@ -272,28 +272,16 @@ on_query_tooltip (GtkWidget *widget,
gpointer user_data)
{
GtkTreeView *treeview = GTK_TREE_VIEW (widget);
- GtkTreeModel *model;
- GtkTreePath *path;
+ GtkTreeModel *model = NULL;
GtkTreeIter iter;
KotoTask *task = NULL;
const char *desc;
gboolean ret = FALSE;
- if (keyboard_mode)
- return FALSE;
-
- model = gtk_tree_view_get_model (treeview);
-
- gtk_tree_view_convert_widget_to_bin_window_coords
- (treeview, x, y, &x, &y);
-
- if (!gtk_tree_view_get_path_at_pos
- (treeview, x, y, &path, NULL, NULL, NULL))
- return FALSE;
-
- if (!gtk_tree_model_get_iter (model, &iter, path))
+ if (!gtk_tree_view_get_tooltip_context
+ (treeview, &x, &y, keyboard_mode,
+ &model, NULL, &iter))
return FALSE;
- gtk_tree_path_free (path);
gtk_tree_model_get (model, &iter, COLUMN_TASK, &task, -1);
if (!task)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]