mirror of https://github.com/Gnucash/gnucash
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@455 57a11ea4-9604-0410-9ed3-97b8803252fdzzzoldfeatures/multiline
parent
daf57a3a43
commit
13654f3607
@ -0,0 +1,41 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "basiccell.h"
|
||||
#include "quickfillcell.h"
|
||||
|
||||
/* ================================================ */
|
||||
/* by definition, all text is valid text. So accept
|
||||
* all modifications */
|
||||
|
||||
static const char *
|
||||
quickMV (struct _BasicCell *_cell,
|
||||
const char *oldval,
|
||||
const char *change,
|
||||
const char *newval)
|
||||
{
|
||||
return newval;
|
||||
}
|
||||
|
||||
/* ================================================ */
|
||||
|
||||
QuickFillCell *
|
||||
xaccMallocQuickFillCell (void)
|
||||
{
|
||||
QuickFillCell *cell;
|
||||
cell = xaccMallocQuickFillCell();
|
||||
xaccInitBasicCell (&(cell->cell));
|
||||
|
||||
cell->qf = xaccMallocQuickFill();
|
||||
return cell;
|
||||
}
|
||||
|
||||
/* ================================================ */
|
||||
|
||||
void
|
||||
xaccInitQuickFillCell (QuickFillCell *cell)
|
||||
{
|
||||
cell->cell.modify_verify = quickMV;
|
||||
}
|
||||
|
||||
/* =============== END OF FILE ==================== */
|
||||
@ -0,0 +1,31 @@
|
||||
|
||||
/*
|
||||
* FILE:
|
||||
* quickfillcell.h
|
||||
*
|
||||
* FUNCTION:
|
||||
* implements a text cell with quick-fill capabilities
|
||||
*
|
||||
* HISTORY:
|
||||
* Copyright (c) 1997, 1998 Linas Vepstas
|
||||
*/
|
||||
|
||||
#ifndef __XACC_FILL_CELL_C__
|
||||
#define __XACC_FILL_CELL_C__
|
||||
|
||||
#include "basiccell.h"
|
||||
#include "QuickFill.h"
|
||||
|
||||
typedef struct _QuickFillCell {
|
||||
BasicCell cell;
|
||||
QuickFill *qf;
|
||||
} QuickFillCell;
|
||||
|
||||
/* installs a callback to handle price recording */
|
||||
QuickFillCell * xaccMallocQuickFillCell (void);
|
||||
void xaccInitQuickFillCell (QuickFillCell *);
|
||||
|
||||
|
||||
#endif /* __XACC_FILL_CELL_C__ */
|
||||
|
||||
/* --------------- end of file ---------------------- */
|
||||
Loading…
Reference in new issue