Merge branch 'maint'

This commit is contained in:
Christopher Lam
2021-03-12 23:14:51 +08:00
207 changed files with 72832 additions and 73010 deletions

View File

@@ -421,6 +421,7 @@ void qof_book_set_string_option(QofBook* book, const char* opt_name, const char*
SET_ENUM("PRICE-SOURCE-USER-PRICE");
SET_ENUM("PRICE-SOURCE-XFER-DLG-VAL");
SET_ENUM("PRICE-SOURCE-SPLIT-REG");
SET_ENUM("PRICE-SOURCE-SPLIT-IMPORT");
SET_ENUM("PRICE-SOURCE-STOCK-SPLIT");
SET_ENUM("PRICE-SOURCE-TEMP");
SET_ENUM("PRICE-SOURCE-INVALID");

View File

@@ -87,7 +87,7 @@ of a security, which makes it easy to see which online sources your \
securities use. Click the triangle at the far right of the column \
headings to change the display.")
N_( "You can pack multiple reports into a single window, \
N_( "You can pack multiple reports into a single window, \
providing all the financial information you want at a glance. \
To do so, use the Sample & Custom->\"Custom Multicolumn Report\" \
report.")

View File

@@ -398,7 +398,6 @@ create_children (GNCGeneralSearch *gsl,
completion = gtk_entry_completion_new();
gtk_entry_completion_set_model(completion, GTK_TREE_MODEL(list_store));
gtk_entry_completion_set_text_column(completion, 0);
gtk_entry_completion_set_inline_completion(completion, TRUE);
gtk_entry_set_completion(GTK_ENTRY(gsl->entry), completion);
g_signal_connect (G_OBJECT (completion), "match_selected",

View File

@@ -25,6 +25,7 @@
#include <config.h>
#endif
#include <stdint.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
@@ -159,7 +160,7 @@ toggle_changed (GtkToggleButton *button, GNCSearchReconciled *fe)
{
gboolean is_on = gtk_toggle_button_get_active (button);
cleared_match_t value =
(cleared_match_t) g_object_get_data (G_OBJECT (button), "button-value");
(cleared_match_t) ((uint64_t)g_object_get_data (G_OBJECT (button), "button-value") & 0xffffffff); // Binary mask to silence void-pointer-to-enum-cast warning.
if (is_on)
fe->value |= value;

View File

@@ -398,7 +398,10 @@ gnc_option_set_ui_value_internal (GNCOption *option, gboolean use_default)
{
bad_value = option_def->set_value (option, use_default, widget, value);
if (bad_value)
PERR("bad value\n");
PERR("option '%s' bad value '%s'\n",
gnc_option_name (option),
scm_to_locale_string (scm_object_to_string
(value, scm_c_eval_string ("write"))));
}
else
PERR("Unknown type. Ignoring.\n");

View File

@@ -105,15 +105,15 @@ static gboolean autosave_confirm(GtkWidget *toplevel)
(GTK_MESSAGE_DIALOG(dialog),
ngettext("Your data file needs to be saved to your hard disk to save your changes. "
"GnuCash has a feature to save the file automatically every %d minute, "
"just as if you had pressed the \"Save\" button each time. \n\n"
"just as if you had pressed the \"Save\" button each time.\n\n"
"You can change the time interval or turn off this feature under "
"Edit->Preferences->General->Auto-save time interval. \n\n"
"Edit->Preferences->General->Auto-save time interval.\n\n"
"Should your file be saved automatically?",
"Your data file needs to be saved to your hard disk to save your changes. "
"GnuCash has a feature to save the file automatically every %d minutes, "
"just as if you had pressed the \"Save\" button each time. \n\n"
"just as if you had pressed the \"Save\" button each time.\n\n"
"You can change the time interval or turn off this feature under "
"Edit->Preferences->General->Auto-save time interval. \n\n"
"Edit->Preferences->General->Auto-save time interval.\n\n"
"Should your file be saved automatically?",
interval_mins),
interval_mins);

View File

@@ -504,7 +504,7 @@ show_session_error (GtkWindow *parent,
case ERR_SQL_DB_BUSY:
fmt = _("The SQL database is in use by other users, "
"and the upgrade cannot be performed until they logoff. "
"If there are currently no other users, consult the "
"If there are currently no other users, consult the "
"documentation to learn how to clear out dangling login "
"sessions.");
gnc_error_dialog (parent, "%s", fmt);
@@ -1688,7 +1688,7 @@ gnc_file_revert (GtkWindow *parent)
{
QofSession *session;
const gchar *fileurl, *filename, *tmp;
const gchar *title = _("Reverting will discard all unsaved changes to %s. Are you sure you want to proceed ?");
const gchar *title = _("Reverting will discard all unsaved changes to %s. Are you sure you want to proceed?");
if (!gnc_main_window_all_finish_pending())
return;

View File

@@ -178,7 +178,6 @@ gnc_cbwe_add_completion (GtkComboBox *cbwe)
model = gtk_combo_box_get_model(GTK_COMBO_BOX(cbwe));
gtk_entry_completion_set_model(completion, model);
gtk_entry_completion_set_text_column(completion, 0);
gtk_entry_completion_set_inline_completion(completion, TRUE);
gtk_entry_set_completion(entry, completion);
g_object_unref(completion);
}

View File

@@ -87,6 +87,8 @@ gnc_load_app_icons (void)
PINFO ("Path %i: %s", i, path[i]);
}
g_strfreev (path);
for (i = 0; icon_files[i]; i++)
{
gchar *file = icon_files[i];

View File

@@ -924,7 +924,8 @@ cleanup:
if (error)
g_error_free(error);
g_free(window_group);
gtk_widget_show(GTK_WIDGET(window));
if (window)
gtk_widget_show (GTK_WIDGET(window));
}
void
@@ -1405,12 +1406,26 @@ gnc_main_window_quit(GncMainWindow *window)
}
if (do_shutdown)
{
GList *w;
GList *w, *next;
for (w = active_windows; w; w = g_list_next (w))
/* This is not a typical list iteration. There is a possability
* that the window maybe removed from the active_windows list so
* we have to cache the 'next' pointer before executing any code
* in the loop. */
for (w = active_windows; w; w = next)
{
window = w->data;
window->window_quitting = TRUE; // set window_quitting on all windows
GncMainWindowPrivate *priv;
GncMainWindow *wind = w->data;
next = g_list_next (w);
wind->window_quitting = TRUE; // set window_quitting on all windows
priv = GNC_MAIN_WINDOW_GET_PRIVATE(wind);
// if there are no pages destroy window
if (priv->installed_pages == NULL)
gtk_widget_destroy (GTK_WIDGET(wind));
}
/* remove the preference callbacks from the main window */
gnc_main_window_remove_prefs (window);
@@ -1522,6 +1537,10 @@ gnc_main_window_event_handler (QofInstance *entity, QofEventId event_type,
if (gnc_plugin_page_has_book (page, (QofBook *)entity))
gnc_main_window_close_page (page);
}
if (GTK_IS_WIDGET(window) && window->window_quitting)
gtk_widget_destroy (GTK_WIDGET(window));
LEAVE(" ");
}
@@ -1718,40 +1737,41 @@ static gchar *generate_statusbar_lastmodified_message()
{
if (gnc_uri_targets_local_fs (uri))
{
#ifdef HAVE_SYS_STAT_H
/* The filename is a true file. */
gchar *filepath = gnc_uri_get_path ( uri );
gchar *filename = g_path_get_basename ( filepath );
GFile *file = g_file_new_for_uri (uri);
GFileInfo *info = g_file_query_info (file,
G_FILE_ATTRIBUTE_TIME_MODIFIED,
G_FILE_QUERY_INFO_NONE,
NULL, NULL);
if (info && g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_TIME_MODIFIED))
{
// Access the mtime information through stat(2)
struct stat statbuf;
int r = stat(filepath, &statbuf);
if (r == 0)
{
/* Translators: This is the date and time that is shown in
the status bar after opening a file: The date and time of
last modification. The string is a format string using
boost::date_time's format flags, see the boost docs for an
explanation of the modifiers. */
char *time_string = gnc_print_time64(statbuf.st_mtime,
_("Last modified on %a, %b %d, %Y at %I:%M %p"));
//g_warning("got time %ld, str=%s\n", mtime, time_string);
/* Translators: This message appears in the status bar after opening the file. */
message = g_strdup_printf(_("File %s opened. %s"),
filename, time_string);
free(time_string);
}
else
{
g_warning("Unable to read mtime for file %s\n", filepath);
// message is still NULL
}
guint64 modtime = g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED);
/* Translators: This is the date and time that is shown in
the status bar after opening a file: The date and time of
last modification. The string is a format string using
boost::date_time's format flags, see the boost docs for an
explanation of the modifiers. */
char *time_string = gnc_print_time64 (modtime,
_("Last modified on %a, %b %d, %Y at %I:%M %p"));
//g_warning("got time %ld, str=%s\n", mtime, time_string);
/* Translators: This message appears in the status bar after opening the file. */
message = g_strdup_printf(_("File %s opened. %s"),
filename, time_string);
free(time_string);
}
else
{
g_warning("Unable to read mtime for file %s\n", filepath);
// message is still NULL
}
g_free(filename);
g_free(filepath);
#else
return NULL;
#endif
g_object_unref (info);
g_object_unref (file);
}
// If the URI is not a file but a database, we can maybe also show
// something useful, but I have no idea how to obtain this information.
@@ -3322,14 +3342,9 @@ gnc_main_window_close_page (GncPluginPage *page)
/* remove the preference callbacks from the main window */
gnc_main_window_remove_prefs (window);
gtk_widget_destroy (GTK_WIDGET(window));
window = NULL;
}
if (window && g_list_length (active_windows) > 1)
{
gtk_widget_destroy (GTK_WIDGET(window));
}
}
}

View File

@@ -517,20 +517,15 @@ GList *
gnc_recurrence_comp_get_list(GncRecurrenceComp *grc)
{
GList *rlist = NULL, *children;
gint i;
children = gtk_container_get_children(GTK_CONTAINER(grc->vbox));
for (i = 0; i < g_list_length(children); i++)
for (GList *n = children; n; n = n->next)
{
GncRecurrence *gr;
const Recurrence *r;
gr = GNC_RECURRENCE(g_list_nth_data(children, i));
r = gnc_recurrence_get(gr);
rlist = g_list_append(rlist, (gpointer)r);
const Recurrence *r = gnc_recurrence_get (GNC_RECURRENCE (n->data));
rlist = g_list_prepend (rlist, (gpointer)r);
}
g_list_free(children);
return rlist;
return g_list_reverse (rlist);
}

View File

@@ -192,11 +192,10 @@ gsidca_get_contained(GncDenseCalModel *model)
{
GncSxInstances *sx_instances = (GncSxInstances*)sxes->data;
if (xaccSchedXactionGetEnabled(sx_instances->sx))
{
list = g_list_append(list, GUINT_TO_POINTER(GPOINTER_TO_UINT(sx_instances->sx)));
}
list = g_list_prepend (list, GUINT_TO_POINTER
(GPOINTER_TO_UINT (sx_instances->sx)));
}
return list;
return g_list_reverse (list);
}
static gchar*

View File

