Handle tooltip requests for items in the open files tree view properly by using gtk_tree_view_get_tooltip_context().

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2792 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2008-07-18 15:05:56 +00:00
parent 9b8d1f5bdb
commit bdc4e37cc8
2 changed files with 7 additions and 6 deletions

View File

@ -13,6 +13,9 @@
Remove unnecessary finalize() function.
* plugins/classbuilder.c:
Encourage single header includes as it is necessary with GTK 2.14+.
* src/treeviews.c:
Handle tooltip requests for items in the open files tree view
properly by using gtk_tree_view_get_tooltip_context().
2008-07-17 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>

View File

@ -215,16 +215,14 @@ void treeviews_update_tag_list(GeanyDocument *doc, gboolean update)
gboolean on_treeviews_tooltip_queried(GtkWidget *widget, gint x, gint y, gboolean keyboard_mode,
GtkTooltip *tooltip, gpointer user_data)
{
GtkTreePath *path;
GtkTreeModel *model;
GtkTreeIter iter;
if (gtk_tree_view_get_path_at_pos(
GTK_TREE_VIEW(tv.tree_openfiles), x, y, &path, NULL, NULL, NULL))
if (gtk_tree_view_get_tooltip_context(
GTK_TREE_VIEW(widget), &x, &y, keyboard_mode, &model, NULL, &iter))
{
GtkTreeIter iter;
gchar *file_name = NULL;
gtk_tree_model_get_iter(GTK_TREE_MODEL(store_openfiles), &iter, path);
gtk_tree_path_free(path);
gtk_tree_model_get(GTK_TREE_MODEL(store_openfiles), &iter, 3, &file_name, -1);
if (file_name != NULL)
{