@@ -1551,7 +1551,7 @@ add_text_column (GtkTreeView *view, const gchar *title, int col_num, bool ellips
15511551
15521552static GtkTreeViewColumn *
15531553add_toggle_column (GtkTreeView *view, const gchar *title, int col_num,
1554- GCallback cb_fn, gpointer cb_arg)
1554+ GCallback cb_fn, gpointer cb_arg, const gchar *tooltip_text )
15551555{
15561556 GtkCellRenderer *renderer = gtk_cell_renderer_toggle_new ();
15571557 GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes (title, renderer,
@@ -1564,6 +1564,11 @@ add_toggle_column (GtkTreeView *view, const gchar *title, int col_num,
15641564 g_object_set (G_OBJECT (column), " reorderable" , true , NULL );
15651565 g_signal_connect (renderer, " toggled" , cb_fn, cb_arg);
15661566 gtk_tree_view_append_column (view, column);
1567+
1568+ /* Set tooltip on the column header button */
1569+ if (tooltip_text)
1570+ gtk_widget_set_tooltip_text (gtk_tree_view_column_get_button (column), tooltip_text);
1571+
15671572 return column;
15681573}
15691574
@@ -1596,15 +1601,18 @@ gnc_gen_trans_init_view (GNCImportMainMatcher *info,
15961601 info->memo_column = add_text_column (view, _ (" Memo" ), DOWNLOADED_COL_MEMO, true );
15971602 add_toggle_column (view, C_ (" Column header for 'Adding transaction'" , " A" ),
15981603 DOWNLOADED_COL_ACTION_ADD,
1599- G_CALLBACK (gnc_gen_trans_add_toggled_cb), info);
1604+ G_CALLBACK (gnc_gen_trans_add_toggled_cb), info,
1605+ C_ (" Import transaction tooltip for Add action" , " Add as a new transaction" ));
16001606 GtkTreeViewColumn *column = add_toggle_column (view,
16011607 C_ (" Column header for 'Updating plus Clearing transaction'" , " U+C" ),
16021608 DOWNLOADED_COL_ACTION_UPDATE,
1603- G_CALLBACK (gnc_gen_trans_update_toggled_cb), info);
1609+ G_CALLBACK (gnc_gen_trans_update_toggled_cb), info,
1610+ C_ (" Import transaction tooltip for Update+Clear action" , " Update + Clear Transaction\n Update existing transaction with the imported data and mark it as cleared" ));
16041611 gtk_tree_view_column_set_visible (column, show_update);
16051612 add_toggle_column (view, C_ (" Column header for 'Clearing transaction'" , " C" ),
16061613 DOWNLOADED_COL_ACTION_CLEAR,
1607- G_CALLBACK (gnc_gen_trans_clear_toggled_cb), info);
1614+ G_CALLBACK (gnc_gen_trans_clear_toggled_cb), info,
1615+ C_ (" Import transaction tooltip for Clear action" , " Clear Transaction\n Mark existing transaction as cleared without changing its details" ));
16081616
16091617 /* The last column has multiple renderers */
16101618 GtkCellRenderer *renderer = gtk_cell_renderer_pixbuf_new ();
0 commit comments