gnucash master: Multiple changes pushed

Geert Janssens gjanssens at code.gnucash.org
Thu Mar 16 16:40:01 EDT 2017


Updated	 via  https://github.com/Gnucash/gnucash/commit/79df9b5c (commit)
	 via  https://github.com/Gnucash/gnucash/commit/43e4b7ff (commit)
	 via  https://github.com/Gnucash/gnucash/commit/a8ebc794 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/9144edb4 (commit)
	from  https://github.com/Gnucash/gnucash/commit/954110c4 (commit)



commit 79df9b5c2662abb93938867157f9813fc9855f5b
Merge: a8ebc79 43e4b7f
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Thu Mar 16 21:39:06 2017 +0100

    Merge branch 'maint'


commit 43e4b7ff70e328c19e85d79d9bbf87ccc943a2ac
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Mar 11 11:51:32 2017 +0000

    Bug 779411 - jqplot fixes for piechart and syntax error.
    
    With the piechart in combination with other charts you have to set the
    highlighter and cursor show tooltip to false which stops seen errors.
    
    The syntax errors are caused by only removing the duplicated js files
    and not the whole path so changed that to remove whole line.

diff --git a/src/report/report-system/html-piechart.scm b/src/report/report-system/html-piechart.scm
index 7bff905..0194c55 100644
--- a/src/report/report-system/html-piechart.scm
+++ b/src/report/report-system/html-piechart.scm
@@ -238,6 +238,10 @@
                     legend: {
                          show: true,
                          placement: \"outsideGrid\", },
+                    highlighter: {
+                         show: false },
+                    cursor: {
+                         showTooltip: false },
                    };\n")
 
             (if title
diff --git a/src/report/report-system/report.scm b/src/report/report-system/report.scm
index 43b11f5..453ad79 100644
--- a/src/report/report-system/report.scm
+++ b/src/report/report-system/report.scm
@@ -755,8 +755,8 @@
        (if report
 	   (begin 
 	     (set! html (gnc:report-render-html report #t))
-             (set! html (gnc:substring-replace-from-to html "jquery.min.js" "" 2 -1))
-             (set! html (gnc:substring-replace-from-to html "jquery.jqplot.js" "" 2 -1))
+             (set! html (gnc:substring-replace-from-to html (gnc:html-js-include "jqplot/jquery.min.js") "" 2 -1))
+             (set! html (gnc:substring-replace-from-to html (gnc:html-js-include "jqplot/jquery.jqplot.js") "" 2 -1))
            ))))
     (gnc-unset-busy-cursor '())
     html))

commit a8ebc794abcaedd3df70d40388059984c718eef0
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Mon Mar 13 11:02:30 2017 +0000

    Bug388500 - Add option to remove deleted files from the history list
    
    If a file is opened from the history list and does not exist the dialog
    advises of this and asks if it should be removed from the list. If a
    file is opened from the command line and does not exist, the normal
    dialog is used

diff --git a/src/bin/gnucash-bin.c b/src/bin/gnucash-bin.c
index 0f5eebf..dd5ab49 100644
--- a/src/bin/gnucash-bin.c
+++ b/src/bin/gnucash-bin.c
@@ -605,7 +605,10 @@ get_file_to_load()
     if (file_to_load)
         return g_strdup(file_to_load);
     else
+    {
+        gnc_history_set_file_from_history(TRUE);
         return gnc_history_get_last();
+    }
 }
 
 static void
@@ -654,6 +657,7 @@ inner_main (void *closure, int argc, char **argv)
     {
         gnc_update_splash_screen(_("Loading data..."), GNC_SPLASH_PERCENTAGE_UNKNOWN);
         gnc_file_open_file(fn, /*open_readonly*/ FALSE);
+        gnc_history_set_file_from_history(FALSE);
         g_free(fn);
     }
     else if (gnc_prefs_get_bool(GNC_PREFS_GROUP_NEW_USER, GNC_PREF_FIRST_STARTUP))
diff --git a/src/gnome-utils/gnc-file.c b/src/gnome-utils/gnc-file.c
index fe02810..881fe11 100644
--- a/src/gnome-utils/gnc-file.c
+++ b/src/gnome-utils/gnc-file.c
@@ -374,8 +374,17 @@ show_session_error (QofBackendError io_error,
         }
         else
         {
-            fmt = _("The file/URI %s could not be found.");
-            gnc_error_dialog (parent, fmt, displayname);
+            if (gnc_history_test_for_file (displayname))
+            {
+                fmt = _("The file/URI %s could not be found.\n\nThe file is in the history list, do you want to remove it?");
+                if (gnc_verify_dialog (parent, FALSE, fmt, displayname))
+                    gnc_history_remove_file (displayname);
+            }
+            else
+            {
+                fmt = _("The file/URI %s could not be found.");
+                gnc_error_dialog (parent, fmt, displayname);
+            }
         }
         break;
 
diff --git a/src/gnome-utils/gnc-plugin-file-history.c b/src/gnome-utils/gnc-plugin-file-history.c
index 08d1c87..3f27dbe 100644
--- a/src/gnome-utils/gnc-plugin-file-history.c
+++ b/src/gnome-utils/gnc-plugin-file-history.c
@@ -67,6 +67,7 @@ static QofLogModule log_module = GNC_MOD_GUI;
 /* Command callbacks */
 static void gnc_plugin_file_history_cmd_open_file (GtkAction *action, GncMainWindowActionData *data);
 
