-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gnc plugin page register to cpp #1874
Conversation
5e1c457
to
1cac433
Compare
That's a rather expansive PR title. "Plugin page register to C++" would be better. "CPP" is ambiguous because it can also mean the C pre-processor, the program that handles |
@@ -3898,29 +3898,31 @@ gnc_plugin_page_register_cmd_reverse_transaction (GSimpleAction *simple, | |||
{ | |||
const char *rev = _("A reversing entry has already been created for this transaction."); | |||
const char *jump = _("Jump to the transaction?"); | |||
if (gnc_verify_dialog (GTK_WINDOW (window), TRUE, "%s\n\n%s", rev, jump)) | |||
goto jump_to_trans; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A better way to accomplish this would be to extract into new functions the two blocks, say maybe_jump_to_existing
and maybe_create_reverse_transaction
, then
if (auto new_trans{xaccTransactionGetReversedBy(trans)
{
if (!maybe_jump_to_existing(/*…*/))
{
LEAVE ("reverse already exists");
return;
}
}
else
{
if (!maybe_create_reverse_transaction(/*…*/))
{
LEAVE ("reverse cancelled");
return;
}
}
bda5145
to
ade9d6d
Compare
uhm. maybe i'll split this into cpp conversion and cppisms in another branch. |
782e114
to
810e4fd
Compare
…ctor<gncInvoice*>
reorder logic to avoid using goto
launches time64 input dialog
810e4fd
to
6b1944f
Compare
and will rebase #1873 on top of this.