Skip to content

Commit

Permalink
Revert "Use python 3.3 VirtualEnv on travis."
Browse files Browse the repository at this point in the history
This reverts commit aa2c130.
Wrong repo.
  • Loading branch information
jralls committed Jan 23, 2016
1 parent aa2c130 commit 1ecb123
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 41 deletions.
12 changes: 6 additions & 6 deletions src/app-utils/gnc-sx-instance-model.c
Expand Up @@ -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 );
Expand Down Expand Up @@ -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);
Expand Down
37 changes: 2 additions & 35 deletions src/gnome/dialog-sx-since-last-run.c
Expand Up @@ -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;

Expand All @@ -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)
{
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit 1ecb123

Please sign in to comment.