Question: how to display contents of column under mouse pointer as tooltip

Γιώργος Κυλάφας <[email protected]>
Newsgroups gmane.comp.gnome.apps.rhythmbox.devel
Message-ID <[email protected]>
(please CC me to any answers as I am not subscribed to the list)

Hi all,

I am trying to write a patch to show a tooltip in RBEntryView in case a
column is not wide enough to display its full contents. However, I seem to have
hit a wall and I would appreciate your help.

This is what I have managed so far:

1. During the construction of the RBEntryView, I have connected the signal
   "query-tooltip" to a new callback:

    static gboolean
    rb_entry_view_query_tooltip_cb (GtkWidget *widget,
                                    gint x,
                                    gint y,
                                    gboolean keyboard_mode,
                                    GtkTooltip *tooltip,
                                    RBEntryView *view)

2. Inside rb_entry_view_query_tooltip_cb(), I either use
   gtk_tree_view_get_path_at_pos() or gtk_tree_view_get_tooltip_context() to
   get the GtkTreePath/GtkTreeViewColumn or GtkTreeIter, respectively, under
   the mouse pointer.

3. Then, I either use rhythmdb_query_model_tree_path_to_entry() or
   rhythmdb_query_model_iter_to_entry() to get the RhythmDBEntry under the
   mouse pointer.

However, I cannot find a way to get the contents of the specific column under
the mouse pointer, even though I know the GtkTreeViewColumn.

I would appreciate your help,

--
Giorgos
http://en.wikipedia.org/wiki/Posting_style#Inline_replying
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.