gnucash master: Multiple changes pushed
Frank H. Ellenberger
fell at code.gnucash.org
Sun Dec 27 05:50:30 EST 2015
Updated via https://github.com/Gnucash/gnucash/commit/54d696db (commit)
via https://github.com/Gnucash/gnucash/commit/51ff4e16 (commit)
via https://github.com/Gnucash/gnucash/commit/1aa941cb (commit)
via https://github.com/Gnucash/gnucash/commit/8838cee7 (commit)
via https://github.com/Gnucash/gnucash/commit/9c4ea35d (commit)
via https://github.com/Gnucash/gnucash/commit/3327d20e (commit)
via https://github.com/Gnucash/gnucash/commit/ac149b7d (commit)
via https://github.com/Gnucash/gnucash/commit/5370124d (commit)
from https://github.com/Gnucash/gnucash/commit/ab41c01d (commit)
commit 54d696db759adff8aea7a3dab74dce84bbb101a4
Merge: 9c4ea35 51ff4e1
Author: fell <f.ellenberger at online.de>
Date: Sun Dec 27 10:43:46 2015 +0100
Merge branch 'maint'
Conflicts:
src/gnome/gnc-plugin-basic-commands.c
diff --cc src/gnome/gnc-plugin-basic-commands.c
index a964b0a,e4e9624..2e25594
--- a/src/gnome/gnc-plugin-basic-commands.c
+++ b/src/gnome/gnc-plugin-basic-commands.c
@@@ -181,9 -181,11 +181,8 @@@ static GtkActionEntry gnc_plugin_action
#endif // CLOSE_BOOKS_ACTUALLY_WORKS
/* Tools menu */
-
{
- /* Translators: This entry opens the Price Database window
- * and will be renamed to "_Price Database" in v.2.8 */
-
- "ToolsPriceEditorAction", NULL, N_("_Price Editor"), NULL,
+ "ToolsPriceEditorAction", NULL, N_("_Price Database"), NULL,
N_("View and edit the prices for stocks and mutual funds"),
G_CALLBACK (gnc_main_window_cmd_tools_price_editor)
},
commit 51ff4e166874043591633c0880cc43d3a9ef1407
Author: fell <f.ellenberger at online.de>
Date: Sun Dec 27 10:22:35 2015 +0100
Add a few more eclipse specific files to gitignore
diff --git a/.gitignore b/.gitignore
index 3b294c1..298aa6c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@
*.pyo
*.schemas
*~
+.autotools
.cproject
.deps
.libs
@@ -256,3 +257,4 @@ DerivedData/
*.perspectivev3
xcuserdata/
messages.mo
+/.settings/
commit 1aa941cbf4e8692ae2e02a66550cdfc544039009
Author: fell <f.ellenberger at online.de>
Date: Sun Dec 27 10:19:00 2015 +0100
Postpone the renaming of the menu entry "_Price Editor" to the next main
release.
diff --git a/src/gnome/gnc-plugin-basic-commands.c b/src/gnome/gnc-plugin-basic-commands.c
index a964b0a..e4e9624 100644
--- a/src/gnome/gnc-plugin-basic-commands.c
+++ b/src/gnome/gnc-plugin-basic-commands.c
@@ -181,9 +181,11 @@ static GtkActionEntry gnc_plugin_actions [] =
#endif // CLOSE_BOOKS_ACTUALLY_WORKS
/* Tools menu */
-
{
- "ToolsPriceEditorAction", NULL, N_("_Price Database"), NULL,
+ /* Translators: This entry opens the Price Database window
+ * and will be renamed to "_Price Database" in v.2.8 */
+
+ "ToolsPriceEditorAction", NULL, N_("_Price Editor"), NULL,
N_("View and edit the prices for stocks and mutual funds"),
G_CALLBACK (gnc_main_window_cmd_tools_price_editor)
},
commit 8838cee7cabe62c0300660f685e8070e9989c78e
Author: Grzegorz Milka <grzegorzmilka at gmail.com>
Date: Sat Dec 26 15:34:01 2015 -0800
Bug 759859 - Reconcilation does not convert transactions' currency to the main one making reconcilation impossible.
Disable the Include subaccounts checkbox if there are descendant accounts with different commodities.
diff --git a/src/gnome/gtkbuilder/window-reconcile.glade b/src/gnome/gtkbuilder/window-reconcile.glade
index 9c90f0b..7e26057 100644
--- a/src/gnome/gtkbuilder/window-reconcile.glade
+++ b/src/gnome/gtkbuilder/window-reconcile.glade
@@ -96,6 +96,8 @@
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="gnc_start_recn_children_changed"/>
+ <property name="tooltip_text" translatable="yes">Include all descendant accounts in the reconcile. All of them must use the same commodity as this one.</property>
+
</object>
<packing>
<property name="left_attach">1</property>
diff --git a/src/gnome/window-reconcile.c b/src/gnome/window-reconcile.c
index f29b5ad..6813161 100644
--- a/src/gnome/window-reconcile.c
+++ b/src/gnome/window-reconcile.c
@@ -175,6 +175,41 @@ static GtkActionEntry recnWindow_actions [];
/** The number of actions provided by the main window. */
static guint recnWindow_n_actions;
+static gpointer
+commodity_compare(Account *account, gpointer user_data) {
+ gboolean equal = gnc_commodity_equiv (xaccAccountGetCommodity (account),
+ (gnc_commodity*) user_data);
+
+ return equal ? NULL : account;
+}
+
+
+/********************************************************************\
+ * has_account_different_commodities *
+ * *
+ * Args: parent account - the account to look in *
+ * Return: true if there exists a subaccount with different *
+ * commodity then the parent account. *
+\********************************************************************/
+static gboolean
+has_account_different_commodities(const Account *account)
+{
+ gnc_commodity *parent_commodity;
+ gpointer result;
+
+ if (account == NULL)
+ return FALSE;
+
+ parent_commodity = xaccAccountGetCommodity (account);
+
+ result = gnc_account_foreach_descendant_until (account,
+ commodity_compare,
+ parent_commodity);
+
+ return result != NULL;
+}
+
+
/********************************************************************\
* recnRefresh *
* refreshes the transactions in the reconcile window *
@@ -658,6 +693,7 @@ startRecnWindow(GtkWidget *parent, Account *account,
gboolean auto_interest_xfer_option;
GNCPrintAmountInfo print_info;
gnc_numeric ending;
+ gboolean has_uniform_currency;
char *title;
int result;
@@ -675,7 +711,8 @@ startRecnWindow(GtkWidget *parent, Account *account,
auto_interest_xfer_option =
gnc_recn_interest_xfer_get_auto_interest_xfer_allowed( account );
- data.include_children = xaccAccountGetReconcileChildrenStatus(account);
+ data.include_children = !has_account_different_commodities(account) &&
+ xaccAccountGetReconcileChildrenStatus(account);
ending = gnc_ui_account_get_reconciled_balance(account,
data.include_children);
@@ -1586,6 +1623,7 @@ RecnWindow *
recnWindow (GtkWidget *parent, Account *account)
{
gnc_numeric new_ending;
+ gboolean enable_subaccounts;
time64 statement_date;
if (account == NULL)
@@ -1603,9 +1641,11 @@ recnWindow (GtkWidget *parent, Account *account)
gnc_get_reconcile_info (account, &new_ending, &statement_date);
+ enable_subaccounts = !has_account_different_commodities(account);
/* Popup a little window to prompt the user to enter the
* ending balance for his/her bank statement */
- if (!startRecnWindow (parent, account, &new_ending, &statement_date, TRUE))
+ if (!startRecnWindow (parent, account, &new_ending, &statement_date,
+ enable_subaccounts))
return NULL;
return recnWindowWithBalance (parent, account, new_ending, statement_date);
commit 9c4ea35d15adb2d497fc32fdc41e1b386ef86d3f
Author: fell <f.ellenberger at online.de>
Date: Sat Dec 26 05:19:06 2015 +0100
Price Editor - use different names for different windows
Rename the main window to "price database"
diff --git a/src/gnome/gnc-plugin-basic-commands.c b/src/gnome/gnc-plugin-basic-commands.c
index 40089d9..a964b0a 100644
--- a/src/gnome/gnc-plugin-basic-commands.c
+++ b/src/gnome/gnc-plugin-basic-commands.c
@@ -183,7 +183,7 @@ static GtkActionEntry gnc_plugin_actions [] =
/* Tools menu */
{
- "ToolsPriceEditorAction", NULL, N_("_Price Editor"), NULL,
+ "ToolsPriceEditorAction", NULL, N_("_Price Database"), NULL,
N_("View and edit the prices for stocks and mutual funds"),
G_CALLBACK (gnc_main_window_cmd_tools_price_editor)
},
diff --git a/src/gnome/gtkbuilder/dialog-price.glade b/src/gnome/gtkbuilder/dialog-price.glade
index 51dcec0..724eac0 100644
--- a/src/gnome/gtkbuilder/dialog-price.glade
+++ b/src/gnome/gtkbuilder/dialog-price.glade
@@ -526,7 +526,7 @@
<object class="GtkDialog" id="Prices Dialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Price Editor</property>
+ <property name="title" translatable="yes">Price Database</property>
<property name="default_width">400</property>
<property name="default_height">400</property>
<property name="type_hint">normal</property>
commit 3327d20e8e8810b31f2011f337070c7f48613e57
Author: Mike Evans <mikee at saxicola.co.uk>
Date: Sun Dec 20 13:16:54 2015 +0000
Bug 759674 - GNUCash crashes when importing invoices or bills with delimited import
Make sure all instances of gchar* have *some* value, ie NULL, else undefined behavior occurs
when free is called on those objects.
diff --git a/src/plugins/bi_import/dialog-bi-import-gui.c b/src/plugins/bi_import/dialog-bi-import-gui.c
index c9a3b8f..882a26a 100644
--- a/src/plugins/bi_import/dialog-bi-import-gui.c
+++ b/src/plugins/bi_import/dialog-bi-import-gui.c
@@ -75,7 +75,7 @@ void gnc_import_gui_type_cb (GtkWidget *widget, gpointer data);
// utils
static gchar *gnc_input_dialog (GtkWidget *parent, const gchar *title, const gchar *msg, const gchar *default_input);
static void gnc_info2_dialog (GtkWidget *parent, const gchar *title, const gchar *msg);
-
+static QofLogModule log_module = G_LOG_DOMAIN; //G_LOG_BUSINESS;
BillImportGui *
gnc_plugin_bi_import_showGUI(void)
@@ -167,7 +167,7 @@ static gchar *
gnc_plugin_bi_import_getFilename(void)
{
// prepare file import dialog
- gchar *filename;
+ gchar *filename = NULL;
GList *filters;
GtkFileFilter *filter;
filters = NULL;
@@ -264,7 +264,7 @@ gnc_bi_import_gui_destroy_cb (GtkWidget *widget, gpointer data)
void gnc_bi_import_gui_buttonOpen_cb (GtkWidget *widget, gpointer data)
{
- gchar *filename;
+ gchar *filename = NULL;
BillImportGui *gui = data;
filename = gnc_plugin_bi_import_getFilename();
@@ -328,7 +328,7 @@ void gnc_bi_import_gui_option4_cb (GtkWidget *widget, gpointer data)
void gnc_bi_import_gui_option5_cb (GtkWidget *widget, gpointer data)
{
BillImportGui *gui = data;
- gchar *temp;
+ gchar *temp = NULL;
if (!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(widget) ))
return;
temp = gnc_input_dialog (0, _("Adjust regular expression used for import"), _("This regular expression is used to parse the import file. Modify according to your needs.\n"), gui->regexp->str);
@@ -343,7 +343,7 @@ void gnc_bi_import_gui_option5_cb (GtkWidget *widget, gpointer data)
void gnc_bi_import_gui_open_mode_cb (GtkWidget *widget, gpointer data)
{
BillImportGui *gui = data;
- const gchar *name;
+ const gchar *name = NULL;
name = gtk_buildable_get_name(GTK_BUILDABLE(widget));
if (!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(widget) ))
return;
@@ -359,7 +359,7 @@ void gnc_bi_import_gui_open_mode_cb (GtkWidget *widget, gpointer data)
void gnc_import_gui_type_cb (GtkWidget *widget, gpointer data)
{
BillImportGui *gui = data;
- const gchar *name;
+ const gchar *name = NULL;
name = gtk_buildable_get_name(GTK_BUILDABLE(widget));
if (!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(widget) ))
return;
@@ -391,7 +391,7 @@ gnc_input_dialog (GtkWidget *parent, const gchar *title, const gchar *msg, const
gint result;
GtkWidget *view;
GtkTextBuffer *buffer;
- gchar *user_input;
+ gchar *user_input = NULL;
GtkTextIter start, end;
/* Create the widgets */
diff --git a/src/plugins/bi_import/dialog-bi-import.c b/src/plugins/bi_import/dialog-bi-import.c
index ec11ace..a67d255 100644
--- a/src/plugins/bi_import/dialog-bi-import.c
+++ b/src/plugins/bi_import/dialog-bi-import.c
@@ -90,8 +90,9 @@ gnc_bi_import_read_file (const gchar * filename, const gchar * parser_regexp,
FILE *f;
// regexp
- char *line;
- gchar *line_utf8, *temp;
+ char *line = NULL;
+ gchar *line_utf8 = NULL;
+ gchar *temp = NULL;
GMatchInfo *match_info;
GError *err;
GRegex *regexpat;
@@ -233,7 +234,8 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * fixed, guint * deleted,
{
GtkTreeIter iter;
gboolean valid, row_deleted, row_fixed;
- gchar *id, *date_opened, *date_posted, *due_date, *owner_id, *date, *quantity, *price;
+ gchar *id = NULL, *date_opened = NULL, *date_posted = NULL, *due_date = NULL,
+ *owner_id = NULL, *date = NULL, *quantity = NULL, *price = NULL;
GString *prev_id, *prev_date_opened, *prev_date_posted, *prev_owner_id, *prev_date; // needed to fix multi line invoices
guint dummy;
gint row = 1;
@@ -511,11 +513,12 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
{
gboolean valid;
GtkTreeIter iter;
- gchar *id, *date_opened, *owner_id, *billing_id, *notes;
- gchar *date, *desc, *action, *account, *quantity, *price, *disc_type,
- *disc_how, *discount, *taxable, *taxincluded, *tax_table;
- gchar *date_posted, *due_date, *account_posted, *memo_posted,
- *accumulatesplits;
+ gchar *id = NULL, *date_opened = NULL, *owner_id = NULL, *billing_id = NULL, *notes = NULL;
+ gchar *date = NULL, *desc = NULL, *action = NULL, *account = NULL, *quantity = NULL,
+ *price = NULL, *disc_type = NULL, *disc_how = NULL, *discount = NULL, *taxable = NULL,
+ *taxincluded = NULL, *tax_table = NULL;
+ gchar *date_posted = NULL, *due_date = NULL, *account_posted = NULL, *memo_posted = NULL,
+ *accumulatesplits = NULL;
guint dummy;
GncInvoice *invoice;
GncEntry *entry;
commit ac149b7d090deee7df1b174cdb67a22cc3822d02
Author: fell <f.ellenberger at online.de>
Date: Sat Dec 26 05:19:06 2015 +0100
Price Editor - use different names for different windows
Rename the main window to "price database"
diff --git a/src/gnome/gnc-plugin-basic-commands.c b/src/gnome/gnc-plugin-basic-commands.c
index 40089d9..a964b0a 100644
--- a/src/gnome/gnc-plugin-basic-commands.c
+++ b/src/gnome/gnc-plugin-basic-commands.c
@@ -183,7 +183,7 @@ static GtkActionEntry gnc_plugin_actions [] =
/* Tools menu */
{
- "ToolsPriceEditorAction", NULL, N_("_Price Editor"), NULL,
+ "ToolsPriceEditorAction", NULL, N_("_Price Database"), NULL,
N_("View and edit the prices for stocks and mutual funds"),
G_CALLBACK (gnc_main_window_cmd_tools_price_editor)
},
diff --git a/src/gnome/gtkbuilder/dialog-price.glade b/src/gnome/gtkbuilder/dialog-price.glade
index 51dcec0..724eac0 100644
--- a/src/gnome/gtkbuilder/dialog-price.glade
+++ b/src/gnome/gtkbuilder/dialog-price.glade
@@ -526,7 +526,7 @@
<object class="GtkDialog" id="Prices Dialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Price Editor</property>
+ <property name="title" translatable="yes">Price Database</property>
<property name="default_width">400</property>
<property name="default_height">400</property>
<property name="type_hint">normal</property>
commit 5370124dc1368ebe19924a04b4f08e0c174c8dd7
Author: Mike Evans <mikee at saxicola.co.uk>
Date: Sun Dec 20 13:16:54 2015 +0000
Bug 759674 - GNUCash crashes when importing invoices or bills with delimited import
Make sure all instances of gchar* have *some* value, ie NULL, else undefined behavior occurs
when free is called on those objects.
diff --git a/src/plugins/bi_import/dialog-bi-import-gui.c b/src/plugins/bi_import/dialog-bi-import-gui.c
index c9a3b8f..882a26a 100644
--- a/src/plugins/bi_import/dialog-bi-import-gui.c
+++ b/src/plugins/bi_import/dialog-bi-import-gui.c
@@ -75,7 +75,7 @@ void gnc_import_gui_type_cb (GtkWidget *widget, gpointer data);
// utils
static gchar *gnc_input_dialog (GtkWidget *parent, const gchar *title, const gchar *msg, const gchar *default_input);
static void gnc_info2_dialog (GtkWidget *parent, const gchar *title, const gchar *msg);
-
+static QofLogModule log_module = G_LOG_DOMAIN; //G_LOG_BUSINESS;
BillImportGui *
gnc_plugin_bi_import_showGUI(void)
@@ -167,7 +167,7 @@ static gchar *
gnc_plugin_bi_import_getFilename(void)
{
// prepare file import dialog
- gchar *filename;
+ gchar *filename = NULL;
GList *filters;
GtkFileFilter *filter;
filters = NULL;
@@ -264,7 +264,7 @@ gnc_bi_import_gui_destroy_cb (GtkWidget *widget, gpointer data)
void gnc_bi_import_gui_buttonOpen_cb (GtkWidget *widget, gpointer data)
{
- gchar *filename;
+ gchar *filename = NULL;
BillImportGui *gui = data;
filename = gnc_plugin_bi_import_getFilename();
@@ -328,7 +328,7 @@ void gnc_bi_import_gui_option4_cb (GtkWidget *widget, gpointer data)
void gnc_bi_import_gui_option5_cb (GtkWidget *widget, gpointer data)
{
BillImportGui *gui = data;
- gchar *temp;
+ gchar *temp = NULL;
if (!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(widget) ))
return;
temp = gnc_input_dialog (0, _("Adjust regular expression used for import"), _("This regular expression is used to parse the import file. Modify according to your needs.\n"), gui->regexp->str);
@@ -343,7 +343,7 @@ void gnc_bi_import_gui_option5_cb (GtkWidget *widget, gpointer data)
void gnc_bi_import_gui_open_mode_cb (GtkWidget *widget, gpointer data)
{
BillImportGui *gui = data;
- const gchar *name;
+ const gchar *name = NULL;
name = gtk_buildable_get_name(GTK_BUILDABLE(widget));
if (!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(widget) ))
return;
@@ -359,7 +359,7 @@ void gnc_bi_import_gui_open_mode_cb (GtkWidget *widget, gpointer data)
void gnc_import_gui_type_cb (GtkWidget *widget, gpointer data)
{
BillImportGui *gui = data;
- const gchar *name;
+ const gchar *name = NULL;
name = gtk_buildable_get_name(GTK_BUILDABLE(widget));
if (!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(widget) ))
return;
@@ -391,7 +391,7 @@ gnc_input_dialog (GtkWidget *parent, const gchar *title, const gchar *msg, const
gint result;
GtkWidget *view;
GtkTextBuffer *buffer;
- gchar *user_input;
+ gchar *user_input = NULL;
GtkTextIter start, end;
/* Create the widgets */
diff --git a/src/plugins/bi_import/dialog-bi-import.c b/src/plugins/bi_import/dialog-bi-import.c
index ec11ace..a67d255 100644
--- a/src/plugins/bi_import/dialog-bi-import.c
+++ b/src/plugins/bi_import/dialog-bi-import.c
@@ -90,8 +90,9 @@ gnc_bi_import_read_file (const gchar * filename, const gchar * parser_regexp,
FILE *f;
// regexp
- char *line;
- gchar *line_utf8, *temp;
+ char *line = NULL;
+ gchar *line_utf8 = NULL;
+ gchar *temp = NULL;
GMatchInfo *match_info;
GError *err;
GRegex *regexpat;
@@ -233,7 +234,8 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * fixed, guint * deleted,
{
GtkTreeIter iter;
gboolean valid, row_deleted, row_fixed;
- gchar *id, *date_opened, *date_posted, *due_date, *owner_id, *date, *quantity, *price;
+ gchar *id = NULL, *date_opened = NULL, *date_posted = NULL, *due_date = NULL,
+ *owner_id = NULL, *date = NULL, *quantity = NULL, *price = NULL;
GString *prev_id, *prev_date_opened, *prev_date_posted, *prev_owner_id, *prev_date; // needed to fix multi line invoices
guint dummy;
gint row = 1;
@@ -511,11 +513,12 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
{
gboolean valid;
GtkTreeIter iter;
- gchar *id, *date_opened, *owner_id, *billing_id, *notes;
- gchar *date, *desc, *action, *account, *quantity, *price, *disc_type,
- *disc_how, *discount, *taxable, *taxincluded, *tax_table;
- gchar *date_posted, *due_date, *account_posted, *memo_posted,
- *accumulatesplits;
+ gchar *id = NULL, *date_opened = NULL, *owner_id = NULL, *billing_id = NULL, *notes = NULL;
+ gchar *date = NULL, *desc = NULL, *action = NULL, *account = NULL, *quantity = NULL,
+ *price = NULL, *disc_type = NULL, *disc_how = NULL, *discount = NULL, *taxable = NULL,
+ *taxincluded = NULL, *tax_table = NULL;
+ gchar *date_posted = NULL, *due_date = NULL, *account_posted = NULL, *memo_posted = NULL,
+ *accumulatesplits = NULL;
guint dummy;
GncInvoice *invoice;
GncEntry *entry;
Summary of changes:
.gitignore | 2 ++
src/gnome/gnc-plugin-basic-commands.c | 3 +-
src/gnome/gtkbuilder/dialog-price.glade | 2 +-
src/gnome/gtkbuilder/window-reconcile.glade | 2 ++
src/gnome/window-reconcile.c | 44 ++++++++++++++++++++++++++--
src/plugins/bi_import/dialog-bi-import-gui.c | 14 ++++-----
src/plugins/bi_import/dialog-bi-import.c | 19 +++++++-----
7 files changed, 66 insertions(+), 20 deletions(-)
More information about the gnucash-changes
mailing list