@@ -624,32 +624,21 @@ gnc_tree_model_split_reg_load (GncTreeModelSplitReg *model, GList *slist, Accoun
if (model->current_trans == NULL)
model->current_trans = priv->btrans;
/* Get a list of Unique Transactions from an slist */
priv->full_tlist = xaccSplitListGetUniqueTransactionsReversed (slist);
/* Add the blank transaction to the full_tlist */
priv->full_tlist = g_list_prepend (priv->full_tlist, priv->btrans);
if (model->sort_direction == GTK_SORT_ASCENDING)
{
/* Get a list of Unique Transactions from an slist */
priv->full_tlist = xaccSplitListGetUniqueTransactions (slist);
/* Add the blank transaction to the full_tlist */
priv->full_tlist = g_list_append (priv->full_tlist, priv->btrans);
}
else
{
/* Get a list of Unique Transactions from an slist */
priv->full_tlist = xaccSplitListGetUniqueTransactions (slist);
/* Add the blank transaction to the full_tlist */
priv->full_tlist = g_list_append (priv->full_tlist, priv->btrans);
/* Reverse the full_tlist */
priv->full_tlist = g_list_reverse (priv->full_tlist);
}
// Update the scrollbar
gnc_tree_model_split_reg_sync_scrollbar (model);
model->number_of_trans_in_full_tlist = g_list_length (priv->full_tlist);
if (g_list_length (priv->full_tlist) < NUM_OF_TRANS*3)
if (model->number_of_trans_in_full_tlist < NUM_OF_TRANS*3)
{
// Copy the full_tlist to tlist
priv->tlist = g_list_copy (priv->full_tlist);
@@ -658,8 +647,11 @@ gnc_tree_model_split_reg_load (GncTreeModelSplitReg *model, GList *slist, Accoun
{
if (model->position_of_trans_in_full_tlist < (NUM_OF_TRANS*3))
gtm_sr_reg_load (model, VIEW_HOME, NUM_OF_TRANS*3);
else if (model->position_of_trans_in_full_tlist > g_list_length (priv->full_tlist) - (NUM_OF_TRANS*3))
else if (model->position_of_trans_in_full_tlist >
model->number_of_trans_in_full_tlist - (NUM_OF_TRANS*3))
gtm_sr_reg_load (model, VIEW_END, NUM_OF_TRANS*3);
else
gtm_sr_reg_load (model, VIEW_GOTO, model->position_of_trans_in_full_tlist);
}

View File

@@ -1557,7 +1557,7 @@ get_selected_accounts_helper (GtkTreeModel *s_model,
/* Only selected if it passes the filter */
if (gtvsi->priv->filter_fn == NULL || gtvsi->priv->filter_fn(account, gtvsi->priv->filter_data))
{
gtvsi->return_list = g_list_append(gtvsi->return_list, account);
gtvsi->return_list = g_list_prepend (gtvsi->return_list, account);
}
}
@@ -1580,6 +1580,7 @@ gnc_tree_view_account_get_selected_accounts (GncTreeViewAccount *view)
info.priv = GNC_TREE_VIEW_ACCOUNT_GET_PRIVATE(view);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(view));
gtk_tree_selection_selected_foreach(selection, get_selected_accounts_helper, &info);
info.return_list = g_list_reverse (info.return_list);
return info.return_list;
}

View File

@@ -246,7 +246,7 @@ static ColDef all_tree_view_split_reg_columns[] = {
struct GncTreeViewSplitRegPrivate
{
gboolean disposed;
Account *anchor; // The register default Account
gnc_commodity *reg_comm; // The register commodity (which may be a non-currency)
gnc_commodity *reg_currency; // The currency for txns in this register (guaranteed to be a currency)
@@ -714,7 +714,7 @@ gnc_tree_view_split_reg_set_cols (GncTreeViewSplitReg *view,
GNC_TREE_VIEW (view), def.title, def.pref_name, NULL, def.sizer,
def.modelcol, def.visibility_model_col, def.sort_fn);
} else if (col_list[i] == COL_NUMACT) {
} else if (col_list[i] == COL_NUMACT) {
col = gnc_tree_view_add_combo_column (
GNC_TREE_VIEW (view), def.title, def.pref_name, def.sizer,
def.modelcol, def.visibility_model_col,
@@ -737,11 +737,11 @@ gnc_tree_view_split_reg_set_cols (GncTreeViewSplitReg *view,
g_object_set_data (G_OBJECT (cr1), "view_column", GINT_TO_POINTER (def.viewcol));
gtk_tree_view_column_set_cell_data_func (col, cr1, gtv_sr_cdf1, view, NULL);
} else {
} else {
col = gnc_tree_view_add_text_column (
GNC_TREE_VIEW (view), def.title, def.pref_name, NULL, def.sizer,
def.modelcol, def.visibility_model_col, def.sort_fn);
}
}
g_object_set_data (G_OBJECT (col), DEFAULT_VISIBLE, GINT_TO_POINTER (1));
g_object_set_data (G_OBJECT (col), ALWAYS_VISIBLE, GINT_TO_POINTER (def.always_visible_col));
@@ -1244,7 +1244,7 @@ gtv_sr_get_imbalance (Transaction *trans)
int i;
Split *split = NULL;
const gchar *acc_name;
const gchar *prefix = _("Imbalance");
const gchar *prefix = _("Imbalance");
for (i = 0; (split = xaccTransGetSplit (trans, i)); i++)
{
@@ -1484,6 +1484,9 @@ gtv_sr_cdf0 (GtkTreeViewColumn *col, GtkCellRenderer *cell, GtkTreeModel *s_mode
/* Is this a template */
if (is_template && is_trow1)
{
/* Todo: Rethink the restriction. Greek message is "Προγραμματισμένη" */
/* Translators: currently max 34 (ASCII) chars (= 17 or 8 UTF-8 chars depending on the block)
See "MAX_DATE_LENGTH" in https://code.gnucash.org/docs/MAINT/group__Date.html */
strncpy (datebuff, _(" Scheduled "), MAX_DATE_LENGTH);
editable = FALSE;
}
@@ -2463,7 +2466,7 @@ gtv_sr_remove_edit_date (GtkCellEditable *ce, gpointer user_data)
{
GncTreeViewSplitReg *view = GNC_TREE_VIEW_SPLIT_REG (user_data);
GncPopupEntry *popup_entry;
const gchar *new_string;
const gchar *new_string;
const gchar *current_string;
GDate date;
gchar *date_string;
@@ -2512,8 +2515,8 @@ static void
gtv_sr_remove_edit_combo (GtkCellEditable *ce, gpointer user_data)
{
GncTreeViewSplitReg *view = GNC_TREE_VIEW_SPLIT_REG (user_data);
GtkEntry *entry;
const gchar *new_string;
GtkEntry *entry;
const gchar *new_string;
const gchar *current_string;
ENTER("remove edit combo and temp cell rend %p", view->priv->temp_cr);
@@ -2549,8 +2552,8 @@ static void
gtv_sr_remove_edit_entry (GtkCellEditable *ce, gpointer user_data)
{
GncTreeViewSplitReg *view = GNC_TREE_VIEW_SPLIT_REG (user_data);
const gchar *new_string;
const gchar *current_string;
const gchar *new_string;
const gchar *current_string;
ENTER("remove edit entry and temp cell rend %p", view->priv->temp_cr);
@@ -4094,7 +4097,7 @@ gtv_sr_motion_cb (GtkTreeSelection *sel, gpointer user_data)
if (depth != view->priv->current_depth)
gtv_sr_titles (view, depth);
/* Move the blank split */
/* Move the blank split */
gnc_tree_model_split_reg_set_blank_split_parent (model, trans, FALSE);
/* Save trans / split / depth to the current values */
@@ -4168,7 +4171,7 @@ gtv_sr_motion_cb (GtkTreeSelection *sel, gpointer user_data)
/* We do not have a valid iter */
gtv_sr_titles (view, 0);
/* Move the blank split to the last transaction */
/* Move the blank split to the last transaction */
gnc_tree_model_split_reg_set_blank_split_parent (model, NULL, FALSE);
/* Set the default selection start position */
@@ -4359,7 +4362,7 @@ gtv_sr_edited_normal_cb (GtkCellRendererText *cell, const gchar *path_string,
rec = recn_flags[index];
}
}
if (is_trow1)
if (is_trow1)
xaccSplitSetReconcile (gtv_sr_get_this_split (view, trans), rec);
if (is_split)
xaccSplitSetReconcile (split, rec);
@@ -5771,7 +5774,7 @@ gtv_sr_editing_canceled_cb (GtkCellRenderer *cr, gpointer user_data)
g_signal_emit_by_name (view, "help_signal", NULL);
//Set edit-canceled property
g_object_set_data (G_OBJECT (cr), "edit-canceled", GINT_TO_POINTER (TRUE));
g_object_set_data (G_OBJECT (cr), "edit-canceled", GINT_TO_POINTER (TRUE));
}
/*####################################################################

View File

@@ -432,14 +432,7 @@ gnc_main_window_summary_refresh (GNCMainSummary * summary)
gtk_combo_box_set_active(GTK_COMBO_BOX(summary->totals_combo), 0);
}
/* Free the list we created for this */
for (current = g_list_first(currency_list);
current;
current = g_list_next(current))
{
g_free(current->data);
}
g_list_free(currency_list);
g_list_free_full (currency_list, g_free);
}
static gchar*

View File

@@ -368,8 +368,8 @@ ap_assistant_book_prepare (GtkAssistant *assistant, gpointer user_data)
/* Translators: Run the assistant in your language to see GTK's translation of the button labels. */
_("You have asked for a book to be created. This book "
"will contain all transactions up to midnight %s "
"(for a total of %d transactions spread over %d accounts).\n\n "
"Amend the Title and Notes or Click on \"Next\" to proceed.\n "
"(for a total of %d transactions spread over %d accounts).\n\n"
"Amend the Title and Notes or Click on \"Next\" to proceed.\n"
"Click on \"Back\" to adjust the dates or \"Cancel\".");
str = g_strdup_printf (period_text, close_date_str, ntrans, nacc);
gtk_label_set_text (GTK_LABEL(info->book_details), str);

View File

@@ -3014,13 +3014,15 @@ loan_create_sxes( LoanAssistantData *ldd )
g_string_free( gstr, TRUE );
gstr = NULL;
repaySXes = g_list_append( repaySXes, tcSX );
repaySXes = g_list_prepend (repaySXes, tcSX);
}
/* repayment */
ld_setup_repayment_sx( ldd, rod, paymentSX, tcSX );
}
repaySXes = g_list_reverse (repaySXes);
/* Create the SXes */
{
GList *l;

View File

@@ -50,7 +50,7 @@ typedef struct
Account *account;
GtkWidget *view;
GtkWidget *radio_hbox;
GtkWidget *radio_frame;
GtkWidget *radio_root;
GtkWidget *radio_subroot;
@@ -69,6 +69,18 @@ static QofLogModule log_module = GNC_MOD_GUI;
static void close_handler (gpointer user_data);
static gboolean
gnc_find_account_dialog_window_delete_event_cb (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
FindAccountDialog *facc_dialog = user_data;
// this cb allows the window size to be saved on closing with the X
gnc_save_window_size (GNC_PREFS_GROUP,
GTK_WINDOW(facc_dialog->window));
return FALSE;
}
static void
gnc_find_account_dialog_window_destroy_cb (GtkWidget *object, gpointer user_data)
{
@@ -88,8 +100,6 @@ gnc_find_account_dialog_window_destroy_cb (GtkWidget *object, gpointer user_data
if (facc_dialog->window)
{
gnc_save_window_size (GNC_PREFS_GROUP,
GTK_WINDOW(facc_dialog->window));
gtk_widget_destroy (facc_dialog->window);
facc_dialog->window = NULL;
}
@@ -98,7 +108,9 @@ gnc_find_account_dialog_window_destroy_cb (GtkWidget *object, gpointer user_data
}
static gboolean
gnc_find_account_dialog_window_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer user_data)
gnc_find_account_dialog_window_key_press_cb (GtkWidget *widget,
GdkEventKey *event,
gpointer user_data)
{
FindAccountDialog *facc_dialog = user_data;
@@ -263,6 +275,12 @@ get_account_info (FindAccountDialog *facc_dialog, gboolean use_saved_filter)
gtk_tree_view_columns_autosize (GTK_TREE_VIEW(facc_dialog->view));
}
static void
list_type_selected_cb (GtkToggleButton* button, FindAccountDialog *facc_dialog)
{
get_account_info (facc_dialog, FALSE);
}
static void
filter_button_cb (GtkButton *button, FindAccountDialog *facc_dialog)
{
@@ -348,19 +366,22 @@ gnc_find_account_dialog_create (GtkWidget *parent, FindAccountDialog *facc_dialo
facc_dialog->radio_root = GTK_WIDGET(gtk_builder_get_object (builder, "radio-root"));
facc_dialog->radio_subroot = GTK_WIDGET(gtk_builder_get_object (builder, "radio-subroot"));
g_signal_connect (facc_dialog->radio_root, "toggled",
G_CALLBACK(list_type_selected_cb), (gpointer)facc_dialog);
facc_dialog->filter_text_entry = GTK_WIDGET(gtk_builder_get_object (builder, "filter-text-entry"));
facc_dialog->sub_label = GTK_WIDGET(gtk_builder_get_object (builder, "sub-label"));
facc_dialog->radio_hbox = GTK_WIDGET(gtk_builder_get_object (builder, "hbox-radio"));
facc_dialog->radio_frame = GTK_WIDGET(gtk_builder_get_object (builder, "frame-radio"));
facc_dialog->filter_button = GTK_WIDGET(gtk_builder_get_object (builder, "filter-button"));
g_signal_connect (facc_dialog->filter_button, "clicked",
G_CALLBACK(filter_button_cb), (gpointer)facc_dialog);
button = GTK_WIDGET(gtk_builder_get_object (builder, "jumpto_button"));
g_signal_connect(button, "clicked", G_CALLBACK(gnc_find_account_dialog_jump_button_cb), facc_dialog);
g_signal_connect(button, "clicked", G_CALLBACK(gnc_find_account_dialog_jump_button_cb), facc_dialog);
button = GTK_WIDGET(gtk_builder_get_object (builder, "check_button"));
g_signal_connect(button, "clicked", G_CALLBACK(gnc_find_account_dialog_check_button_cb), facc_dialog);
g_signal_connect(button, "clicked", G_CALLBACK(gnc_find_account_dialog_check_button_cb), facc_dialog);
button = GTK_WIDGET(gtk_builder_get_object (builder, "close_button"));
g_signal_connect(button, "clicked", G_CALLBACK(gnc_find_account_dialog_close_button_cb), facc_dialog);
g_signal_connect(button, "clicked", G_CALLBACK(gnc_find_account_dialog_close_button_cb), facc_dialog);
facc_dialog->view = GTK_WIDGET(gtk_builder_get_object (builder, "treeview"));
g_signal_connect (facc_dialog->view, "row-activated",
@@ -431,6 +452,9 @@ gnc_find_account_dialog_create (GtkWidget *parent, FindAccountDialog *facc_dialo
g_signal_connect (facc_dialog->window, "destroy",
G_CALLBACK(gnc_find_account_dialog_window_destroy_cb), facc_dialog);
g_signal_connect (facc_dialog->window, "delete-event",
G_CALLBACK(gnc_find_account_dialog_window_delete_event_cb), facc_dialog);
g_signal_connect (facc_dialog->window, "key_press_event",
G_CALLBACK(gnc_find_account_dialog_window_key_press_cb), facc_dialog);
@@ -444,19 +468,21 @@ gnc_find_account_dialog_create (GtkWidget *parent, FindAccountDialog *facc_dialo
if (facc_dialog->account != NULL)
{
const gchar *sub_label_start = _("Search from ");
gchar *sub_full_name = gnc_account_get_full_name (facc_dialog->account);
gchar *sub_label;
/* Translators: %s is a full account name.
This is a label in Search Account from context menu. */
gchar *sub_label = g_strdup_printf (_("Su_b-accounts of '%s'"),
sub_full_name);
sub_label = g_strconcat (sub_label_start, sub_full_name, NULL);
gtk_button_set_label (GTK_BUTTON(facc_dialog->radio_subroot), sub_label);
g_free (sub_full_name);
g_free (sub_label);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(facc_dialog->radio_subroot), TRUE);
}
else
gtk_widget_hide (facc_dialog->radio_hbox);
gtk_widget_hide (facc_dialog->radio_frame);
// Set the filter to Wildcard
gtk_entry_set_text (GTK_ENTRY(facc_dialog->filter_text_entry), "");
@@ -475,6 +501,8 @@ close_handler (gpointer user_data)
FindAccountDialog *facc_dialog = user_data;
ENTER(" ");
gnc_save_window_size (GNC_PREFS_GROUP,
GTK_WINDOW(facc_dialog->window));
gtk_widget_destroy (GTK_WIDGET(facc_dialog->window));
LEAVE(" ");
}

View File

@@ -308,7 +308,7 @@ find_invalid_mappings (GtkTreeModel *model, GtkTreePath *path,
if (((g_strcmp0 (head, "online_id") == 0) && (depth == 1)) || (depth == 2))
{
GtkTreeRowReference *rowref = gtk_tree_row_reference_new (model, path);
*rowref_list = g_list_append (*rowref_list, rowref);
*rowref_list = g_list_prepend (*rowref_list, rowref);
}
}
g_free (head);
@@ -325,9 +325,6 @@ gnc_imap_remove_invalid_maps (ImapDialog *imap_dialog)
(GtkTreeModelForeachFunc)find_invalid_mappings,
&rr_list);
// reverse the reference list
rr_list = g_list_reverse (rr_list);
// Suspend GUI refreshing
gnc_suspend_gui_refresh();

View File

@@ -228,12 +228,13 @@ lv_show_splits_free (GNCLotViewer *lv)
Split *split = node->data;
if (NULL == xaccSplitGetLot(split))
{
filtered_list = g_list_append(filtered_list, split);
filtered_list = g_list_prepend (filtered_list, split);
}
}
/* display list */
gnc_split_viewer_fill(lv, lv->split_free_store, filtered_list);
gnc_split_viewer_fill(lv, lv->split_free_store, g_list_reverse (filtered_list));
g_list_free (filtered_list);
}
/* ======================================================================== */
@@ -754,7 +755,7 @@ lv_response_cb (GtkDialog *dialog, gint response, gpointer data)
case RESPONSE_VIEW:
if (NULL == lot)
return;
printf ("UNIMPLEMENTED: need to display register showing only this one lot \n");
printf ("UNIMPLEMENTED: need to display register showing only this one lot.\n");
break;
case RESPONSE_DELETE:

View File

@@ -1708,7 +1708,7 @@ static GList *select_txn_lots (GtkWindow *parent, Transaction *txn, Account **po
GTK_BUTTONS_CANCEL,
_("The transaction has at least one split in a business account that is not part of a business transaction.\n"
"If you continue these splits will be ignored:\n\n%s\n"
"Do you wish to continue and ignore these splits ?"),
"Do you wish to continue and ignore these splits?"),
split_str);
gtk_dialog_add_buttons (GTK_DIALOG(dialog),
_("Continue"), GTK_BUTTONS_OK, NULL);

View File

@@ -454,7 +454,7 @@ gnc_prices_dialog_remove_old_clicked (GtkWidget *widget, gpointer data)
result = gtk_dialog_run (GTK_DIALOG (pdb_dialog->remove_dialog));
if (result == GTK_RESPONSE_OK)
{
const char *fmt = _("Are you sure you want to delete these prices ?");
const char *fmt = _("Are you sure you want to delete these prices?");
GList *comm_list = gnc_prices_dialog_get_commodities (pdb_dialog->remove_view);
// Are you sure you want to delete the entries and we have commodities

View File

@@ -1629,7 +1629,7 @@ gnc_budget_view_refresh (GncBudgetView *budget_view)
if (col != NULL)
{
gtk_tree_view_append_column (priv->totals_tree_view, col);
totals_col_list = g_list_append (totals_col_list, col);
totals_col_list = g_list_prepend (totals_col_list, col);
}
num_periods_visible = g_list_length (col_list);
@@ -1639,7 +1639,7 @@ gnc_budget_view_refresh (GncBudgetView *budget_view)
gdk_rgba_free (note_color_selected);
priv->period_col_list = col_list;
priv->totals_col_list = totals_col_list;
priv->totals_col_list = g_list_reverse (totals_col_list);
if (priv->total_col == NULL)
{

View File

@@ -3722,7 +3722,7 @@ gnc_plugin_page_register_cmd_print_check (GtkAction* action,
{
if (xaccSplitGetAccount (split) == account)
{
splits = g_list_append (splits, split);
splits = g_list_prepend (splits, split);
gnc_ui_print_check_dialog_create (window, splits);
g_list_free (splits);
}
@@ -3733,7 +3733,7 @@ gnc_plugin_page_register_cmd_print_check (GtkAction* action,
split = gnc_split_register_get_current_trans_split (reg, NULL);
if (split)
{
splits = g_list_append (splits, split);
splits = g_list_prepend (splits, split);
gnc_ui_print_check_dialog_create (window, splits);
g_list_free (splits);
}
@@ -3785,6 +3785,7 @@ gnc_plugin_page_register_cmd_print_check (GtkAction* action,
}
}
gnc_ui_print_check_dialog_create (window, splits);
g_list_free (splits);
}
else
{
@@ -5349,24 +5350,26 @@ gppr_account_destroy_cb (Account* account)
ledger_type = gnc_ledger_display_type (priv->ledger);
if (ledger_type == LD_GL)
{
kill = g_list_append (kill, page);
kill = g_list_prepend (kill, page);
/* kill it */
}
else if ((ledger_type == LD_SINGLE) || (ledger_type == LD_SUBACCOUNT))
{
if (guid_compare (acct_guid, &priv->key) == 0)
{
kill = g_list_append (kill, page);
kill = g_list_prepend (kill, page);
}
}
}
kill = g_list_reverse (kill);
/* Now kill them. */
for (item = kill; item; item = g_list_next (item))
{
page = (GncPluginPageRegister*)item->data;
gnc_main_window_close_page (GNC_PLUGIN_PAGE (page));
}
g_list_free (kill);
}
/** This function is the handler for all event messages from the

View File

@@ -2614,7 +2614,7 @@ gnc_plugin_page_register2_cmd_print_check (GtkAction *action,
{
if (xaccSplitGetAccount(split) == account)
{
splits = g_list_append(splits, split);
splits = g_list_prepend (splits, split);
gnc_ui_print_check_dialog_create (window, splits);
g_list_free(splits);
}
@@ -2625,7 +2625,7 @@ gnc_plugin_page_register2_cmd_print_check (GtkAction *action,
split = gnc_tree_model_split_reg_trans_get_split_equal_to_ancestor(trans, account);
if (split)
{
splits = g_list_append(splits, split);
splits = g_list_prepend (splits, split);
gnc_ui_print_check_dialog_create (window, splits);
g_list_free(splits);
}
@@ -2677,6 +2677,7 @@ gnc_plugin_page_register2_cmd_print_check (GtkAction *action,
}
}
gnc_ui_print_check_dialog_create (window, splits);
g_list_free (splits);
}
else
{
@@ -4008,24 +4009,26 @@ gppr_account_destroy_cb (Account *account)
ledger_type = gnc_ledger_display2_type (priv->ledger);
if (ledger_type == LD2_GL)
{
kill = g_list_append(kill, page);
kill = g_list_prepend (kill, page);
/* kill it */
}
else if ((ledger_type == LD2_SINGLE) || (ledger_type == LD2_SUBACCOUNT))
{
if (guid_compare(acct_guid, &priv->key) == 0)
{
kill = g_list_append(kill, page);
kill = g_list_prepend (kill, page);
}
}
}
kill = g_list_reverse (kill);
/* Now kill them. */
for (item = kill; item; item = g_list_next(item))
{
page = (GncPluginPageRegister2 *)item->data;
gnc_main_window_close_page(GNC_PLUGIN_PAGE(page));
}
g_list_free (kill);
}
/** This function is the handler for all event messages from the

View File

@@ -38,6 +38,9 @@ extern "C" {
#include <boost/locale.hpp>
#include <boost/optional.hpp>
#ifdef __MINGW32__
#include <boost/nowide/args.hpp>
#endif
#include <iostream>
namespace bl = boost::locale;
@@ -195,7 +198,9 @@ int
main(int argc, char **argv)
{
Gnucash::GnucashCli application (argv[0]);
#ifdef __MINGW32__
boost::nowide::args a(argc, argv); // Fix arguments - make them UTF-8
#endif
application.parse_command_line (argc, argv);
application.start (argc, argv);

View File

@@ -345,24 +345,14 @@ load_user_config(void)
try_load_config_array(stylesheet_files);
}
static void
gnc_log_init (const std::vector <std::string> log_flags,
const boost::optional <std::string> &log_to_filename)
{
if (log_to_filename && !log_to_filename->empty())
{
#ifdef __MINGW64__
auto *utf8_filename = g_utf16_to_utf8 (log_to_filename->c_str(), -1, NULL, NULL, NULL);
#else
auto utf8_filename = log_to_filename->c_str();
#endif
qof_log_init_filename_special (utf8_filename);
#ifdef __MINGW64__
g_free (utf8_filename);
#endif
}
else
{

View File

@@ -10,7 +10,7 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
@@ -61,12 +61,15 @@ extern "C" {
#include <boost/locale.hpp>
#include <boost/optional.hpp>
#ifdef __MINGW32__
#include <boost/nowide/args.hpp>
#endif
#include <iostream>
#include <gnc-locale-utils.hpp>
namespace bl = boost::locale;
/* This static indicates the debugging module that this .o belongs to. */
/* This static indicates the debugging module that this .o belongs to. */
static QofLogModule log_module = GNC_MOD_GUI;
static gchar *userdata_migration_msg = NULL;
@@ -387,14 +390,16 @@ int
main(int argc, char ** argv)
{
Gnucash::Gnucash application (argv[0]);
#ifdef __MINGW32__
boost::nowide::args a(argc, argv); // Fix arguments - make them UTF-8
#endif
/* We need to initialize gtk before looking up all modules */
if(!gtk_init_check (&argc, &argv))
{
std::cerr << bl::format (bl::translate ("Run '{1} --help' to see a full list of available command line options.")) % *argv[0]
<< "\n"
<< bl::translate ("Error: could not initialize graphical user interface and option add-price-quotes was not set.\n"
" Perhaps you need to set the $DISPLAY environment variable ?");
" Perhaps you need to set the $DISPLAY environment variable?");
return 1;
}

View File

@@ -13,21 +13,12 @@
<child type="titlebar">
<placeholder/>
</child>
<child type="titlebar">
<placeholder/>
</child>
<child type="titlebar">
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkLabel" id="start_page">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">This assistant will help you setup and use accounting periods.
<property name="label" translatable="yes">This assistant will help you setup and use accounting periods.
Danger: this feature does not work correctly at this time; it is still under development. It will probably damage your data in such a way that it cannot be repaired!</property>
<property name="wrap">True</property>
</object>
@@ -79,7 +70,7 @@ Books will be closed at midnight on the selected date.</property>
<object class="GtkLabel" id="remarks_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">xxx</property>
<property name="label">xxx</property>
<property name="justify">center</property>
<property name="wrap">True</property>
</object>
@@ -104,7 +95,7 @@ Books will be closed at midnight on the selected date.</property>
<object class="GtkLabel" id="book_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">xxx</property>
<property name="label">xxx</property>
<property name="justify">center</property>
<property name="wrap">True</property>
</object>
@@ -118,7 +109,7 @@ Books will be closed at midnight on the selected date.</property>
<object class="GtkLabel" id="results_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">xxx</property>
<property name="label">xxx</property>
<property name="justify">center</property>
<property name="wrap">True</property>
</object>
@@ -196,6 +187,21 @@ Books will be closed at midnight on the selected date.</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
@@ -213,7 +219,7 @@ Books will be closed at midnight on the selected date.</property>
<object class="GtkLabel" id="finish_page">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">xxx</property>
<property name="label">xxx</property>
<property name="justify">center</property>
<property name="wrap">True</property>
</object>
@@ -232,7 +238,7 @@ Books will be closed at midnight on the selected date.</property>
<object class="GtkLabel" id="summary_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">xxx</property>
<property name="label">xxx</property>
<property name="justify">center</property>
<property name="wrap">True</property>
</object>
@@ -262,21 +268,6 @@ Books will be closed at midnight on the selected date.</property>
<property name="has_padding">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child type="titlebar">
<placeholder/>
</child>
<child type="titlebar">
<placeholder/>
</child>
<child type="titlebar">
<placeholder/>
</child>
<child internal-child="action_area">
<object class="GtkBox">
<property name="can_focus">False</property>

View File

@@ -31,7 +31,7 @@
You can pick a set of accounts here that seem close to your needs. After the assistant completes you will be able to add, rename, modify, and remove accounts, at any time later on. You will also be able to add sub-accounts, as well as move accounts (along with their sub-accounts) from one parent to another.
Click 'Cancel' if you do not wish to create any new accounts now.</property>
Click 'Cancel' if you do not wish to create any new accounts now.</property>
<property name="wrap">True</property>
</object>
<packing>

View File

@@ -51,11 +51,11 @@
<property name="valign">start</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="label" translatable="yes" comments="Run the assistant in your language to see GTK's translation of the button labels.">GnuCash can import financial data from QIF (Quicken Interchange Format) files written by Quicken/QuickBooks, MS Money, Moneydance, and many other programs.
<property name="label" translatable="yes" comments="Run the assistant in your language to see GTK's translation of the button labels.">GnuCash can import financial data from QIF (Quicken Interchange Format) files written by Quicken/QuickBooks, MS Money, Moneydance, and many other programs.
The import process has several steps. Your GnuCash accounts will not be changed until you click "Apply" at the end of the process.
The import process has several steps. Your GnuCash accounts will not be changed until you click "Apply" at the end of the process.
Click "Next" to start loading your QIF data, or "Cancel" to abort the process. </property>
Click "Next" to start loading your QIF data, or "Cancel" to abort the process.</property>
<property name="wrap">True</property>
</object>
<packing>
@@ -77,7 +77,7 @@ Click "Next" to start loading your QIF data, or "Cancel" to abort the process. <
<property name="can_focus">False</property>
<property name="label" translatable="yes" comments="Run the assistant in your language to see GTK's translation of the button labels.">Please select a file to load. When you click "Next", the file will be loaded and analyzed. You may need to answer some questions about the account(s) in the file.
You will have the opportunity to load as many files as you wish, so don't worry if your data is in multiple files.
You will have the opportunity to load as many files as you wish, so don't worry if your data is in multiple files.
</property>
<property name="wrap">True</property>
</object>
@@ -294,9 +294,9 @@ You will have the opportunity to load as many files as you wish, so don't worry
<object class="GtkLabel" id="label841">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">The QIF file format does not specify which order the day, month, and year components of a date are printed. In most cases, it is possible to automatically determine which format is in use in a particular file. However, in the file you have just imported there exist more than one possible format that fits the data.
<property name="label" translatable="yes">The QIF file format does not specify which order the day, month, and year components of a date are printed. In most cases, it is possible to automatically determine which format is in use in a particular file. However, in the file you have just imported there exist more than one possible format that fits the data.
Please select a date format for the file. QIF files created by European software are likely to be in "d-m-y" or day-month-year format, where US QIF files are likely to be "m-d-y" or month-day-year.
Please select a date format for the file. QIF files created by European software are likely to be in "d-m-y" or day-month-year format, where US QIF files are likely to be "m-d-y" or month-day-year.
</property>
<property name="wrap">True</property>
</object>
@@ -356,7 +356,7 @@ Please select a date format for the file. QIF files created by European software
<object class="GtkLabel" id="label823">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">The QIF file that you just loaded appears to contain transactions for just one account, but the file does not specify a name for that account.
<property name="label" translatable="yes">The QIF file that you just loaded appears to contain transactions for just one account, but the file does not specify a name for that account.
Please enter a name for the account. If the file was exported from another accounting program, you should use the same account name that was used in that program.
</property>
@@ -467,7 +467,7 @@ Please enter a name for the account. If the file was exported from another accou
<property name="can_focus">False</property>
<property name="label" translatable="yes" comments="Run the assistant in your language to see GTK's translation of the button labels.">Click "Load another file" if you have more data to import at this time. Do this if you have saved your accounts to separate QIF files.
Click "Next" to finish loading files and move to the next step of the QIF import process. </property>
Click "Next" to finish loading files and move to the next step of the QIF import process.</property>
<property name="wrap">True</property>
</object>
<packing>
@@ -667,7 +667,7 @@ Note that GnuCash will be creating many accounts that did not exist on your othe
<object class="GtkLabel" id="label840">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">GnuCash uses separate Income and Expense accounts rather than categories to classify your transactions. Each of the categories in your QIF file will be converted to a GnuCash account.
<property name="label" translatable="yes">GnuCash uses separate Income and Expense accounts rather than categories to classify your transactions. Each of the categories in your QIF file will be converted to a GnuCash account.
On the next page, you will have an opportunity to look at the suggested matches between QIF categories and GnuCash accounts. You may change matches that you do not like by double-clicking on the line containing the category name.
@@ -799,9 +799,9 @@ If you change your mind later, you can reorganize the account structure safely w
<object class="GtkLabel" id="label847707">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">QIF files downloaded from banks and other financial institutions may not have information about Accounts and Categories which would allow them to be correctly assigned to GnuCash accounts.
<property name="label" translatable="yes">QIF files downloaded from banks and other financial institutions may not have information about Accounts and Categories which would allow them to be correctly assigned to GnuCash accounts.
In the following page, you will see the text that appears in the Payee and Memo fields of transactions with no QIF Account or Category. By default these transactions are assigned to the 'Unspecified' account in GnuCash. If you select a different account, it will be remembered for future QIF files. </property>
In the following page, you will see the text that appears in the Payee and Memo fields of transactions with no QIF Account or Category. By default these transactions are assigned to the 'Unspecified' account in GnuCash. If you select a different account, it will be remembered for future QIF files.</property>
<property name="wrap">True</property>
</object>
<packing>
@@ -1017,8 +1017,8 @@ In the following page, you will see the text that appears in the Payee and Memo
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_bottom">12</property>
<property name="label" translatable="yes">Below you are asked to provide information about stocks, mutual funds, and other investments that appear in the QIF file(s) you are importing. GnuCash needs some additional details about these investments that the QIF format does not provide.
<property name="label" translatable="yes">Below you are asked to provide information about stocks, mutual funds, and other investments that appear in the QIF file(s) you are importing. GnuCash needs some additional details about these investments that the QIF format does not provide.
Each stock, mutual fund, or other investment must have a name and an abbreviation, such as a stock symbol. Because some unrelated investments have the same abbreviation, you also need to indicate what type of abbreviation you have entered. For example, you could select the exchange that assigned the symbol (NASDAQ, NYSE, etc.), or select an investment type.
If you don't see your exchange listed, or none of the available choices are appropriate, you can enter a new one.</property>
@@ -1365,7 +1365,7 @@ Click "Next" to review the possible matches.</property>
<object class="GtkLabel" id="end_page">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Click "Apply" to import data from the staging area and update your GnuCash accounts. The account and category matching information you have entered will be saved and used for defaults the next time you use the QIF import facility.
<property name="label" translatable="yes">Click "Apply" to import data from the staging area and update your GnuCash accounts. The account and category matching information you have entered will be saved and used for defaults the next time you use the QIF import facility.
Click "Back" to review your account and category matchings, to change currency and security settings for new accounts, or to add more files to the staging area.

View File

@@ -35,11 +35,12 @@
<property name="layout_style">end</property>
<child>
<object class="GtkCheckButton" id="check_button">
<property name="label" translatable="yes">Close on Jump</property>
<property name="label" translatable="yes">Close _on Jump</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="halign">start</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
@@ -92,8 +93,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_bottom">6</property>
<property name="label" translatable="yes">&lt;b&gt;Search the Account List&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="label" translatable="yes">Search the Account List</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
@@ -102,40 +105,65 @@
</packing>
</child>
<child>
<object class="GtkBox" id="hbox-radio">
<object class="GtkFrame" id="frame-radio">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="homogeneous">True</property>
<property name="halign">start</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
<property name="margin_bottom">6</property>
<property name="label_xalign">0</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkRadioButton" id="radio-root">
<property name="label" translatable="yes">Search from Root</property>
<object class="GtkBox" id="hbox-radio">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="border_width">5</property>
<property name="orientation">vertical</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkRadioButton" id="radio-root">
<property name="label" translatable="yes">All _accounts</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="halign">start</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio-subroot">
<property name="label">Su_b-accounts of</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="halign">start</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="group">radio-root</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio-subroot">
<property name="label" translatable="yes">Search from Sub Account</property>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<property name="group">radio-root</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Search scope</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
@@ -227,7 +255,7 @@
</child>
<child>
<object class="GtkButton" id="filter-button">
<property name="label" translatable="yes">_Search</property>
<property name="label" translatable="yes">Sea_rch</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -263,7 +291,7 @@
<property name="can_focus">False</property>
<property name="margin_top">3</property>
<property name="margin_bottom">3</property>
<property name="label" translatable="yes">Select a row and then press 'jump to' to jump to account in the Account Tree,
<property name="label" translatable="yes">Select a row and then press 'jump to' to jump to the account in the Account Tree,
if account should not be shown, this will be temporarily overridden.</property>
<property name="justify">center</property>
</object>

View File

@@ -98,7 +98,7 @@
</child>
<child>
<object class="GtkButton" id="add_button1">
<property name="label" translatable="yes">A_dd &gt;&gt;</property>
<property name="label" translatable="yes">A_dd &gt;&gt;</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>

View File

@@ -962,7 +962,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes"> days</property>
<property name="label" translatable="yes">days</property>
<property name="justify">center</property>
</object>
<packing>
@@ -1021,7 +1021,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes"> days</property>
<property name="label" translatable="yes">days</property>
<property name="justify">center</property>
</object>
<packing>

View File

@@ -59,7 +59,7 @@
<object class="GtkSpinButton" id="GSB_Mult">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes">Number of calendar units in the recurrence: E.g. Biweekly = every 2 weeks; Quarterly = every 3 months</property>
<property name="tooltip_text" translatable="yes">Number of calendar units in the recurrence: E.g. Biweekly = every 2 weeks; Quarterly = every 3 months</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="adjustment">GSB_Mult_Adj</property>

View File

@@ -173,7 +173,7 @@ gnc_html_history_append(gnc_html_history * hist,
/* this is the first entry in the list */
if (hist->nodes)
{
g_print ("???? hist->nodes non-NULL, but no last_node \n");
g_print ("???? hist->nodes non-NULL, but no last_node!\n");
}
hist->nodes = n;
hist->last_node = n;

View File

@@ -533,7 +533,7 @@ ab_account_longname(const GNC_AB_ACCOUNT_SPEC *ab_acc)
account_number = AB_Account_GetAccountNumber (ab_acc);
#endif
/* Translators: Strings are 1. Bank code, 2. Bank name,
3. Account Number, 4. Subaccount ID */
3. Account Number, 4. Subaccount ID */
result = g_strdup_printf(_("Bank code %s (%s), Account %s (%s)"),
bankcode,
bankname ? bankname : "",

View File

@@ -45,8 +45,7 @@
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">
You first need to apply for Online Banking access at your bank. If your bank decides to grant you electronic access, they will send you a letter containing
You first need to apply for Online Banking access at your bank. If your bank decides to grant you electronic access, they will send you a letter containing:
* The bank code of your bank
* The user ID that identifies you to your bank
* The Internet address of your bank's Online Banking server

View File

@@ -939,7 +939,7 @@
<object class="GtkLabel" id="label8877450">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes"> _Name of the new template:</property>
<property name="label" translatable="yes">_Name of the new template</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">template_name</property>
</object>

View File

@@ -182,7 +182,7 @@ gnc_ab_maketrans(GtkWidget *parent, Account *gnc_acc,
if (!gnc_verify_dialog (
GTK_WINDOW (parent), FALSE, "%s",
_("The backend found an error during the preparation "
"of the job. It is not possible to execute this job. \n"
"of the job. It is not possible to execute this job.\n"
"\n"
"Most probable the bank does not support your chosen "
"job or your Online Banking account does not have the permission "

View File

@@ -797,7 +797,7 @@ txn_transaction_cb(const AB_TRANSACTION *element, gpointer user_data)
if (gnc_verify_dialog(
GTK_WINDOW (data->parent), FALSE, "%s",
_("The backend found an error during the preparation "
"of the job. It is not possible to execute this job. \n"
"of the job. It is not possible to execute this job.\n"
"\n"
"Most probably the bank does not support your chosen "
"job or your Online Banking account does not have the permission "
@@ -1153,7 +1153,7 @@ bal_accountinfo_cb(AB_IMEXPORTER_ACCOUNTINFO *element, gpointer user_data)
gchar *booked_str = gnc_AB_VALUE_to_readable_string(booked_val);
gchar *message1 = g_strdup_printf(
_("Result of Online Banking job: \n"
_("Result of Online Banking job:\n"
"Account booked balance is %s"),
booked_str);
gchar *message2 =

View File

@@ -1110,7 +1110,7 @@ get_input(GncGWENGui *gui, guint32 flags, const gchar *title,
{
gboolean retval;
gchar *msg = g_strdup_printf(
_("The PIN needs to be at least %d characters \n"
_("The PIN needs to be at least %d characters\n"
"long. Do you want to try again?"), min_len);
retval = gnc_verify_dialog (GTK_WINDOW (gui->parent), TRUE, "%s", msg);
g_free(msg);

View File

@@ -84,8 +84,8 @@ static const gchar *finish_tree_string = N_(
static const gchar *finish_trans_string = N_(
/* Translators: %s is the file name string and %u the number of accounts. */
"When you click \"Apply\", the transactions will be exported to the file '%s' and"
" the number of accounts exported will be %u.\n\n"
"When you click \"Apply\", the transactions will be exported to the file '%s' "
"and the number of accounts exported will be %u.\n\n"
"You can also verify your selections by clicking on \"Back\" or \"Cancel\" to abort the export.\n");
static const gchar *finish_trans_search_gl_string = N_(
@@ -95,35 +95,35 @@ static const gchar *finish_trans_search_gl_string = N_(
static const gchar *start_tree_string = N_(
"This assistant will help you export the Account Tree to a file\n"
" with the separator specified below.\n\n"
"Select the settings you require for the file and then click \"Next\" to proceed"
" or \"Cancel\" to abort the export.\n");
"with the separator specified below.\n\n"
"Select the settings you require for the file and then click \"Next\" "
"to proceed or \"Cancel\" to abort the export.\n");
static const gchar *start_trans_string = N_(
"This assistant will help you export the Transactions to a file\n"
" with the separator specified below.\n\n"
"There will be multiple rows for each transaction and may"
" require further manipulation to get them in a format you can use.\n\n"
"Each Transaction will appear once in the export and will be listed in"
" the order the accounts were processed\n\n"
"with the separator specified below.\n\n"
"There will be multiple rows for each transaction and may "
"require further manipulation to get them in a format you can use.\n\n"
"Each Transaction will appear once in the export and will be listed in "
"the order the accounts were processed\n\n"
"Price/Rate output format is controlled by the Preference setting,\n"
" General->Force Prices to display as decimals\n\n"
"Select the settings you require for the file and then click \"Next\" to proceed"
" or \"Cancel\" to abort the export.\n");
"General->Force Prices to display as decimals\n\n"
"Select the settings you require for the file and then click \"Next\" "
"to proceed or \"Cancel\" to abort the export.\n");
static const gchar *start_trans_simple_string = N_(
"This assistant will help you export the Transactions to a file\n"
" with the separator specified below.\n\n"
"There will be multiple rows for each transaction and may require further"
" manipulation to get them in a format you can use. Each Transaction will"
" appear once in the export and will be listed in the order the accounts"
" were processed\n\n"
"with the separator specified below.\n\n"
"There will be multiple rows for each transaction and may require further "
"manipulation to get them in a format you can use. Each Transaction will "
"appear once in the export and will be listed in the order the accounts "
"were processed\n\n"
"Price/Rate output format is controlled by the Preference setting,\n"
" General->Force Prices to display as decimals\n\n"
"By selecting the simple layout, the output will be equivalent to a single"
" row register view and as such some of the transfer detail could be lost.\n\n"
"Select the settings you require for the file and then click \"Next\" to proceed"
" or \"Cancel\" to abort the export.\n");
"General->Force Prices to display as decimals\n\n"
"By selecting the simple layout, the output will be equivalent to a single "
"row register view and as such some of the transfer detail could be lost.\n\n"
"Select the settings you require for the file and then click \"Next\" "
"to proceed or \"Cancel\" to abort the export.\n");
/**************************************************

View File

@@ -840,6 +840,7 @@ gnc_import_process_trans_item (GncImportMatchMap *matchmap,
{
Split * other_split;
gnc_numeric imbalance_value;
Transaction *trans;
/* DEBUG("Begin"); */
@@ -894,7 +895,9 @@ gnc_import_process_trans_item (GncImportMatchMap *matchmap,
xaccSplitSetDateReconciledSecs(gnc_import_TransInfo_get_fsplit (trans_info),
gnc_time (NULL));
/* Done editing. */
xaccTransCommitEdit(gnc_import_TransInfo_get_trans (trans_info));
trans = gnc_import_TransInfo_get_trans (trans_info);
xaccTransCommitEdit(trans);
xaccTransRecordPrice(trans, PRICE_SOURCE_SPLIT_IMPORT);
return TRUE;
case GNCImport_UPDATE:
{

View File

@@ -444,7 +444,8 @@
progress-dialog)
;; rebalance and commit everything
(xaccTransCommitEdit gnc-xtn))))
(xaccTransCommitEdit gnc-xtn)
(xaccTransRecordPrice gnc-xtn PRICE-SOURCE-SPLIT-IMPORT))))
(qif-file:xtns qif-file)))
sorted-qif-files-list)

View File

@@ -567,7 +567,7 @@ gnc_split_register_move_cursor (VirtualLocation *p_new_virt_loc,
*p_new_virt_loc = new_virt_loc;
PINFO ("after move %d %d \n",
PINFO ("after move %d %d\n",
new_virt_loc.vcell_loc.virt_row,
new_virt_loc.vcell_loc.virt_col);

View File

@@ -2215,7 +2215,7 @@ gnc_split_register_confirm (VirtualLocation virt_loc, gpointer user_data)
title = _ ("Change transaction containing a reconciled split?");
message_format =
_ ("The transaction you are about to change contains reconciled splits in the following accounts:\n%s"
"\n\nAre you sure you want to continue with this change ?");
"\n\nAre you sure you want to continue with this change?");
message = g_strdup_printf (message_format, acc_list);
g_free (acc_list);

View File

@@ -164,7 +164,7 @@ gnc_split_register_get_trans_split (SplitRegister *reg,
{
if ((0 > vcell_loc.virt_row) || (0 > vcell_loc.virt_col))
{
PERR ("bad row \n");
PERR ("bad row\n");
return NULL;
}
@@ -346,7 +346,7 @@ gnc_split_register_set_cell_fractions (SplitRegister *reg, Split *split)
int fraction;
gboolean trading_accts;
gnc_commodity *commodity;
/* This function must use the same algorithm as gnc_split_register_get_shares_entry
and gnc_split_register_get_debcred_entry. Changes here may require changes in
one of them or vice versa. */
@@ -367,7 +367,7 @@ gnc_split_register_set_cell_fractions (SplitRegister *reg, Split *split)
}
else
{
/* It should be ok to use the current book since that's what
/* It should be ok to use the current book since that's what
gnc_split_register_get_account uses to find the account. */
trading_accts = qof_book_use_trading_accounts (gnc_get_current_book());
trans_currency = gnc_default_currency();

View File

@@ -1958,6 +1958,7 @@ gnc_split_register_save (SplitRegister* reg, gboolean do_commit)
}
unreconcile_splits (reg);
xaccTransCommitEdit (trans);
xaccTransRecordPrice (trans, PRICE_SOURCE_SPLIT_REG);
}
gnc_table_clear_current_cursor_changes (reg->table);
@@ -2203,79 +2204,6 @@ recalculate_value (Split* split, SplitRegister* reg,
}
}
static void
record_price (SplitRegister* reg, Account* account, gnc_numeric value,
PriceSource source)
{
Transaction* trans = gnc_split_register_get_current_trans (reg);
QofBook* book = qof_instance_get_book (QOF_INSTANCE (account));
GNCPriceDB* pricedb = gnc_pricedb_get_db (book);
gnc_commodity* comm = xaccAccountGetCommodity (account);
gnc_commodity* curr = xaccTransGetCurrency (trans);
GNCPrice* price;
gnc_numeric price_value;
int scu = gnc_commodity_get_fraction (curr);
time64 time;
BasicCell* cell = gnc_table_layout_get_cell (reg->table->layout, DATE_CELL);
gboolean swap = FALSE;
/* Only record the price for account types that don't have a
* "rate" cell. They'll get handled later by
* gnc_split_register_handle_exchange.
*/
if (gnc_split_reg_has_rate_cell (reg->type))
return;
gnc_date_cell_get_date ((DateCell*)cell, &time, TRUE);
price = gnc_pricedb_lookup_day_t64 (pricedb, comm, curr, time);
if (gnc_commodity_equiv (comm, gnc_price_get_currency (price)))
swap = TRUE;
if (price)
{
price_value = gnc_price_get_value (price);
if (gnc_numeric_equal (swap ? gnc_numeric_invert (value) : value,
price_value))
{
gnc_price_unref (price);
return;
}
if (gnc_price_get_source (price) < PRICE_SOURCE_XFER_DLG_VAL)
{
/* Existing price is preferred over this one. */
gnc_price_unref (price);
return;
}
if (swap)
{
value = gnc_numeric_invert (value);
scu = gnc_commodity_get_fraction (comm);
}
value = gnc_numeric_convert (value, scu * COMMODITY_DENOM_MULT,
GNC_HOW_RND_ROUND_HALF_UP);
gnc_price_begin_edit (price);
gnc_price_set_time64 (price, time);
gnc_price_set_source (price, source);
gnc_price_set_typestr (price, PRICE_TYPE_TRN);
gnc_price_set_value (price, value);
gnc_price_commit_edit (price);
gnc_price_unref (price);
return;
}
value = gnc_numeric_convert (value, scu * COMMODITY_DENOM_MULT,
GNC_HOW_RND_ROUND_HALF_UP);
price = gnc_price_create (book);
gnc_price_begin_edit (price);
gnc_price_set_commodity (price, comm);
gnc_price_set_currency (price, curr);
gnc_price_set_time64 (price, time);
gnc_price_set_source (price, source);
gnc_price_set_typestr (price, PRICE_TYPE_TRN);
gnc_price_set_value (price, value);
gnc_pricedb_add_price (pricedb, price);
gnc_price_commit_edit (price);
}
static gboolean
gnc_split_register_auto_calc (SplitRegister* reg, Split* split)
{
@@ -2447,14 +2375,6 @@ gnc_split_register_auto_calc (SplitRegister* reg, Split* split)
if (recalc_value)
recalculate_value (split, reg, price, amount, shares_changed);
if (price_changed)
{
cell = (PriceCell*) gnc_table_layout_get_cell (reg->table->layout,
PRIC_CELL);
price = gnc_price_cell_get_value (cell);
if (gnc_numeric_positive_p (price))
record_price (reg, account, price, source);
}
return TRUE;
}
@@ -3231,7 +3151,7 @@ gnc_split_register_get_register_group (SplitRegister *reg)
}
default:
return REG_TYPE_GROUP_UNKNOWN;
PERR ("unknown register type %d \n", reg->type);
PERR ("unknown register type %d\n", reg->type);
break;
}
}

View File

@@ -57,10 +57,13 @@ static gpointer
style_create_key (SheetBlockStyle *style)
{
static gint key;
gpointer new_key;
key = style->cursor->num_rows;
new_key = g_malloc(sizeof(key));
new_key = memcpy(new_key, &key, sizeof(key));
return g_memdup(&key, sizeof(key));
return new_key;
}
static void

View File

@@ -193,5 +193,7 @@
"td.total-number-cell { " total-number-cell-info " }\n"
"td.total-label-cell { " total-label-cell-info " }\n"
"td.centered-label-cell { text-align: center; " centered-label-cell-info " }\n"
"sub { top: 0.4em; }\n"
"sub, sup { vertical-align: baseline; position: relative; top: -0.4em; }\n"
"@media print { html, body { height: unset; }}\n"
(or (gnc:html-document-style-text doc) "")))))

View File

@@ -1,21 +1,27 @@
;; -*-scheme-*-
;; by Richard -Gilligan- Uschold
;;
;; updated by J. Alex Aycinena, July 2008, October 2009
;; Tax report, country specific
;; US version by Richard -Gilligan- Uschold,
;; updated by J. Alex Aycinena, July 2008, October 2009
;;
;; This report prints transaction details and account totals for accounts
;; relevant to United States taxes, sorted by form/schedule, copy, line
;; and tax code, and exports TXF files for import to TaxCut, TurboTax, etc.
;; relevant to whatever tax scheme is defined and activated by locale settings,
;; sorted by form/schedule, copy, line and tax code,
;; and exports TXF, XML or other files for import into tax software.
;;
;; This version is for United States taxes and
;; exports TXF files for use by TaxCut, TurboTax, etc.
;;
;; For this to work, the user has to segregate taxable and not taxable
;; income to different accounts, as well as deductible and non-
;; deductible expenses and the accounts need to be referenced to the tax codes.
;; However, there is no need to limit tax codes to just one account. For codes
;; like N286 (Dividend, Ordinary) that can have the "payer" printed on
;; Schedule B on separate lines, to have amounts from different accounts
;; summarized together for one "payer" line, the accounts referenced to the
;; same tax code for a given "payer" need to be adjacent to each other in the
;; account hierarchy.
;; However, there is no need to limit tax codes to just one account.
;;
;; Tax codes can have contributions from more than one account -- called a 'payer'
;; (like N286 (Dividend, Ordinary) that can have the "payer" printed on
;; Schedule B on separate lines).
;; In order to have amounts from different accounts summarized together for one
;; "payer" line, the accounts referenced to the same tax code for a given "payer"
;; need to be adjacent to each other in the account hierarchy.
;;
;; The user selects the accounts(s) to be printed; if none are specified, all
;; are selected. Includes all sub-account levels below selected account, that
@@ -73,7 +79,7 @@
;; From prior version:
;; NOTE: setting of specific dates is squirly! and seems
;; to be current-date dependent! Actually, time of day dependent! Just
;; after midnight gives diffenent dates than just before! Referencing
;; after midnight gives different dates than just before! Referencing
;; all times to noon seems to fix this. Subtracting 1 year sometimes
;; subtracts 2! see "(to-value"
;;
@@ -267,11 +273,11 @@
;; Render txf information
(define crlf (string #\return #\newline)) ; TurboTax seems to want these
(define txf-last-payer "") ; if same as current, inc txf-l-count
; this only works if different
; accounts from the same payer are
; grouped in the accounts list
(define txf-l-count 0) ; count repeated N codes
(define txf-last-payer "") ; if same as current, inc txf-l-count
; this only works if different
; accounts from the same payer are
; grouped in the accounts list
(define txf-l-count 0) ; count repeated N codes
;; stores invalid txf codes so we can list
(define txf-invalid-alist '())
@@ -1419,7 +1425,7 @@
(gnc:make-html-table-cell/markup
"date-cell"
(gnc-print-time64 trans-date "%Y-%b-%d")))
(gnc:html-table-set-style! num-table "table"
(gnc:html-table-set-style! num-table "table"
'attribute (list "border" "0")
'attribute (list "cellspacing" "0")
'attribute (list "cellpadding" "0"))
@@ -1679,15 +1685,21 @@
(get-line-info year (cdr line-list)))
((<= (caar line-list) (string->number year)) (cadar line-list)))))
;; List of entries, each containing a form, form copy number, form line
;; number, tax-code (as string), account name, account, and, to avoid having
;; to fetch again later, account type and tax-code as symbol. Only accounts
;; that are tax related, with a tax code that is valid for the tax-entity-type
;; and account type are put on list, along with those assigned code N000.
;; List of entries, each containing a
;;
;; form, form copy number, form line number,
;; tax-code (as string), account name, account, and, to avoid having
;; to fetch again later, account type and tax-code as symbol.
;;
;; Only accounts that are tax related,
;; with a tax code that is valid for the tax-entity-type and account type,
;; are put on list, along with those assigned code N000.
;;
;; Accounts that are not tax-related and have a tax code or are tax-related
;; and have an invalid tax code are put on an error list. Codes N438 and N440
;; have special processing: if an asset account is assigned to either of these
;; two codes, an additional 'form-line-acct' entry is created for the other
;; and have an invalid tax code are put on an error list.
;; Codes N438 and N440 have special processing:
;; if an asset account is assigned to either of these two codes,
;; an additional 'form-line-acct' entry is created for the other
;; code so that either both codes are represented or neither.
(define (make-form-line-acct-list accounts tax-year)
(map (lambda (account)

View File

@@ -224,9 +224,6 @@ with *EUGOODS* in the account description."))) #f
(gnc:option-set-default-value
(gnc:lookup-option options pagename-sorting "Secondary Key")
'none)
(gnc:option-set-default-value
(gnc:lookup-option options pagename-sorting "Secondary Subtotal")
'none)
;; Disable display options not being used anymore
(gnc:option-make-internal! options gnc:pagename-display "Shares")

View File

@@ -78,10 +78,10 @@
;; Display options
(add-option (gnc:make-string-option displaypage optname-template-file "a"
(N_ "The file name of the eguile template part of this report. This file should either be in your .gnucash directory, or else in its proper place within the GnuCash installation directories.")
(N_ "The file name of the eguile template part of this report. This file should either be in your .gnucash directory, or else in its proper place within the GnuCash installation directories.")
"receipt.eguile.scm"))
(add-option (gnc:make-string-option displaypage optname-css-file "b"
(N_ "The file name of the CSS stylesheet to use with this report. This file should either be in your .gnucash directory, or else in its proper place within the GnuCash installation directories.")
(N_ "The file name of the CSS stylesheet to use with this report. This file should either be in your .gnucash directory, or else in its proper place within the GnuCash installation directories.")
"receipt.css"))
(add-option (gnc:make-font-option
displaypage optname-heading-font "c"
@@ -94,13 +94,13 @@
(N_ "Name of a file containing a logo to be used on the header of the report")
"Receipt_header.jpg"))
(add-option (gnc:make-string-option
displaypage optname-logo-width-header "f" (N_ "Width of the header logo in CSS format, e.g. 10% or 32px. Leave blank to display the logo at its natural width. The height of the logo will be scaled accordingly.") "72mm"))
displaypage optname-logo-width-header "f" (N_ "Width of the header logo in CSS format, e.g. 10% or 32px. Leave blank to display the logo at its natural width. The height of the logo will be scaled accordingly.") "72mm"))
(add-option (gnc:make-pixmap-option
displaypage optname-logofile-footer "g"
(N_ "Name of a file containing a logo to be used on the footer of the report")
"Receipt_footer.jpg"))
(add-option (gnc:make-string-option
displaypage optname-logo-width-footer "h" (N_ "Width of the footer logo in CSS format, e.g. 10% or 32px. Leave blank to display the logo at its natural width. The height of the logo will be scaled accordingly.") "72mm"))
displaypage optname-logo-width-footer "h" (N_ "Width of the footer logo in CSS format, e.g. 10% or 32px. Leave blank to display the logo at its natural width. The height of the logo will be scaled accordingly.") "72mm"))
(add-option (gnc:make-string-option
displaypage optname-date-format "i"

View File

@@ -57,7 +57,7 @@
(define reconcile-report-instructions
(gnc:make-html-text
(G_ "The reconcile report is designed to be similar to the formal \
reconciliation tool. Please select the account from Report \
reconciliation tool. Please select the account from Report \
Options. Please note the dates specified in the options will apply \
to the Reconciliation Date.")
(gnc:html-markup-br)

View File

@@ -122,7 +122,7 @@
* 4: free_numeric - this function is responsible for freeing memory
* used by the internal numeric representation.
*
* 5: func_op - this function is repsonsible for handling function calls.
* 5: func_op - this function is responsible for handling function calls.
*
* I have included the file "numeric_ops.c" containing the above
* functions for the usual "double" and "int" representation of
@@ -224,7 +224,7 @@
*
* The logic recognizes "-" and "123" separately. The '-' unary
* operator is then applied to negate the numeric. This also has the
* advanatge that the same logic can be used for
* advantage that the same logic can be used for
*
* -123
* +123.45
@@ -292,7 +292,7 @@
* This function is called by the module/function/whatever to
* initialize the parser. The parser returns a pointer to a
* structure that contains all relevant information for
* parsering strings. The pointer is returned as (void *)
* parsing strings. The pointer is returned as (void *)
* since all information is and should remain pertinent only
* to the parser. The calling function(s) should never rely on
* manipulating any information inside this structure

View File

@@ -790,12 +790,13 @@ Defaulting to today."))
(gnc-mktime now))))
(define (gnc:get-three-months-ago)
(issue-deprecation-warning "gnc:get-three-months-ago is unused.")
(let ((now (gnc-localtime (current-time))))
(if (< (tm:mon now) 3)
(begin
(set:tm-mon now (+ (tm:mon now) 12))
(set:tm-year now (- (tm:year now) 1))))
(set:tm-mon now (- (tm:mon now) 3))
(set-tm:mon now (+ (tm:mon now) 12))
(set-tm:year now (- (tm:year now) 1))))
(set-tm:mon now (- (tm:mon now) 3))
(let ((month-days (gnc:days-in-month (+ (tm:mon now) 1)
(+ (tm:year now) 1900))))
(if (< month-days (tm:mday now))
@@ -804,12 +805,13 @@ Defaulting to today."))
(gnc-mktime now))))
(define (gnc:get-six-months-ago)
(issue-deprecation-warning "gnc:get-six-months-ago is unused.")
(let ((now (gnc-localtime (current-time))))
(if (< (tm:mon now) 6)
(begin
(set:tm-mon now (+ (tm:mon now) 12))
(set:tm-year now (- (tm:year now) 1))))
(set:tm-mon now (- (tm:mon now) 6))
(set-tm:mon now (+ (tm:mon now) 12))
(set-tm:year now (- (tm:year now) 1))))
(set-tm:mon now (- (tm:mon now) 6))
(let ((month-days (gnc:days-in-month (+ (tm:mon now) 1)
(+ (tm:year now) 1900))))
(if (< month-days (tm:mday now))
@@ -818,8 +820,9 @@ Defaulting to today."))
(gnc-mktime now))))
(define (gnc:get-one-year-ago)
(issue-deprecation-warning "gnc:get-one-year-ago is unused.")
(let ((now (gnc-localtime (current-time))))
(set:tm-year now (- (tm:year now) 1))
(set-tm:year now (- (tm:year now) 1))
(let ((month-days (gnc:days-in-month (+ (tm:mon now) 1)
(+ (tm:year now) 1900))))
(if (< month-days (tm:mday now))
@@ -842,12 +845,13 @@ Defaulting to today."))
(gnc-mktime now))))
(define (gnc:get-three-months-ahead)
(issue-deprecation-warning "gnc:get-three-months-ahead is unused.")
(let ((now (gnc-localtime (current-time))))
(if (> (tm:mon now) 8)
(begin
(set:tm-mon now (- (tm:mon now) 9))
(set:tm-year now (+ (tm:year now) 1))
(set:tm-mon now (+ (tm:mon now) 3))))
(set-tm:mon now (- (tm:mon now) 9))
(set-tm:year now (+ (tm:year now) 1))
(set-tm:mon now (+ (tm:mon now) 3))))
(let ((month-days (gnc:days-in-month (+ (tm:mon now) 1)
(+ (tm:year now) 1900))))
(if (< month-days (tm:mday now))
@@ -856,12 +860,13 @@ Defaulting to today."))
(gnc-mktime now))))
(define (gnc:get-six-months-ahead)
(issue-deprecation-warning "gnc:get-six-months-ahead is unused.")
(let ((now (gnc-localtime (current-time))))
(if (> (tm:mon now) 5)
(begin
(set:tm-mon now (- (tm:mon now) 6))
(set:tm-year now (+ (tm:year now) 1))
(set:tm-mon now (+ (tm:mon now) 6))))
(set-tm:mon now (- (tm:mon now) 6))
(set-tm:year now (+ (tm:year now) 1))
(set-tm:mon now (+ (tm:mon now) 6))))
(let ((month-days (gnc:days-in-month (+ (tm:mon now) 1)
(+ (tm:year now) 1900))))
(if (< month-days (tm:mday now))
@@ -870,8 +875,9 @@ Defaulting to today."))
(gnc-mktime now))))
(define (gnc:get-one-year-ahead)
(issue-deprecation-warning "gnc:get-one-year-ahead is unused.")
(let ((now (gnc-localtime (current-time))))
(set:tm-year now (+ (tm:year now) 1))
(set-tm:year now (+ (tm:year now) 1))
(let ((month-days (gnc:days-in-month (+ (tm:mon now) 1)
(+ (tm:year now) 1900))))
(if (< month-days (tm:mday now))

View File

@@ -81,7 +81,7 @@ gncReadFile (const char * filename, char ** data)
if ( fd == -1 )
{
int norr = errno;
PERR ("file %s: (%d) %s \n", filename, norr, strerror(norr));
PERR ("file %s: (%d) %s\n", filename, norr, strerror(norr));
return 0;
}

View File

@@ -115,7 +115,7 @@
;; equivalents of gnc:pmt, gnc:ipmt and gnc:ppmt above, with some differences.
;; First difference is that they take the annual nominal rate and two yearly
;; frequencies: rate is annual, not per period (the functions calculate it
;; themselves) yfreq determines the compounding frequency of the payed/charged
;; themselves) yfreq determines the compounding frequency of the paid/charged
;; interest ycomp determines the compounding frequency of the annual nominal
;; rate

View File

@@ -49,7 +49,7 @@ static gnc_euro_rate_struct gnc_euro_rates[] =
{ "DEM", 1.95583 }, /* german mark */
{ "DM", 1.95583 }, /* german mark */
{ "EEK", 15.6466 }, /* Estonian Kroon */
{ "ESC", 200.482 }, /* portugese escudo */
{ "ESC", 200.482 }, /* portuguese escudo */
{ "ESP", 166.386 }, /* spanish peseta */
{ "EUR", 1.00000 }, /* euro */
{ "EURO", 1.00000 }, /* euro */
@@ -69,7 +69,7 @@ static gnc_euro_rate_struct gnc_euro_rates[] =
{ "MTL", .429300 }, /* maltese lira */
{ "NLG", 2.20371 }, /* netherland gulden */
{ "PTA", 166.386 }, /* spanish peseta */
{ "PTE", 200.482 }, /* portugese escudo */
{ "PTE", 200.482 }, /* portuguese escudo */
{ "S", 13.7603 }, /* austrian schilling */
{ "SCH", 13.7603 }, /* austrian schilling */
{ "SIT", 239.640 }, /* slovenian tolar */

View File

@@ -522,9 +522,10 @@ gnc_sx_get_instances(const GDate *range_end, gboolean include_disabled)
SchedXaction *sx = (SchedXaction*)sx_iter->data;
if (xaccSchedXactionGetEnabled(sx))
{
enabled_sxes = g_list_append(enabled_sxes, sx);
enabled_sxes = g_list_prepend (enabled_sxes, sx);
}
}
enabled_sxes = g_list_reverse (enabled_sxes);
instances->sx_instance_list = gnc_g_list_map(enabled_sxes, (GncGMapFunc)_gnc_sx_gen_instances, (gpointer)range_end);
g_list_free(enabled_sxes);
}
@@ -1154,7 +1155,7 @@ split_apply_exchange_rate (Split *split, GHashTable *bindings,
* the template_transaction's commodity.
*
* Since we're going through the split commodities anyway, check that they all
* have useable values. If we find an error return NULL as a signal to
* have usable values. If we find an error return NULL as a signal to
* create_each_transaction_helper to bail out.
*/

View File

@@ -372,9 +372,10 @@ static void sack_foreach_func(gpointer key, gpointer value, gpointer user_data)
sack_foreach_data_t data = (sack_foreach_data_t) user_data;
gnc_numeric thisvalue = *(gnc_numeric *) key;
gnc_numeric reachable_value = gnc_numeric_add_fixed (thisvalue, data->split_value);
gpointer new_value = g_malloc(sizeof(gnc_numeric));
data->reachable_list = g_list_prepend
(data->reachable_list, g_memdup (&reachable_value, sizeof (gnc_numeric)));
memcpy(new_value, &reachable_value, sizeof(gnc_numeric));
data->reachable_list = g_list_prepend(data->reachable_list, new_value);
}
GList *
@@ -418,6 +419,7 @@ gnc_account_get_autoclear_splits (Account *account, gnc_numeric toclear_value,
{
Split *split = (Split *)node->data;
gnc_numeric split_value = xaccSplitGetAmount (split);
gpointer new_value = g_malloc(sizeof(gnc_numeric));
struct _sack_foreach_data_t s_data[1];
s_data->split_value = split_value;
@@ -427,8 +429,9 @@ gnc_account_get_autoclear_splits (Account *account, gnc_numeric toclear_value,
g_hash_table_foreach (sack, sack_foreach_func, s_data);
/* Add the value of the split itself to the reachable_list */
memcpy(new_value, &split_value, sizeof(gnc_numeric));
s_data->reachable_list = g_list_prepend
(s_data->reachable_list, g_memdup (&split_value, sizeof (gnc_numeric)));
(s_data->reachable_list, new_value);
/* Add everything to the sack, looking out for duplicates */
for (GList *s_node = s_data->reachable_list; s_node; s_node = s_node->next)

View File

@@ -366,7 +366,7 @@ gboolean xaccParseAmount (const char * in_str, gboolean monetary,
/*
* xaccParseAmountPosSign is just like xaccParseAmount except the
* caller can choose whether the locale's postive sign (or in absense
* caller can choose whether the locale's positive sign (or in absence
* the '+') character is ignored. Setting skip to TRUE will cause
* the function to ignore any positive sign. Setting it to FALSE,
* and positive signs will be treated as unrecognized characters.

View File

@@ -661,7 +661,7 @@ GncDbiBackend<Type>::session_begin (QofSession* session, const char* new_uri,
uri.m_portnum = PGSQL_DEFAULT_PORT;
/* Postgres's SQL interface coerces identifiers to lower case, but the
* C interface is case-sensitive. This results in a mixed-case dbname
* being created (with a lower case name) but then dbi can't conect to
* being created (with a lower case name) but then dbi can't connect to
* it. To work around this, coerce the name to lowercase first. */
auto lcname = g_utf8_strdown (uri.dbname(), -1);
uri.m_dbname = std::string{lcname};

View File

@@ -40,7 +40,7 @@ void gnc_module_init_backend_dbi (void);
void gnc_module_finalize_backend_dbi (void);
#ifndef GNC_NO_LOADABLE_MODULES
/** This is the standarized initialization function of a qof_backend
/** This is the standardized initialization function of a qof_backend
* GModule, but compiling this can be disabled by defining
* GNC_NO_LOADABLE_MODULES. */
G_MODULE_EXPORT void qof_backend_module_init (void);

View File

@@ -22,7 +22,7 @@
/*
* FILE:
* esacpe.c
* escape.c
*
* FUNCTION:
* Escapes the ' and \ characters in a string

View File

@@ -322,7 +322,7 @@ deprecated_account_security_handler (xmlNodePtr node, gpointer act_pdata)
PWARN ("Account %s: Obsolete xml tag 'act:security' will not be preserved.",
xaccAccountGetName (pdata->account));
/* If the account has both a commodity and a security elemet, and
/* If the account has both a commodity and a security element, and
the commodity is a currecny, then the commodity is probably
wrong. In that case we want to replace it with the
security. jralls 2010-11-02 */

View File

@@ -60,7 +60,7 @@ typedef enum
void gnc_module_init_backend_xml (void);
#ifndef GNC_NO_LOADABLE_MODULES
/** This is the standarized initialization function of a qof_backend
/** This is the standardized initialization function of a qof_backend
* GModule, but compiling this can be disabled by defining
* GNC_NO_LOADABLE_MODULES. This one simply calls
* gnc_module_init_backend_file(). */

View File

@@ -132,7 +132,7 @@ book_slots_handler (xmlNodePtr node, gpointer book_pdata)
QofBook* book = static_cast<decltype (book)> (book_pdata);
gboolean success;
/* the below works only because the get is gaurenteed to return
/* the below works only because the get is guaranteed to return
* a frame, even if its empty */
success = dom_tree_create_instance_slots (node, QOF_INSTANCE (book));

View File

@@ -1620,7 +1620,7 @@ gnc_book_write_to_xml_file_v2 (
/*
* Have to pass in the backend as this routine needs the temporary
* backend for file export, not the real backend which could be
* postgress or anything else.
* postgresql or anything else.
*/
gboolean
gnc_book_write_accounts_to_xml_file_v2 (QofBackend* qof_be, QofBook* book,

View File

@@ -1283,7 +1283,7 @@
</date-entered>
<split>
<guid>96d4d8f635a24068e09c73e6fb953539</guid>
<memo>Begining balance</memo>
<memo>Beginning balance</memo>
<reconcile-state>n</reconcile-state>
<value>1035/1</value>
<quantity>103534000/100000</quantity>

View File

@@ -1260,7 +1260,7 @@
<trn:splits>
<trn:split>
<split:id type="guid">96d4d8f635a24068e09c73e6fb953539</split:id>
<split:memo>Begining balance</split:memo>
<split:memo>Beginning balance</split:memo>
<split:reconciled-state>n</split:reconciled-state>
<split:value>103534000/100000</split:value>
<split:quantity>103534000/100000</split:quantity>

View File

@@ -463,7 +463,7 @@ copy_recursive(const bfs::path& src, const bfs::path& dest)
}
catch(const bfs::filesystem_error& ex)
{
g_warning("An error occured while trying to migrate the user configation from\n%s to\n%s"
g_warning("An error occurred while trying to migrate the user configation from\n%s to\n%s"
"(Error: %s)",
src.string().c_str(), gnc_userdata_home_str.c_str(),
ex.what());

View File

@@ -265,9 +265,9 @@ gnc_g_list_map(GList* list, GncGMapFunc fn, gpointer user_data)
GList *rtn = NULL;
for (; list != NULL; list = list->next)
{
rtn = g_list_append(rtn, (*fn)(list->data, user_data));
rtn = g_list_prepend (rtn, (*fn)(list->data, user_data));
}
return rtn;
return g_list_reverse (rtn);
}
void

View File

@@ -45,7 +45,7 @@ const std::locale& gnc_get_locale();
* on boost::locale instead. Calling boost::locale("") is expensive,
* so call gnc_get_boost_locale instead.
*
* However before that funcation can be called the locale should be initialized
* However before that function can be called the locale should be initialized
* with gnc_init_boost_locale.
*/
void gnc_init_boost_locale(const std::string& messages_path);

View File

@@ -7,7 +7,7 @@ Main Scheduled Transaction todo list
. As per comment 2004-01-05T16:31, there is an issue when other pieces of
the system change accounts that SXes depend on. We have two options:
1: handle change at account-deletion time ["remove this acocunt will
1: handle change at account-deletion time ["remove this account will
affect this scheduled transaction ... what to do?"]
2: break out of SX since-last-run processing ["this account was removed;
{edit,delete} SX?"].
@@ -105,7 +105,7 @@ X create a template register
X fixed by removing any ability to change the example calendar.
X "Inappropriate FreqSpec type" on new-SX editing.
X "new; weekly: click on day, click off day: GLib-CRITICAL **: file gdate.c: line 1236 (g_date_to_struct_tm): assertion `g_date_valid (d)' failed."
. no longer reproducable
. no longer reproducible
. SX list
. add a big calendar [gnome-pim? evo?] to SXaction List/overview
@@ -162,7 +162,7 @@ X create a template register
X pull accounts over.
X pull initial SX name from the Transaction name?
X need start-date on Make dialog
X [initially starts as the next occurance after the created-from SX,
X [initially starts as the next occurrence after the created-from SX,
which may not be the Right Thing]
. need "since-last-run" UI for instanatiation.
@@ -182,7 +182,7 @@ X create a template register
. fix first/last page issues.
. bugs
. tab-order on variable-entry window isn't always correct.
B inital "To-Create Transactions" varbinding table doesn't setup table correctly.
B initial "To-Create Transactions" varbinding table doesn't setup table correctly.
B correct "Back" button behavior in Druid paradigm
B created SXes are put in GL forever. :(
B But this is true of manually-created transactions, too ... is this
@@ -348,7 +348,7 @@ X General
. SX name should be default value for template transaction description
. loan/repayment SX's
. integrate "Financial Calculator"
. auto-determine number of occurances/end condition from liability
. auto-determine number of occurrences/end condition from liability
account amount.
. SX since-last-run should be able to sort by Date [conditional on the dialog
staying around].

View File

@@ -33,6 +33,6 @@ in src/engine/FileIOP.h)
ftp.debian.org:/pub/debian/dists/unstable/main/source/utils/xdelta*.tar.gz
-# Could monitor how many changes (records altered) the user has made,
and could prompt for more frequent saves if lots of editing has
ocurred...
occurred...
*/

View File

@@ -382,7 +382,7 @@ way to load several files at once.
Need to write test cases. Also test cases for prices in book
closing.
- price-saving in the SQL backend is probably borken, its certainly
- price-saving in the SQL backend is probably broken, its certainly
untested. Need to remove old deprecated price-lookup mechanism,
and replace w/ qofquery.

View File

@@ -61,7 +61,7 @@ here.
- Ledger The ledger is in effect documentation of the journal, in that
it describes the meaning of the transactions with respect to the
balances in the various accounts. In Xacc, this appears also to
be known as the register. It isn't clear to me that Xacc maintans
be known as the register. It isn't clear to me that Xacc maintains
the journal and the ledger separately. The ledger could easily be
expanded to include documentation of the calendar transactions,
but it is less clear that one would want to include the template
@@ -162,10 +162,10 @@ Where I'm headed for the rest of it is this:
- I expect to point out that the Journal, Calendar and
Ledger as I have described them are only tangentially
related to the budget. They are the emperical data and
related to the budget. They are the empirical data and
the Budget and the Schedule are the models. The goal
would be to have an engine that would allow one to
measure the deviation of the emperical data from
measure the deviation of the empirical data from
the model in various ways.
- I expect to talk about the task of generating both
the schedule and the budget. When one prepares this

View File

@@ -33,7 +33,7 @@ API: \ref BillTerm
\subsection entry Entry:
\subsection invoice Invoice:
Pulls together info needed to geenrate an invoice, including addresses,
Pulls together info needed to generate an invoice, including addresses,
job, the dates, the billing terms, the amounts, and the accounts
to be credited.
@@ -45,7 +45,7 @@ Derek Atkins <warlord@mit.edu>
Version of October 2003
The gncTaxTable and gncBillTerm business objects have parent, child,
refcount, invisible field in thier structures that deserve some
refcount, invisible field in their structures that deserve some
explanation:
- a child is a 'frozen' instance of a parent. For example, the tax

View File

@@ -76,7 +76,7 @@ first payment is:
T[n] = -i*n*(PV + (C*(n - 1)/2))
</pre>
<p>Note: substituing for C = -PV/N, in the equations for PV[n], I[n], P[n], and T[n]
<p>Note: substituting for C = -PV/N, in the equations for PV[n], I[n], P[n], and T[n]
would give the following equations:
<pre>

View File

@@ -51,7 +51,7 @@ certain ways. The 'double-entry' constraint belongs to this class:
it computes the total value of all the splits in a transaction, and
adds one, if needed, to bring the total to zero. This constraint
runs when the transaction is committed. Although this is an important
cosntraint, there is no (easy) way to reflect it directly in the
constraint, there is no (easy) way to reflect it directly in the
object design; thus, it acts as a rule that must be periodically
imposed.

View File

@@ -201,7 +201,7 @@ storing their C pointers.
@item If the first test succeeds and the @var{changes} hash table
of the refresh handler is non-NULL, the component should use the hash to
determine of the GNC_EVENT_DESTROY event has ocurred for the Engine
determine of the GNC_EVENT_DESTROY event has occurred for the Engine
object in question. The @var{changes} hash is a mapping from
@code{GUID}s to @code{EventInfo} structures. An @code{EventInfo}
structure has a single member, @code{event_mask}, of type

View File

@@ -63,7 +63,7 @@ the splits are zero. If there are only two splits,
then the value of one must be positive, the other negative: this denotes
that one account is debited, and another is credited by an equal
amount. By forcing the value of the splits to always 'add up' to
zero, we can gaurentee that the balances of the accounts are always
zero, we can guarantee that the balances of the accounts are always
correctly balanced.
The engine does not enforce double-entry accounting, but provides an API
@@ -78,7 +78,7 @@ This feature allows currency-trading accounts to be established.
Every Split must point to its parent Transaction, and that Transaction
must in turn include that Split in the Transaction's list of Splits. A
Split can belong to at most one Transaction. These relationships are
enforced by the engine. The engine user cannnot accidentally destroy
enforced by the engine. The engine user cannot accidentally destroy
this relationship as long as they stick to using the API and never
access internal structures directly.
@@ -231,7 +231,7 @@ The GUID does not, and never will, refer to a GnuCash entity.
The GUID refers to an Account (@pxref{Accounts}).
@item GNC_ID_TRANS
The GUID refers to a Transation (@pxref{Transactions}).
The GUID refers to a Transaction (@pxref{Transactions}).
@item GNC_ID_SPLIT
The GUID refers to a Split (@pxref{Splits}).
@@ -1015,7 +1015,7 @@ A @code{kvp_value_t} enum must have one of the following values:
@table @code
@item KVP_TYPE_NONE
Indicates the abscence of a value in a @code{kvp_frame}.
Indicates the absence of a value in a @code{kvp_frame}.
@item KVP_TYPE_INT64
A @code{gint64} value.
@@ -1218,7 +1218,7 @@ this is the 3-letter ISO4217 code (USD, AUD, etc.). For stocks
this is generally the exchange symbol (RHAT, IBM, etc.).
@item A namespace
A string identifying the context in which the mnemonic is meaninful.
A string identifying the context in which the mnemonic is meaningful.
@item A full name
The `long' name for the commodity, such as "US Dollar" or "IBM Common
@@ -1926,7 +1926,7 @@ Set the share price of @var{split} to @var{price}.
@deftypefun void xaccSplitSetSharePriceAndAmount (Split * @var{split}, gnc_numeric @var{price}, gnc_numeric @var{amount})
Set both the share price and share quantity of @var{split}. This routine
is more efficient than calling @code{xaccSplitSetShareAmount} and
@code{xaccSplitSetSharePrice} in succesion.
@code{xaccSplitSetSharePrice} in succession.
@end deftypefun
@deftypefun void xaccSplitSetValue (Split * @var{split}, gnc_numeric @var{value})
@@ -2341,7 +2341,7 @@ may modify this @code{kvp_frame}, but must not destroy it.
@end deftypefun
@deftypefun void xaccAccountSetSlots_nc (Account * @var{account}, kvp_frame * @var{frame})
Set the @code{kvp_frame} associated wih @var{account}. After the call,
Set the @code{kvp_frame} associated with @var{account}. After the call,
@var{frame} is owned by @var{account}, so don't destroy it.
@end deftypefun

View File

@@ -223,7 +223,7 @@ doxywizard doxygen.cfg &
[codehelpgpg 2004-07-25] Doxygen now copes with addgroup and this page
can be handled more easily by splitting the old single comment into repeated
comments, split into pages. I've worked on doxygen files in Kate, KWrite and XCode (MacOSX) and
the comment higlighting works fine. If you do have problems, particularly when
the comment highlighting works fine. If you do have problems, particularly when
you start a new line within an existing comment, enter a character at the end of
the last highlighted line to refresh the highlighting. Some editors have a specific
refresh option.
@@ -232,7 +232,7 @@ refresh option.
anything useful for GnuCash. Obviously doxygen only accepts "real" C
struct definitions for inclusion on that page. However, all GnuCash
data structures are defined somewhere in private headers, and only the
typedefs are publically visible. Isn't there a way to have doxygen
typedefs are publicly visible. Isn't there a way to have doxygen
show the documentation for the <i>typedefs</i> on the "Data
Structures" page? Unfortunately I don't know how.

View File

@@ -174,7 +174,7 @@ the interest, with the principal due at the end of the loan period (an
interest only loan), or large enough to fully repay both the interest and
principal during the term of the loan (a fully amoritized loan). Many loans
fall somewhere between, with payments that do not fully cover repayment of
both the principal and interst. These loans require a larger final payment
both the principal and interest. These loans require a larger final payment
(balloon) to complete their amortization. Payments may occur at the
beginning or end of a payment period. If you and your friend had agreed on
monthly repayment of the $800 loan at 12% NAR compounded monthly, twelve
@@ -317,7 +317,7 @@ whether the interest is compounded in discrete intervals or continuously.
<h2>Compounding Frequency</h2></A>
<p>The compounding Frequency, CF, is simply the number of times per year, the
monies in the financial transaction are compounded. In the U.S., monies
are usually compounded daily on bank deposits, and monthly on loans. Somtimes
are usually compounded daily on bank deposits, and monthly on loans. Sometimes
long term deposits are compounded quarterly or weekly.
<A NAME="PayFreq">
@@ -630,11 +630,11 @@ based upon the adjusted Present Value and the agreed upon Future Value.
<li>The payment#, interest paid, principal paid and remaining PV for each payment period
are computed and displayed.
<p>At the end of each year a summary is computed and displayed
and the total interest paid is diplayed at the end.
and the total interest paid is displayed at the end.
<li>A summary is computed and displayed for each year. The interest paid during the
year is computed and displayed as well as the remaining balance at years end.
<p>The total interest paid is diplayed at the end.
<p>The total interest paid is displayed at the end.
<li>An amortization schedule is computed and displayed for a common method of
advanced payment of principal.
@@ -872,7 +872,7 @@ _PMT(n,i,pv,fv,CF,PF,disc,bep), _FV(n,i,pv,pmt,CF,PF,disc,bep)</tt>.
<li>The first set of functions take no arguments and
use the calculator variables, n, i, pv, pmt, fv, CF, PF, disc
and bep to compute the desired value. The second set of functions use the values passed in
the function arguments. The first set of functions call the second set with the necssary
the function arguments. The first set of functions call the second set with the necessary
arguments.
<li>The first set of functions round the computed value returned by the call to the second set
of functions to the nearest cent. The second set of functions perform no rounding.
@@ -1855,7 +1855,7 @@ amortize the loan in 15 years.
<p>Balloon Payment
<p>On long term loans, small changes in the periodic payments can generate
large changes in the future value. If the monthly payment in the previous example is
rounded down to $1125, how much addtional (balloon) payment will be due
rounded down to $1125, how much additional (balloon) payment will be due
with the final regular payment.
<pre>
<>s

View File

@@ -335,7 +335,7 @@ may be the case that the relevant account balance is not actually posted to
the account at the time of the variable binding. If we intend to show the
user an estimation of the IPMT cell value during variable binding, then we
would need to do something creative about this ... but as it stands, we'll
leave this as an Excercise for the Reader. :)
leave this as an Exercise for the Reader. :)
\section loansdruid Druid thoughts...
@@ -466,7 +466,7 @@ http://www.interest.com/hugh/calc/mort_links.html
<Wilddev> <auspex> Wilddev: The strings need review, but there may be other changes to make first.
<Wilddev> <auspex> Wilddev: "Interest Rate Change Frequency" should perhaps be on the next page?
<Wilddev> jsled: I dont know if you did another page for this, but shouldn't there be a field for ballon amount too?
<jsled> Excellent feedback; thanks. I don't presently handle baloon payments; how do they work?
<jsled> Excellent feedback; thanks. I don't presently handle balloon payments; how do they work?
<Wilddev> I think, from what I've read before, the are an amount you pay at the end of the loan to close it
<jsled> gnc-account-sel == combo box account selection with pull-down account list [like the register] and auto-completion [hopefully]

View File

@@ -45,7 +45,7 @@ progress bar of completion.
Each stage of the import process may require some user input. What
input is required depends on the stage of the process and what the
last stage returned. In some cases stages can be skipped. For
example, during the conversion phase if the date format is unambigious
example, during the conversion phase if the date format is unambiguous
then no user input would be required and the "ask for date format
disamiguation" input can be skipped.

View File

@@ -755,7 +755,7 @@ gnc_account_class_init (AccountClass *klass)
"The smallest fraction of the commodity that is "
"tracked. This number is used as the denominator "
"value in 1/x, so a value of 100 says that the "
"commodity can be divided into hundreths. E.G."
"commodity can be divided into hundredths. E.G."
"1 USD can be divided into 100 cents.",
0,
G_MAXINT32,
@@ -1332,8 +1332,8 @@ xaccFreeAccount (Account *acc)
if (priv->children)
{
PERR (" instead of calling xaccFreeAccount(), please call \n"
" xaccAccountBeginEdit(); xaccAccountDestroy(); \n");
PERR (" instead of calling xaccFreeAccount(), please call\n"
" xaccAccountBeginEdit(); xaccAccountDestroy();\n");
/* First, recursively free children */
xaccFreeAccountChildren(acc);
@@ -1342,8 +1342,8 @@ xaccFreeAccount (Account *acc)
/* remove lots -- although these should be gone by now. */
if (priv->lots)
{
PERR (" instead of calling xaccFreeAccount(), please call \n"
" xaccAccountBeginEdit(); xaccAccountDestroy(); \n");
PERR (" instead of calling xaccFreeAccount(), please call\n"
" xaccAccountBeginEdit(); xaccAccountDestroy();\n");
for (lp = priv->lots; lp; lp = lp->next)
{
@@ -1361,8 +1361,8 @@ xaccFreeAccount (Account *acc)
if (priv->splits)
{
GList *slist;
PERR (" instead of calling xaccFreeAccount(), please call \n"
" xaccAccountBeginEdit(); xaccAccountDestroy(); \n");
PERR (" instead of calling xaccFreeAccount(), please call\n"
" xaccAccountBeginEdit(); xaccAccountDestroy();\n");
qof_instance_reset_editlevel(acc);

View File

@@ -776,7 +776,7 @@ GList * gnc_account_get_descendants (const Account *account);
*
* Note: Use this function where the results are intended for display
* to the user. If the results are internal to GnuCash or will be
* resorted at som later point in time you should use the
* resorted at some later point in time you should use the
* gnc_account_get_descendants() function.
*
* @param account The account whose descendants should be returned.

View File

@@ -380,12 +380,12 @@ gnc_sx_get_sxes_referencing_account(QofBook *book, Account *acct)
GncGUID *guid = NULL;
qof_instance_get (QOF_INSTANCE (s), "sx-account", &guid, NULL);
if (guid_equal(acct_guid, guid))
rtn = g_list_append(rtn, sx);
rtn = g_list_prepend (rtn, sx);
guid_free (guid);
}
}
return rtn;
return g_list_reverse (rtn);
}
/* ========================== END OF FILE =============================== */

View File

@@ -268,8 +268,8 @@ gnc_schedxaction_class_init (SchedXactionClass *klass)
(gobject_class,
PROP_NUM_OCCURANCE,
g_param_spec_int ("num-occurance",
"Number of occurances",
"Total number of occurances for this scheduled transaction.",
"Number of occurrences",
"Total number of occurrences for this scheduled transaction.",
0,
G_MAXINT16,
1,
@@ -279,8 +279,8 @@ gnc_schedxaction_class_init (SchedXactionClass *klass)
(gobject_class,
PROP_REM_OCCURANCE,
g_param_spec_int ("rem-occurance",
"Number of occurances remaining",
"Remaining number of occurances for this scheduled transaction.",
"Number of occurrences remaining",
"Remaining number of occurrences for this scheduled transaction.",
0,
G_MAXINT16,
1,
@@ -333,7 +333,7 @@ gnc_schedxaction_class_init (SchedXactionClass *klass)
PROP_START_DATE,
g_param_spec_boxed("start-date",
"Start Date",
"Date for the first occurence for the scheduled transaction.",
"Date for the first occurrence for the scheduled transaction.",
G_TYPE_DATE,
G_PARAM_READWRITE));
@@ -350,8 +350,8 @@ gnc_schedxaction_class_init (SchedXactionClass *klass)
(gobject_class,
PROP_LAST_OCCURANCE_DATE,
g_param_spec_boxed("last-occurance-date",
"Last Occurance Date",
"Date for the last occurance of the scheduled transaction.",
"Last Occurrence Date",
"Date for the last occurrence of the scheduled transaction.",
G_TYPE_DATE,
G_PARAM_READWRITE));
@@ -661,7 +661,7 @@ xaccSchedXactionGetEndDate(const SchedXaction *sx )
void
xaccSchedXactionSetEndDate( SchedXaction *sx, const GDate *newEnd )
{
/* Note that an invalid GDate IS a permissable value: It means that
/* Note that an invalid GDate IS a permissible value: It means that
* the SX is to run "forever". See gnc_sxed_save_sx() and
* schedXact_editor_populate() in dialog-sx-editor.c.
*/
@@ -1118,8 +1118,14 @@ gnc_sx_destroy_temporal_state (SXTmpStateData *tsd)
SXTmpStateData*
gnc_sx_clone_temporal_state (SXTmpStateData *tsd)
{
SXTmpStateData *toRet;
toRet = g_memdup (tsd, sizeof (SXTmpStateData));
SXTmpStateData *toRet = NULL;
if(tsd)
{
toRet = g_malloc(sizeof(SXTmpStateData));
toRet = memcpy (toRet, tsd, sizeof (SXTmpStateData));
}
return toRet;
}
@@ -1177,7 +1183,7 @@ gnc_sx_remove_defer_instance( SchedXaction *sx, void *deferStateData )
/**
* Returns the defer list from the SX; this is a (date-)sorted
* temporal-state-data instance list. The list should not be modified by the
* caller; use the gnc_sx_{add,remove}_defer_instance() functions to modifiy
* caller; use the gnc_sx_{add,remove}_defer_instance() functions to modify
* the list.
*
* @param sx Scheduled transaction

View File

@@ -247,7 +247,7 @@ void xaccSchedXactionSetAdvanceReminder( SchedXaction *sx, gint reminderDays );
SXTmpStateData *gnc_sx_create_temporal_state(const SchedXaction *sx );
/** Calculates the next occurrence of the given SX and stores that
* occurence in the remporalStateDate. The SX is unchanged. */
* occurrence in the remporalStateDate. The SX is unchanged. */
void gnc_sx_incr_temporal_state(const SchedXaction *sx, SXTmpStateData *stateData );
/** Frees the given stateDate object. */

View File

@@ -119,7 +119,7 @@ TransScrubOrphansFast (Transaction *trans, Account *root)
if (split->acc) continue;
DEBUG ("Found an orphan \n");
DEBUG ("Found an orphan\n");
accname = g_strconcat (_("Orphan"), "-",
gnc_commodity_get_mnemonic (trans->common_currency),
@@ -148,7 +148,7 @@ xaccAccountScrubOrphans (Account *acc, QofPercentageFunc percentagefunc)
str = xaccAccountGetName (acc);
str = str ? str : "(null)";
PINFO ("Looking for orphans in account %s \n", str);
PINFO ("Looking for orphans in account %s\n", str);
splits = xaccAccountGetSplitList(acc);
total_splits = g_list_length (splits);
@@ -357,7 +357,7 @@ xaccAccountScrubImbalance (Account *acc, QofPercentageFunc percentagefunc)
str = xaccAccountGetName(acc);
str = str ? str : "(null)";
PINFO ("Looking for imbalances in account %s \n", str);
PINFO ("Looking for imbalances in account %s\n", str);
splits = xaccAccountGetSplitList(acc);
split_count = g_list_length (splits);

View File

@@ -92,12 +92,12 @@ void xaccLotScrubDoubleBalance (GNCLot *lot);
* There are two ways to find matching subsplits. The first
* way will consider splits to be subsplits only if they
* are explicitly marked as such while splitting the original
* split. Set strict to TRUE for this matching algorhythm.
* split. Set strict to TRUE for this matching algorithm.
*
* The second way is more relaxed. It will consider any two
* splits that happen to be part of the same lot and the
* same transaction to be subsplits. Set strict to FALSE for
* this matching algorhythm.
* this matching algorithm.
*
* The routine returns TRUE if a merger was performed, else
* it returns FALSE.

View File

@@ -400,9 +400,10 @@ gncScrubLotDanglingPayments (GNCLot *lot)
if (gnc_numeric_compare (gnc_numeric_abs (free_val), gnc_numeric_abs (ll_val)) > 0)
continue;
filtered_list = g_list_append(filtered_list, free_split);
filtered_list = g_list_prepend (filtered_list, free_split);
}
filtered_list = g_list_reverse (filtered_list);
match_list = gncSLFindOffsSplits (filtered_list, ll_val);
g_list_free (filtered_list);
@@ -625,7 +626,7 @@ gncScrubBusinessAccountLots (Account *acc, QofPercentageFunc percentagefunc)
str = str ? str : "(null)";
ENTER ("(acc=%s)", str);
PINFO ("Cleaning up superfluous lot links in account %s \n", str);
PINFO ("Cleaning up superfluous lot links in account %s\n", str);
xaccAccountBeginEdit(acc);
lots = xaccAccountGetLotList(acc);
@@ -679,7 +680,7 @@ gncScrubBusinessAccountSplits (Account *acc, QofPercentageFunc percentagefunc)
str = str ? str : "(null)";
ENTER ("(acc=%s)", str);
PINFO ("Cleaning up superfluous lot links in account %s \n", str);
PINFO ("Cleaning up superfluous lot links in account %s\n", str);
xaccAccountBeginEdit(acc);
restart:

View File

@@ -893,21 +893,32 @@ xaccSplitEqual(const Split *sa, const Split *sb,
* xaccSplitListGetUniqueTransactions
********************************************************************/
GList *
xaccSplitListGetUniqueTransactions(const GList *splits)
xaccSplitListGetUniqueTransactionsReversed (const GList *splits)
{
const GList *snode;
GHashTable *txn_hash = g_hash_table_new (NULL, NULL);
GList *transList = NULL;
const GList *snode;
for(snode = splits; snode; snode = snode->next)
for (snode = splits; snode; snode = snode->next)
{
Transaction *trans = xaccSplitGetParent((Split *)(snode->data));
GList *item = g_list_find (transList, trans);
if (item == NULL)
transList = g_list_append (transList, trans);
if (g_hash_table_contains (txn_hash, trans))
continue;
g_hash_table_insert (txn_hash, trans, NULL);
transList = g_list_prepend (transList, trans);
}
g_hash_table_destroy (txn_hash);
return transList;
}
GList *
xaccSplitListGetUniqueTransactions(const GList *splits)
{
return g_list_reverse (xaccSplitListGetUniqueTransactionsReversed (splits));
}
/*################## Added for Reg2 #################*/

View File

@@ -359,6 +359,7 @@ Split * xaccSplitLookup (const GncGUID *guid, QofBook *book);
/*################## Added for Reg2 #################*/
/* Get a GList of unique transactions containing the given list of Splits. */
GList *xaccSplitListGetUniqueTransactionsReversed (const GList *splits);
GList *xaccSplitListGetUniqueTransactions(const GList *splits);
/*################## Added for Reg2 #################*/
/** Add a peer split to this split's lot-split list.

View File

@@ -42,7 +42,7 @@
static QofLogModule log_module = "gnc.translog";
/*
* Some design philosphy that I think would be good to keep in mind:
* Some design philosophy that I think would be good to keep in mind:
* (0) Simplicity and foolproofness are the over-riding design points.
* This is supposed to be a fail-safe safety net. We don't want
* our safety net to fail because of some whiz-bang shenanigans.
@@ -179,7 +179,7 @@ xaccOpenLog (void)
if (!trans_log)
{
int norr = errno;
printf ("Error: xaccOpenLog(): cannot open journal \n"
printf ("Error: xaccOpenLog(): cannot open journal\n"
"\t %d %s\n", norr, g_strerror (norr) ? g_strerror (norr) : "");
g_free (filename);

Some files were not shown because too many files have changed in this diff Show More