1.1 --- a/plover-gtk/transactionhelper.c Fri Jun 08 17:05:27 2018 +0100
1.2 +++ b/plover-gtk/transactionhelper.c Tue Jul 14 13:17:21 2020 +0100
1.3 @@ -57,6 +57,10 @@
1.4
1.5 static guint signals[N_SIGNALS];
1.6
1.7 +static PloverTransaction *
1.8 + plover_transaction_helper_new_transaction(PloverTransactionHelper *helper,
1.9 + GError **error);
1.10 +
1.11 static void plover_transaction_helper_finalize(PloverTransactionHelper *helper)
1.12 {
1.13 PloverTransactionHelperPrivate *priv;
1.14 @@ -286,7 +290,23 @@
1.15 "SIRemoveExisting"));
1.16 if (gtk_toggle_button_get_active(button))
1.17 {
1.18 - transaction=plover_transaction_new_remove(NULL,&error);
1.19 + transaction=plover_transaction_helper_new_transaction(helper,&error);
1.20 + /*
1.21 + * I think we want switch to the alternate installed set in the case of
1.22 + * alternate_database_clashes, but not in the case of
1.23 + * active_database_is_incompatible (see
1.24 + * plover_transaction_helper_update_summary_page).
1.25 + * Whether testing for helper->alternate_installed is sufficient I'm
1.26 + * far from clear.
1.27 + */
1.28 + if (helper->alternate_installed)
1.29 + plover_transaction_set_installed(transaction,
1.30 + helper->alternate_installed);
1.31 + if (transaction && !plover_transaction_remove(transaction,NULL,&error))
1.32 + {
1.33 + g_object_unref(transaction);
1.34 + transaction=NULL;
1.35 + }
1.36 if (transaction)
1.37 {
1.38 save_transactions=helper->transactions;