gnucash master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Tue Dec 6 19:26:43 EST 2016


Updated	 via  https://github.com/Gnucash/gnucash/commit/1f30e2da (commit)
	 via  https://github.com/Gnucash/gnucash/commit/57e7ba86 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/f3826953 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/755c42a0 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/27f529e7 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/c5198be9 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/e38fd5b5 (commit)
	from  https://github.com/Gnucash/gnucash/commit/5c6383e4 (commit)



commit 1f30e2dacb62dab4c8df35704f07b2a03ecedcf9
Merge: 5c6383e 57e7ba8
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Dec 6 16:26:25 2016 -0800

    Merge branch 'maint'


commit 57e7ba869db504989b694451bdf066cbaeddd21e
Author: Ryan Tucker <git at ryantucker.us>
Date:   Tue Dec 6 15:27:28 2016 -0800

    fix missing chmod +x in configure.ac

diff --git a/configure.ac b/configure.ac
index 76dd371..dd26ee8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1647,7 +1647,7 @@ AC_CONFIG_FILES([src/gnc-module/test/test-scm-multi],
 AC_CONFIG_FILES([src/gnome-utils/test/test-load-module],
                 [chmod +x src/gnome-utils/test/test-load-module])
 AC_CONFIG_FILES([src/report/locale-specific/us/test/test-load-module],
-                [src/report/locale-specific/us/test/test-load-module])
+                [chmod +x src/report/locale-specific/us/test/test-load-module])
 AC_CONFIG_FILES([src/report/report-gnome/test/test-load-module],
                 [chmod +x src/report/report-gnome/test/test-load-module])
 AC_CONFIG_FILES([src/report/report-system/test/test-load-module],

commit f382695345743dd0e9cbd71c5b72f17fcf6cd69b
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Dec 4 12:35:42 2016 -0800

    Bug 775567 - Importing QIF file from PayPal crashes GnuCash 2.6.14 on Windows XP service pack 3
    
    Guile-1.8 doesn't know about BOM so check for one and strip it if it's there.

diff --git a/src/import-export/qif-imp/qif-file.scm b/src/import-export/qif-imp/qif-file.scm
index e03fc9a..e428068 100644
--- a/src/import-export/qif-imp/qif-file.scm
+++ b/src/import-export/qif-imp/qif-file.scm
@@ -96,6 +96,25 @@
                           (string-append str "\n" (_ "Read aborted.")))
           (set! abort-read #t)))
 
+      (define (strip-bom)
+	(let ((c1 (read-char)))
+	  (if (char=? c1 (integer->char #xEF))
+	    (let ((c2 (read-char)))
+	      (if (char=? c2 (integer->char #xBB))
+		  (let ((c3 (read-char)))
+		    (if (char=? c3 (integer->char #xBF)) #t
+			(begin
+			  (unread-char c3)
+			  (unread-char c2)
+			  (unread-char c1)
+			#f)))
+		  (begin
+		    (unread-char c2)
+		    (unread-char c1)
+		    #f)))
+	    (begin
+	      (unread-char c1)
+	      #f))))
 
       (qif-file:set-path! self path)
       (if (not (access? path R_OK))
@@ -112,6 +131,7 @@
 
       (with-input-from-file path
         (lambda ()
+	  (strip-bom)
           ;; loop over lines
           (let line-loop ()
             (set! line (read-delimited delimiters))

commit 755c42a087bcee3eff4ad0b144a4f0e95385a311
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Dec 3 17:50:38 2016 -0800

    Prevent crash when there's an error loading a qif import file.

diff --git a/src/import-export/qif-imp/assistant-qif-import.c b/src/import-export/qif-imp/assistant-qif-import.c
index 4389757..941d746 100644
--- a/src/import-export/qif-imp/assistant-qif-import.c
+++ b/src/import-export/qif-imp/assistant-qif-import.c
@@ -1698,7 +1698,7 @@ gnc_ui_qif_import_load_progress_start_cb(GtkButton * button,
     SCM parse_results   = scm_c_eval_string("qif-file:parse-fields-results");
     SCM scm_qiffile;
     SCM imported_files = SCM_EOL;
-    SCM load_return, parse_return;
+    SCM load_return = SCM_BOOL_F, parse_return = SCM_BOOL_F;
     SCM progress;
 
     /* Raise the busy flag so the assistant can't be canceled unexpectedly. */
@@ -1804,11 +1804,15 @@ gnc_ui_qif_import_load_progress_start_cb(GtkButton * button,
      */
 
     /* This step will fill the remainder of the bar. */
-    gnc_progress_dialog_push(wind->load_progress, 1);
-    parse_return = scm_call_2(qif_file_parse, SCM_CAR(imported_files), progress);
-    gnc_progress_dialog_pop(wind->load_progress);
-    wind->ask_date_format = FALSE;
-    wind->date_format = NULL;
+    if (!wind->load_stop)
+    {
+	gnc_progress_dialog_push(wind->load_progress, 1);
+	parse_return = scm_call_2(qif_file_parse, SCM_CAR(imported_files),
+				  progress);
+	gnc_progress_dialog_pop(wind->load_progress);
+	wind->ask_date_format = FALSE;
+	wind->date_format = NULL;
+    }
     if (parse_return == SCM_BOOL_T)
     {
         /* Canceled by the user. */

commit 27f529e76a1787d15eec3c17f5d00820fc9e6977
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Nov 19 12:55:02 2016 +0000

    Bug 516920 Scheduled trasaction calendar popup off screen
    
    If calendar is close to the right screen edge, the pop up can go of screen. Added
    test for pop up going off screen.

diff --git a/src/gnome-utils/gnc-dense-cal.c b/src/gnome-utils/gnc-dense-cal.c
index 4224535..92d6882 100644
--- a/src/gnome-utils/gnc-dense-cal.c
+++ b/src/gnome-utils/gnc-dense-cal.c
@@ -1177,6 +1177,8 @@ static gint
 gnc_dense_cal_button_press(GtkWidget *widget,
                            GdkEventButton *evt)
 {
+    GdkScreen *screen = gdk_screen_get_default ();
+    GtkAllocation alloc;
     gint doc;
     GncDenseCal *dcal = GNC_DENSE_CAL(widget);
 
@@ -1191,15 +1193,21 @@ gnc_dense_cal_button_press(GtkWidget *widget,
         // second move after show_all'ing the window should do the
         // trick with a bit of flicker.
         gtk_window_move(GTK_WINDOW(dcal->transPopup), evt->x_root + 5, evt->y_root + 5);
+
+        gtk_widget_get_allocation(GTK_WIDGET(dcal->transPopup), &alloc);
+
         populate_hover_window(dcal, doc);
         gtk_widget_queue_resize(GTK_WIDGET(dcal->transPopup));
         gtk_widget_show_all(GTK_WIDGET(dcal->transPopup));
-        gtk_window_move(GTK_WINDOW(dcal->transPopup), evt->x_root + 5, evt->y_root + 5);
+
+        if ((evt->x_root + 5 + alloc.width > gdk_screen_get_width(screen))||
+            (evt->y_root + 5 + alloc.height > gdk_screen_get_height(screen)))
+            gtk_window_move(GTK_WINDOW(dcal->transPopup), evt->x_root - 2 - alloc.width, evt->y_root - 2 - alloc.height);
+        else
+            gtk_window_move(GTK_WINDOW(dcal->transPopup), evt->x_root + 5, evt->y_root + 5);
     }
     else
-    {
         gtk_widget_hide(GTK_WIDGET(dcal->transPopup));
-    }
     return FALSE;
 }
 
@@ -1207,35 +1215,39 @@ static gint
 gnc_dense_cal_motion_notify(GtkWidget *widget,
                             GdkEventMotion *event)
 {
+    GdkScreen *screen = gdk_screen_get_default ();
     GncDenseCal *dcal;
+    GtkAllocation alloc;
     gint doc;
     int unused;
-    int x_root_offset, y_root_offset;
     GdkModifierType unused2;
 
     dcal = GNC_DENSE_CAL(widget);
     if (!dcal->showPopup)
         return FALSE;
 
-    x_root_offset = event->x_root;
-    y_root_offset = event->y_root;
-
     /* As per http://www.gtk.org/tutorial/sec-eventhandling.html */
     if (event->is_hint)
         gdk_window_get_pointer(event->window, &unused, &unused, &unused2);
-    gdk_window_move(gtk_widget_get_window (GTK_WIDGET(dcal->transPopup)),
-                    x_root_offset + 5, y_root_offset + 5);
+
     doc = wheres_this(dcal, event->x, event->y);
     if (doc >= 0)
     {
         populate_hover_window(dcal, doc);
         gtk_widget_queue_resize(GTK_WIDGET(dcal->transPopup));
+
+        gtk_widget_get_allocation(GTK_WIDGET(dcal->transPopup), &alloc);
+
         gtk_widget_show_all(GTK_WIDGET(dcal->transPopup));
+
+        if ((event->x_root + 5 + alloc.width > gdk_screen_get_width(screen))||
+            (event->y_root + 5 + alloc.height > gdk_screen_get_height(screen)))
+            gtk_window_move(GTK_WINDOW(dcal->transPopup), event->x_root - 2 - alloc.width, event->y_root - 2 - alloc.height);
+        else
+            gtk_window_move(GTK_WINDOW(dcal->transPopup), event->x_root + 5, event->y_root + 5);
     }
     else
-    {
         gtk_widget_hide(GTK_WIDGET(dcal->transPopup));
-    }
     return TRUE;
 }
 

commit c5198be90cf7c1a4141f7463a67218201e7cd429
Author: Geert Janssens <janssens-geert at telenet.be>
Date:   Wed Nov 30 16:30:53 2016 +0100

    Fix compiler warning about misleading indentation

diff --git a/src/gnome/gnc-split-reg.c b/src/gnome/gnc-split-reg.c
index a336213..a96f4e1 100644
--- a/src/gnome/gnc-split-reg.c
+++ b/src/gnome/gnc-split-reg.c
@@ -1042,24 +1042,24 @@ gsr_default_associate_handler_file( GNCSplitReg *gsr, gpointer data )
     if (is_trans_readonly_and_warn(trans))
         return;
 
-	dialog = gtk_file_chooser_dialog_new ("Associate File with Transaction",
+    dialog = gtk_file_chooser_dialog_new ("Associate File with Transaction",
                                      GTK_WINDOW(gsr->window),
                                      GTK_FILE_CHOOSER_ACTION_OPEN,
                                      GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
                                      GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
                                      NULL);
 
-	gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER(dialog), 0);
-	if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
- 	{
-		char *uri;
+    gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER(dialog), 0);
+    if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
+    {
+        char *uri;
 
-	    uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (dialog));
+        uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (dialog));
         DEBUG("File URI: %s\n", uri);
-	    xaccTransSetAssociation(trans, uri);
+        xaccTransSetAssociation(trans, uri);
     }
 
-	gtk_widget_destroy (dialog);
+    gtk_widget_destroy (dialog);
 
 }
 

commit e38fd5b5e5fc219cf2634382badf56c8327ccf13
Author: Geert Janssens <janssens-geert at telenet.be>
Date:   Mon Nov 28 10:33:56 2016 +0100

    Fix report html header
    
    We lost a required escaped quote in commit 4a60e4906 'Fix type in HTML header.'

diff --git a/src/report/report-system/html-document.scm b/src/report/report-system/html-document.scm
index cb05a1a..0afb6a3 100644
--- a/src/report/report-system/html-document.scm
+++ b/src/report/report-system/html-document.scm
@@ -159,7 +159,7 @@
                 ;;./share/gnucash/scm/gnucash/report/balsheet-eg.eguile.scm:<html>
 
                 ;; Validate against HTML4 Transitional:
-                (push "<!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN\" \n\"http://www.w3.org/TR/html4/loose.dtd\">")
+                (push "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \n\"http://www.w3.org/TR/html4/loose.dtd\">")
                 (push "<head>\n")
                 (push "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n")
 				(if css? 



Summary of changes:
 configure.ac                                     |  2 +-
 src/gnome-utils/gnc-dense-cal.c                  | 34 ++++++++++++++++--------
 src/import-export/qif-imp/assistant-qif-import.c | 16 ++++++-----
 src/import-export/qif-imp/qif-file.scm           | 20 ++++++++++++++
 src/report/report-system/html-document.scm       |  2 +-
 5 files changed, 55 insertions(+), 19 deletions(-)



More information about the gnucash-changes mailing list