gnucash master: Multiple changes pushed
Geert Janssens
gjanssens at code.gnucash.org
Tue May 13 06:44:11 EDT 2014
Updated via https://github.com/Gnucash/gnucash/commit/f89e0c04 (commit)
via https://github.com/Gnucash/gnucash/commit/eeb48d63 (commit)
via https://github.com/Gnucash/gnucash/commit/b9882053 (commit)
via https://github.com/Gnucash/gnucash/commit/27959719 (commit)
via https://github.com/Gnucash/gnucash/commit/fb3d6274 (commit)
via https://github.com/Gnucash/gnucash/commit/c70dde75 (commit)
from https://github.com/Gnucash/gnucash/commit/71c31ccf (commit)
commit f89e0c04681e3913149bd231113131f3cdc96534
Merge: 71c31cc eeb48d6
Author: Geert Janssens <janssens-geert at telenet.be>
Date: Tue May 13 12:33:14 2014 +0200
Merge branch 'maint'
* Bug 688965 - Page Up, Page Down keys cause GnuCash to hang
* Bug 729157 Bill Term discount days are allowed to be more than due days
* Bug 692249 - Add Help button in Custom Reports dialog box
* Fix regression in invoice pre-payments
commit eeb48d632f43bdaa5e7ac20ae52e703b37c35ef7
Author: Geert Janssens <janssens-geert at telenet.be>
Date: Tue May 13 12:31:17 2014 +0200
Fix regression in invoice pre-payments
It was no longer possible to enter pre-payments as of 2.6.2
diff --git a/src/business/business-gnome/dialog-payment.c b/src/business/business-gnome/dialog-payment.c
index b380f3c..7b7c297 100644
--- a/src/business/business-gnome/dialog-payment.c
+++ b/src/business/business-gnome/dialog-payment.c
@@ -191,14 +191,6 @@ gnc_payment_window_check_payment (PaymentWindow *pw)
goto update_cleanup;
}
- /* Verify at least one document is selected */
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(pw->docs_list_tree_view));
- if (!gtk_tree_selection_count_selected_rows (selection))
- {
- conflict_msg = _("You must select at least one document or pre-payment to process.");
- goto update_cleanup;
- }
-
/* Test the total amount */
amount_deb = gnc_amount_edit_get_amount (GNC_AMOUNT_EDIT (pw->amount_debit_edit));
amount_cred = gnc_amount_edit_get_amount (GNC_AMOUNT_EDIT (pw->amount_credit_edit));
@@ -207,7 +199,9 @@ gnc_payment_window_check_payment (PaymentWindow *pw)
GNC_HOW_RND_ROUND_HALF_UP);
if (gnc_numeric_check (pw->amount_tot) || gnc_numeric_zero_p (pw->amount_tot))
+ {
enable_xfer_acct = FALSE;
+ }
else
{
/* Verify the user has selected a transfer account */
commit b988205382127adf9533b8611ec22a1fbdaea3bc
Author: Michalis Kamprianis <michalis at linuxmail.org>
Date: Sun May 11 12:46:37 2014 +0200
Bug 692249 - Add Help button in Custom Reports dialog box
modified: src/gnome-utils/gnc-ui.h
modified: src/report/report-gnome/dialog-custom-report.c
modified: src/report/report-gnome/dialog-custom-report.glade
diff --git a/src/gnome-utils/gnc-ui.h b/src/gnome-utils/gnc-ui.h
index ccd7323..18d21a0 100644
--- a/src/gnome-utils/gnc-ui.h
+++ b/src/gnome-utils/gnc-ui.h
@@ -68,6 +68,7 @@
#define HL_SXEDITOR "tool-sched"
#define HL_BOOK_OPTIONS "book-options"
#define HL_CLOSE_BOOK "tool-close-book"
+#define HL_USAGE_CUSTOMREP "report-custom"
/* GTK Windows - Common Response Codes */
diff --git a/src/report/report-gnome/dialog-custom-report.c b/src/report/report-gnome/dialog-custom-report.c
index 3e642ff..8daf692 100644
--- a/src/report/report-gnome/dialog-custom-report.c
+++ b/src/report/report-gnome/dialog-custom-report.c
@@ -80,6 +80,7 @@ typedef struct _CustomReportDialog
} CustomReportDialog;
void custom_report_dialog_close_cb(GtkWidget* widget, gpointer data);
+void custom_report_help_cb(GtkWidget* widget, gpointer data);
void close_custom_report_clicked_cb(GtkWidget* widget, gpointer data);
void custom_report_list_view_row_activated_cb(GtkTreeView *view, GtkTreePath *path,
GtkTreeViewColumn *column, gpointer data);
@@ -102,6 +103,11 @@ custom_report_dialog_close_cb(GtkWidget* widget, gpointer data)
g_free(crd);
}
+void
+custom_report_help_cb (GtkWidget *widget, gpointer data)
+{
+ gnc_gnome_help(HF_HELP, HL_USAGE_CUSTOMREP);
+}
void
close_custom_report_clicked_cb(GtkWidget* widget, gpointer data)
diff --git a/src/report/report-gnome/dialog-custom-report.glade b/src/report/report-gnome/dialog-custom-report.glade
index 5f13edd..d72ab92 100644
--- a/src/report/report-gnome/dialog-custom-report.glade
+++ b/src/report/report-gnome/dialog-custom-report.glade
@@ -22,6 +22,23 @@
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
+ <object class="GtkButton" id="helpbutton">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="custom_report_help_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkButton" id="close_report_button">
<property name="label">gtk-close</property>
<property name="visible">True</property>
@@ -37,7 +54,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
commit 279597193544865857e22aec8894945d446b29d9
Author: Geert Janssens <janssens-geert at telenet.be>
Date: Tue May 13 11:25:20 2014 +0200
Avoid defining the same translatable string twice
diff --git a/src/business/business-gnome/dialog-billterms.c b/src/business/business-gnome/dialog-billterms.c
index e4d3a80..839edd1 100644
--- a/src/business/business-gnome/dialog-billterms.c
+++ b/src/business/business-gnome/dialog-billterms.c
@@ -262,7 +262,7 @@ billterm_to_ui (GncBillTerm *term, GtkWidget *desc, BillTermNB *notebook)
static gboolean
verify_term_ok (NewBillTerm *nbt)
{
- char *message;
+ char *message = _("Discount days cannot be more than due days.");
gboolean result;
BillTermNB *notebook;
gint days_due_days, days_disc_days;
@@ -287,7 +287,6 @@ verify_term_ok (NewBillTerm *nbt)
case GNC_TERM_TYPE_DAYS:
if (days_due_days<days_disc_days)
{
- message = _("Discount days cannot be more than due days.");
gnc_error_dialog (nbt->dialog, "%s", message);
result=FALSE;
}
@@ -295,7 +294,6 @@ verify_term_ok (NewBillTerm *nbt)
case GNC_TERM_TYPE_PROXIMO:
if (prox_due_days<prox_disc_days)
{
- message = _("Discount days cannot be more than due days.");
gnc_error_dialog (nbt->dialog, "%s", message);
result=FALSE;
}
commit fb3d6274f5d2c89851a3f220ee0477ce6778a604
Author: Michalis Kamprianis <michalis at linuxmail.org>
Date: Tue Apr 29 01:26:30 2014 +0200
Bug 729157 Bill Term discount days are allowed to be more than due days
Fixed function verify_term_ok to check that discount days are no more
(or later) than due days
modified: src/business/business-gnome/dialog-billterms.c
diff --git a/src/business/business-gnome/dialog-billterms.c b/src/business/business-gnome/dialog-billterms.c
index cd69954..e4d3a80 100644
--- a/src/business/business-gnome/dialog-billterms.c
+++ b/src/business/business-gnome/dialog-billterms.c
@@ -263,25 +263,46 @@ static gboolean
verify_term_ok (NewBillTerm *nbt)
{
char *message;
- gnc_numeric num;
+ gboolean result;
+ BillTermNB *notebook;
+ gint days_due_days, days_disc_days;
+ gint prox_due_days, prox_disc_days;
- return TRUE;
+ days_due_days=0;
+ days_disc_days=0;
+ prox_due_days=0;
+ prox_disc_days=0;
- /* verify the discount day(s) is less than the due day(s) */
- num = gnc_numeric_zero ();
- if (gnc_numeric_negative_p (num))
- {
- message = _("Negative amounts are not allowed.");
- gnc_error_dialog (nbt->dialog, "%s", message);
- return FALSE;
- }
- if (gnc_numeric_compare (num, gnc_numeric_create (100, 1)) > 0)
+ notebook = &nbt->notebook;
+ result=TRUE;
+
+
+ days_due_days=gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (notebook->days_due_days));
+ days_disc_days=gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (notebook->days_disc_days));
+ prox_due_days=gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (notebook->prox_due_day));
+ prox_disc_days=gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (notebook->prox_disc_day));
+
+ switch (nbt->notebook.type)
{
- message = _("Percentage amount must be between 0 and 100.");
- gnc_error_dialog (nbt->dialog, "%s", message);
- return FALSE;
+ case GNC_TERM_TYPE_DAYS:
+ if (days_due_days<days_disc_days)
+ {
+ message = _("Discount days cannot be more than due days.");
+ gnc_error_dialog (nbt->dialog, "%s", message);
+ result=FALSE;
+ }
+ break;
+ case GNC_TERM_TYPE_PROXIMO:
+ if (prox_due_days<prox_disc_days)
+ {
+ message = _("Discount days cannot be more than due days.");
+ gnc_error_dialog (nbt->dialog, "%s", message);
+ result=FALSE;
+ }
+ break;
}
- return TRUE;
+
+ return result;
}
static gboolean
commit c70dde75a5354f416d5ec1727ee4b89bff4158ec
Author: Geert Janssens <janssens-geert at telenet.be>
Date: Fri May 9 11:36:46 2014 +0200
Bug 688965 - Page Up, Page Down keys cause GnuCash to hang
diff --git a/src/register/register-core/table-allgui.c b/src/register/register-core/table-allgui.c
index 3163a66..3a9041f 100644
--- a/src/register/register-core/table-allgui.c
+++ b/src/register/register-core/table-allgui.c
@@ -1762,6 +1762,8 @@ gnc_table_traverse_update(Table *table,
{
VirtualLocation new_loc = *dest_loc;
int increment;
+ int col_offset = 0;
+ gboolean second_traversal = FALSE;
/* Keep going in the specified direction until we find a valid
* row to land on, or we hit the end of the table. At the end,
@@ -1781,8 +1783,25 @@ gnc_table_traverse_update(Table *table,
if (!gnc_table_move_vertical_position (table, &new_loc, increment))
{
+ /* Special case: if there is no valid cell at all in the column
+ * we are scanning, (both up and down directions didn't work)
+ * attempt to do the same in the next column.
+ * Hack alert: there is no check to see if there really is a
+ * valid next column. However this situation so far only happens
+ * after a pagedown/pageup key event in the SX transaction editor
+ * which always tests the first column to start (which has no
+ * editable cells) and in that situation there is a valid next column.
+ */
+ if (!second_traversal)
+ second_traversal = TRUE;
+ else
+ {
+ second_traversal = FALSE;
+ col_offset++;
+ }
increment *= -1;
new_loc = *dest_loc;
+ new_loc.phys_col_offset = new_loc.phys_col_offset + col_offset;
}
}
Summary of changes:
src/business/business-gnome/dialog-billterms.c | 51 +++++++++++++++-------
src/business/business-gnome/dialog-payment.c | 10 +----
src/gnome-utils/gnc-ui.h | 1 +
src/register/register-core/table-allgui.c | 19 ++++++++
src/report/report-gnome/dialog-custom-report.c | 6 +++
src/report/report-gnome/dialog-custom-report.glade | 19 +++++++-
6 files changed, 81 insertions(+), 25 deletions(-)
More information about the gnucash-changes
mailing list