gnucash maint: Revert "Use python 3.3 VirtualEnv on travis."

John Ralls jralls at code.gnucash.org
Sat Jan 23 13:47:28 EST 2016


Updated	 via  https://github.com/Gnucash/gnucash/commit/1ecb1235 (commit)
	from  https://github.com/Gnucash/gnucash/commit/aa2c1303 (commit)



commit 1ecb1235973487fda0d2758c6c079a03973f8a9d
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Jan 23 10:46:51 2016 -0800

    Revert "Use python 3.3 VirtualEnv on travis."
    
    This reverts commit aa2c1303fd642cf5f8de74e2c48e9a68279a7a20.
    Wrong repo.

diff --git a/src/app-utils/gnc-sx-instance-model.c b/src/app-utils/gnc-sx-instance-model.c
index ad4a765..cf7472e 100644
--- a/src/app-utils/gnc-sx-instance-model.c
+++ b/src/app-utils/gnc-sx-instance-model.c
@@ -941,14 +941,14 @@ _get_template_split_account(const SchedXaction* sx, const Split *template_split,
                                       NULL);
     if (kvp_val == NULL)
     {
-        GString *err = g_strdup_printf("Null account kvp value for SX [%s], "
-                                       "cancelling creation.",
-                                       xaccSchedXactionGetName(sx));
-        g_critical("%s", err);
+        GString *err = g_string_new("");
+        g_string_printf(err, "Null account kvp value for SX [%s], cancelling creation.",
+                        xaccSchedXactionGetName(sx));
+        g_critical("%s", err->str);
         if (creation_errors != NULL)
             *creation_errors = g_list_append(*creation_errors, err);
         else
-            g_free(err, TRUE);
+            g_string_free(err, TRUE);
         return FALSE;
     }
     acct_guid = kvp_value_get_guid( kvp_val );
@@ -1247,7 +1247,7 @@ create_each_transaction_helper(Transaction *template_txn, void *user_data)
 
     if (err_flag)
     {
-        g_critical("Error in SX transaction [%s], creation aborted.",
+        g_critical("new transaction creation sx [%s]",
                    xaccSchedXactionGetName(sx));
         xaccTransDestroy(new_txn);
         xaccTransCommitEdit(new_txn);
diff --git a/src/gnome/dialog-sx-since-last-run.c b/src/gnome/dialog-sx-since-last-run.c
index 9fa3f49..3964e68 100644
--- a/src/gnome/dialog-sx-since-last-run.c
+++ b/src/gnome/dialog-sx-since-last-run.c
@@ -791,36 +791,10 @@ gnc_sx_slr_tree_model_adapter_new(GncSxInstanceModel *instances)
     return rtn;
 }
 
-static void
-creation_error_dialog (GtkWindow *parent, GList **creation_errors)
-{
-    GList *node = *creation_errors;
-    GtkMessageDialog *dialog = NULL;
-    gchar *message = NULL;
-    if (*creation_errors == NULL) return;
-    for(; node != NULL; node = g_list_next (node))
-    {
-        const gchar *fmt = message == NULL ? "%s%s" : "%s\n%s";
-        gchar *new_msg = g_strdup_printf (fmt, message, node->data);
-        g_free (message);
-        message = new_msg;
-        g_free(node->data);
-    }
-    g_list_free (*creation_errors);
-    creation_errors = NULL;
-    dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL,
-                                     GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
-                                     "%s", message);
-    gtk_dialog_run (dialog);
-    gtk_widget_unref (dialog);
-    g_free (message);
-}
-
 void
 gnc_sx_sxsincelast_book_opened(void)
 {
     GList *auto_created_txns = NULL;
-    GList *creation_errors = NULL;
     GncSxInstanceModel *inst_model;
     GncSxSummary summary;
 
@@ -836,8 +810,7 @@ gnc_sx_sxsincelast_book_opened(void)
     inst_model = gnc_sx_get_current_instances();
     gnc_sx_instance_model_summarize(inst_model, &summary);
     gnc_sx_summary_print(&summary);
-    gnc_sx_instance_model_effect_change(inst_model, TRUE, &auto_created_txns,
-                                        &creation_errors);
+    gnc_sx_instance_model_effect_change(inst_model, TRUE, &auto_created_txns, NULL);
 
     if (summary.need_dialog)
     {
@@ -864,8 +837,6 @@ gnc_sx_sxsincelast_book_opened(void)
     }
     g_list_free(auto_created_txns);
     g_object_unref(G_OBJECT(inst_model));
-    if (creation_errors)
-        creation_error_dialog(&creation_errors);
 }
 
 static void
@@ -1104,7 +1075,6 @@ dialog_destroy_cb(GtkWidget *object, GncSxSinceLastRunDialog *app_dialog)
 static void
 dialog_response_cb(GtkDialog *dialog, gint response_id, GncSxSinceLastRunDialog *app_dialog)
 {
-    GList* creation_errors = NULL;
     switch (response_id)
     {
     case GTK_RESPONSE_OK:
@@ -1138,11 +1108,8 @@ dialog_response_cb(GtkDialog *dialog, gint response_id, GncSxSinceLastRunDialog
         }
     }
     gnc_suspend_gui_refresh();
-    gnc_sx_slr_model_effect_change(app_dialog->editing_model, FALSE, &app_dialog->created_txns, &creation_errors);
+    gnc_sx_slr_model_effect_change(app_dialog->editing_model, FALSE, &app_dialog->created_txns, NULL);
     gnc_resume_gui_refresh();
-    if (creation_errors)
-        creation_error_dialog(&creation_errors);
-
     if (gtk_toggle_button_get_active(app_dialog->review_created_txns_toggle)
             && g_list_length(app_dialog->created_txns) > 0)
     {



Summary of changes:
 src/app-utils/gnc-sx-instance-model.c | 12 ++++++------
 src/gnome/dialog-sx-since-last-run.c  | 37 ++---------------------------------
 2 files changed, 8 insertions(+), 41 deletions(-)



More information about the gnucash-changes mailing list