fix some core dump things

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@949 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1998-08-08 16:15:38 +00:00
parent 3b9ca3473f
commit 5930f55922

View File

@ -196,6 +196,8 @@ xaccSetComboCellValue (ComboCell *cell, const char * str)
{
PopBox * box;
if (!str) str = "";
SET (&(cell->cell), str);
box = (PopBox *) (cell->cell.gui_private);
@ -203,28 +205,21 @@ xaccSetComboCellValue (ComboCell *cell, const char * str)
* If so, then be sure to bail out now. */
if (!box) return;
if (str) {
if (0x0 != str[0]) {
XmString choosen;
/* convert String to XmString ... arghhh */
choosen = XmCvtCTToXmString ((char *) str);
XmComboBoxSelectItem (box->combobox, choosen, False);
XmStringFree (choosen);
} else {
XmComboBoxClearItemSelection (box->combobox);
}
if ((0 < box->currow) && (0 < box->curcol)) {
/* be sure to set the string into the matrix widget as well,
* so that we don't end up blanking out the cell when we
* unmap the combobox widget */
XbaeMatrixSetCell (box->parent, box->currow, box->curcol, (char *) str);
}
if (0x0 != str[0]) {
XmString choosen;
/* convert String to XmString ... arghhh */
choosen = XmCvtCTToXmString ((char *) str);
XmComboBoxSelectItem (box->combobox, choosen, False);
XmStringFree (choosen);
} else {
XmComboBoxClearItemSelection (box->combobox);
if ((0 < box->currow) && (0 < box->curcol)) {
XbaeMatrixSetCell (box->parent, box->currow, box->curcol, "");
}
}
if ((0 < box->currow) && (0 < box->curcol)) {
/* be sure to set the string into the matrix widget as well,
* so that we don't end up blanking out the cell when we
* unmap the combobox widget */
XbaeMatrixSetCell (box->parent, box->currow, box->curcol, (char *) str);
}
}