void gnc_dialog_query_view_set_numerics (DialogQueryView *dqv, gboolean abs, gboolean inv_sort) { if (!dqv) return; gnc_query_view_set_numerics (GNC_QUERY_VIEW(dqv->qview), abs, inv_sort); }
/****************************************************************************\ * gnc_reconcile_view_new * * creates the account tree * * * * Args: account - the account to use in filling up the splits. * * type - the type of view, RECLIST_DEBIT or RECLIST_CREDIT * * statement_date - date of statement * * Returns: the account tree widget, or NULL if there was a problem. * \****************************************************************************/ static void gnc_reconcile_view_construct (GNCReconcileView *view, Query *query) { GNCQueryView *qview = GNC_QUERY_VIEW (view); GtkTreeViewColumn *col; GtkTreeSelection *selection; GList *renderers; GtkCellRenderer *cr0; gboolean inv_sort = FALSE; if (view->view_type == RECLIST_CREDIT) inv_sort = TRUE; /* Construct the view */ gnc_query_view_construct (qview, view->column_list, query); gnc_query_view_set_numerics (qview, TRUE, inv_sort); /* Set the description field to have spare space, REC_DESC -1 to allow for the pointer model column at 0 */ col = gtk_tree_view_get_column (GTK_TREE_VIEW (qview), (REC_DESC - 1)); gtk_tree_view_column_set_expand (col, TRUE); /* Get the renderer of the description column and set ellipsize value */ renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (col)); cr0 = g_list_nth_data (renderers, 0); g_list_free (renderers); g_object_set (cr0, "ellipsize", PANGO_ELLIPSIZE_END, NULL ); gtk_widget_set_has_tooltip (GTK_WIDGET (qview), TRUE); /* Set the selection method */ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (qview)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE); /* Now set up the signals for the QueryView */ g_signal_connect (G_OBJECT (qview), "column_toggled", G_CALLBACK (gnc_reconcile_view_line_toggled), view); g_signal_connect (G_OBJECT (qview), "double_click_entry", G_CALLBACK (gnc_reconcile_view_double_click_entry), view); g_signal_connect (G_OBJECT (qview), "row_selected", G_CALLBACK (gnc_reconcile_view_row_selected), view); g_signal_connect (G_OBJECT (qview), "key_press_event", G_CALLBACK (gnc_reconcile_view_key_press_cb), view); g_signal_connect (G_OBJECT (qview), "query-tooltip", G_CALLBACK (gnc_reconcile_view_tooltip_cb), view); }