From 0bdb3788f6129c88e2d38c481533d9f5fa85a5a2 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Mon, 15 Jun 1998 05:45:08 +0000 Subject: [PATCH] add popup menu git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@894 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/register/recncell.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/register/recncell.c b/src/register/recncell.c index 74b3aa9d4d..3e15a70c33 100644 --- a/src/register/recncell.c +++ b/src/register/recncell.c @@ -32,13 +32,13 @@ #include "basiccell.h" #include "recncell.h" -/* hack alert -- temp defs: we should should probably include - * Transaction.h and also implement a more sophisticated togglig - * between the various reconcile states. +/* hack alert -- I am uncomfortable with including engine + * stuff here; all code in this directory should really be + * independent of the engine. Its just that we need the + * defs for YREC, CREC, etc. This is some cleanup we should + * do some day. */ - -#define NREC 'n' -#define CREC 'c' +#include "Transaction.h" /* ================================================ */ @@ -48,6 +48,16 @@ ToggleRecn (BasicCell *_cell, const char *cur_val) BasicCell *cell = (BasicCell *) _cell; char buff[2]; + /* throw up a popup if the user tries to undo a reconciled transcation */ + /* hack alert -- this sets a new precedent ... verifyBox is defined in + * both the motif and the gtk subdirs; I don't think I like it that way. + */ + if(cur_val[0] == YREC) { + if(!verifyBox(NULL, "Really change state of reconciled transaction?")) { + return strdup(cur_val); + } + } + if (NREC == cur_val[0]) { buff[0] = CREC; } else {