[Rhythmbox-devel] Question: how to display contents of column under mouse pointer as tooltip

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 Kylafas

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]