static GList * gnc_search_param_prepend_internal (GList *list, char const *title, GtkJustification justify, GNCIdTypeConst type_override, GNCIdTypeConst search_type, const char *param, va_list args) { GNCSearchParam *p; GSList *path = NULL; const char *this_param; p = gnc_search_param_new (); gnc_search_param_set_title (p, title); gnc_search_param_set_justify (p, justify); for (this_param = param; this_param; this_param = va_arg (args, const char *)) { path = g_slist_prepend (path, (gpointer)this_param); } /* put the path into the right order, and set it */ path = g_slist_reverse (path); gnc_search_param_set_param_path (p, search_type, path); /* Maybe over-ride the type */ if (type_override) gnc_search_param_override_param_type (p, type_override); /* And return it */ return g_list_prepend (list, p); }
static void gnc_reconcile_view_init (GNCReconcileView *view) { GNCSearchParamSimple *param; GList *columns = NULL; gboolean num_action = qof_book_use_split_action_for_num_field(gnc_get_current_book()); view->reconciled = g_hash_table_new (NULL, NULL); view->account = NULL; view->sibling = NULL; param = gnc_search_param_simple_new(); gnc_search_param_set_param_fcn (param, QOF_TYPE_BOOLEAN, gnc_reconcile_view_is_reconciled, view); gnc_search_param_set_title ((GNCSearchParam *) param, _("Reconciled:R") + 11); gnc_search_param_set_justify ((GNCSearchParam *) param, GTK_JUSTIFY_CENTER); gnc_search_param_set_passive ((GNCSearchParam *) param, FALSE); gnc_search_param_set_non_resizeable ((GNCSearchParam *) param, TRUE); columns = g_list_prepend (columns, param); columns = gnc_search_param_prepend_with_justify (columns, _("Amount"), GTK_JUSTIFY_RIGHT, NULL, GNC_ID_SPLIT, SPLIT_AMOUNT, NULL); columns = gnc_search_param_prepend (columns, _("Description"), NULL, GNC_ID_SPLIT, SPLIT_TRANS, TRANS_DESCRIPTION, NULL); columns = num_action ? gnc_search_param_prepend_with_justify (columns, _("Num"), GTK_JUSTIFY_CENTER, NULL, GNC_ID_SPLIT, SPLIT_ACTION, NULL) : gnc_search_param_prepend_with_justify (columns, _("Num"), GTK_JUSTIFY_CENTER, NULL, GNC_ID_SPLIT, SPLIT_TRANS, TRANS_NUM, NULL); columns = gnc_search_param_prepend (columns, _("Date"), NULL, GNC_ID_SPLIT, SPLIT_TRANS, TRANS_DATE_POSTED, NULL); view->column_list = columns; }