+static gboolean file_from_history = FALSE;
 
 /** The label given to the main window for this plugin. */
 #define PLUGIN_ACTIONS_NAME "gnc-plugin-file-history-actions"
@@ -262,6 +263,38 @@ gnc_history_remove_file (const char *oldfile)
     }
 }
 
+
+/** Test for a file name existing in the history list.
+ *
+ *  @param oldfile The name of the file to remove from the list.
+ */
+gboolean gnc_history_test_for_file (const char *oldfile)
+{
+    gchar *filename, *from;
+    gint i;
+    gboolean found = FALSE;
+
+    if (!oldfile)
+        return FALSE;
+    if (!g_utf8_validate(oldfile, -1, NULL))
+        return FALSE;
+
+    for (i = 0; i < MAX_HISTORY_FILES; i++)
+    {
+        from = gnc_history_index_to_pref_name(i);
+        filename = gnc_prefs_get_string(GNC_PREFS_GROUP_HISTORY, from);
+
+        if (filename && file_from_history)
+        {
+            if (g_utf8_collate(oldfile, filename) == 0)
+                found = TRUE;
+        }
+        g_free(from);
+    }
+    return found;
+}
+
+
 /*  Retrieve the name of the file most recently accessed.  This is the
  *  name at the front of the list.  Since the "list" is actually a
  *  sequence of up to ten preference names, this is the value of the first preference.
@@ -279,6 +312,14 @@ gnc_history_get_last (void)
 }
 
 
+/* Set the source of the open file, True for History.
+ */
+void
+gnc_history_set_file_from_history (gboolean set)
+{
+    file_from_history = set;
+}
+
 /************************************************************
  *                     Other Functions                      *
  ************************************************************/
@@ -662,10 +703,12 @@ gnc_plugin_file_history_cmd_open_file (GtkAction *action,
      * Which progress bar should we be using? One in a window, or
      * in a new "file loading" dialog???
      */
+    file_from_history = TRUE;
     filename = g_object_get_data(G_OBJECT(action), FILENAME_STRING);
     gnc_window_set_progressbar_window (GNC_WINDOW(data->window));
     /* also opens new account page */
     gnc_file_open_file (filename, /*open_readonly*/ FALSE);
+    file_from_history = FALSE;
     gnc_window_set_progressbar_window (NULL);
 }
 
diff --git a/src/gnome-utils/gnc-plugin-file-history.h b/src/gnome-utils/gnc-plugin-file-history.h
index 19e146d..022fbb4 100644
--- a/src/gnome-utils/gnc-plugin-file-history.h
+++ b/src/gnome-utils/gnc-plugin-file-history.h
@@ -97,6 +97,11 @@ void gnc_history_add_file (const char *filename);
  */
 void gnc_history_remove_file (const char *oldfile);
 
+/** Test for a file name existing in the history list.
+ *
+ *  @param oldfile The name of the file to remove from the list.
+ */
+gboolean gnc_history_test_for_file (const char *oldfile);
 
 /** Retrieve the name of the file most recently accessed.  This is the
  *  name at the front of the list.
@@ -107,6 +112,10 @@ void gnc_history_remove_file (const char *oldfile);
  */
 char * gnc_history_get_last (void);
 
+/** Set the source of the open file, True for History.
+ */
+void gnc_history_set_file_from_history (gboolean set);
+
 G_END_DECLS
 
 #endif /* __GNC_PLUGIN_FILE_HISTORY_H */

commit 9144edb464e10cc2809935e135d3e1499c5c841d
Author: Christian Stimming <christian at cstimming.de>
Date:   Mon Mar 13 21:31:16 2017 +0100

    Online banking: Add output of bank messages that might occasionally be received.

diff --git a/src/import-export/aqb/gnc-ab-utils.c b/src/import-export/aqb/gnc-ab-utils.c
index 1998c0d..b0b2ffb 100644
--- a/src/import-export/aqb/gnc-ab-utils.c
+++ b/src/import-export/aqb/gnc-ab-utils.c
@@ -1046,6 +1046,23 @@ gnc_ab_import_context(AB_IMEXPORTER_CONTEXT *context,
         AB_ImExporterContext_AccountInfoForEach(context, bal_accountinfo_cb,
                                                 data);
 
+    /* Check bank-messages */
+    {
+        AB_MESSAGE * bankmsg = AB_ImExporterContext_GetFirstMessage(context);
+        while (bankmsg)
+        {
+            const char* subject = AB_Message_GetSubject(bankmsg);
+            const char* text = AB_Message_GetText(bankmsg);
+            gnc_info_dialog(data->parent, "%s\n%s %s\n%s",
+                            _("The bank has sent a message in its response."),
+                            _("Subject:"),
+                            subject,
+                            text);
+
+            bankmsg = AB_ImExporterContext_GetNextMessage(context); // The interator is incremented within aqbanking
+        }
+    }
+
     return data;
 }
 



Summary of changes:
 src/bin/gnucash-bin.c                      |  4 +++
 src/gnome-utils/gnc-file.c                 | 13 +++++++--
 src/gnome-utils/gnc-plugin-file-history.c  | 43 ++++++++++++++++++++++++++++++
 src/gnome-utils/gnc-plugin-file-history.h  |  9 +++++++
 src/import-export/aqb/gnc-ab-utils.c       | 17 ++++++++++++
 src/report/report-system/html-piechart.scm |  4 +++
 src/report/report-system/report.scm        |  4 +--
 7 files changed, 90 insertions(+), 4 deletions(-)



More information about the gnucash-changes mailing list