mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
changes from Rob Browning, on the way to a gtk port
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@830 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
e8b263b328
commit
c67dc15470
@ -26,11 +26,15 @@
|
||||
\********************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <X11/keysym.h>
|
||||
|
||||
#ifdef MOTIF
|
||||
#include <Xm/Xm.h>
|
||||
#include <ComboBox.h>
|
||||
#include <Xbae/Matrix.h>
|
||||
#endif
|
||||
|
||||
#include "combocell.h"
|
||||
|
||||
@ -39,6 +43,8 @@
|
||||
* it holds XtMotif data that we need.
|
||||
*/
|
||||
|
||||
#ifdef MOTIF
|
||||
|
||||
typedef struct _PopBox {
|
||||
Widget combobox;
|
||||
Widget parent; /* the parent table widget */
|
||||
@ -56,12 +62,27 @@ static void setComboValue (BasicCell *bcell, const char *value);
|
||||
static const char * enterCombo (BasicCell *bcell, const char *value);
|
||||
static const char * leaveCombo (BasicCell *bcell, const char *value);
|
||||
|
||||
#endif
|
||||
|
||||
#define SET(cell,str) { \
|
||||
if ((cell)->value) free ((cell)->value); \
|
||||
(cell)->value = strdup (str); \
|
||||
(cell)->changed = 0xffffffff; \
|
||||
}
|
||||
|
||||
#ifdef GNOME
|
||||
|
||||
typedef struct _PopBox {
|
||||
int currow;
|
||||
int curcol;
|
||||
} PopBox;
|
||||
|
||||
void xaccDestroyComboCell (ComboCell *cell) { }
|
||||
void xaccAddComboCellMenuItem (ComboCell *cell, char * menustr) {}
|
||||
void xaccInitComboCell (ComboCell *cell) {}
|
||||
|
||||
#endif
|
||||
|
||||
/* =============================================== */
|
||||
|
||||
ComboCell *xaccMallocComboCell (void)
|
||||
@ -72,6 +93,8 @@ ComboCell *xaccMallocComboCell (void)
|
||||
return cell;
|
||||
}
|
||||
|
||||
#ifndef GNOME
|
||||
|
||||
void xaccInitComboCell (ComboCell *cell)
|
||||
{
|
||||
xaccInitBasicCell ( &(cell->cell));
|
||||
@ -184,6 +207,8 @@ xaccAddComboCellMenuItem (ComboCell *cell, char * menustr)
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* =============================================== */
|
||||
/* not only do we set the cell contents, but we
|
||||
* make the gui reflect the right value too.
|
||||
@ -201,6 +226,7 @@ xaccSetComboCellValue (ComboCell *cell, const char * str)
|
||||
* If so, then be sure to bail out now. */
|
||||
if (!box) return;
|
||||
|
||||
#ifndef GNOME
|
||||
if (str) {
|
||||
if (0x0 != str[0]) {
|
||||
XmString choosen;
|
||||
@ -224,7 +250,7 @@ xaccSetComboCellValue (ComboCell *cell, const char * str)
|
||||
XbaeMatrixSetCell (box->parent, box->currow, box->curcol, "");
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
/* =============================================== */
|
||||
@ -236,6 +262,8 @@ setComboValue (BasicCell *_cell, const char *str)
|
||||
xaccSetComboCellValue (cell, str);
|
||||
}
|
||||
|
||||
#ifndef GNOME
|
||||
|
||||
/* =============================================== */
|
||||
|
||||
static
|
||||
@ -519,4 +547,6 @@ static void dropDownCB (Widget w, XtPointer cd, XtPointer cb )
|
||||
#endif /* USE_COMPLEX_TRAVERSAL_LOGIC */
|
||||
}
|
||||
|
||||
#endif /* #ifndef GNOME */
|
||||
|
||||
/* =============== end of file =================== */
|
||||
|
@ -41,9 +41,14 @@
|
||||
#include "datecell.h"
|
||||
#include "quickfillcell.h"
|
||||
#include "pricecell.h"
|
||||
|
||||
#ifdef MOTIF
|
||||
#include "table-motif.h"
|
||||
#include "recncell.h"
|
||||
#include "textcell.h"
|
||||
#endif
|
||||
|
||||
#ifdef GNOME
|
||||
#include "table-gtk.h"
|
||||
#endif
|
||||
|
||||
/* defined register types */
|
||||
/* "registers" are single-account display windows.
|
||||
|
@ -26,6 +26,7 @@
|
||||
\********************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cellblock.h"
|
||||
#include "table-allgui.h"
|
||||
|
@ -34,8 +34,7 @@
|
||||
* is ugly.
|
||||
*/
|
||||
|
||||
#define XMOTIF
|
||||
#ifdef XMOTIF
|
||||
#ifdef MOTIF
|
||||
#include "table-motif.h"
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user