*** dialog.c.orig Mon Jan 25 14:41:38 1999 --- dialog.c Mon Jan 25 14:41:38 1999 *************** *** 1167,1170 **** --- 1167,1171 ---- int IconAndBtns; { + static stShowing=FALSE; char *dup_msg=NULL; int rc=MB_ID_FAILED, looping=TRUE; *************** *** 1179,1182 **** --- 1180,1186 ---- return rc; } + if (stShowing) return rc; + + stShowing = TRUE; if (!SetupMBWindow(&mbInfo, dup_msg, Title, IconAndBtns, FALSE)) { fprintf(stderr, "Invalid parameters passed to MsgBox().\n"); *************** *** 1184,1187 **** --- 1188,1192 ---- if (mbInfo.msg_copy != NULL) free(mbInfo.msg_copy); free(dup_msg); + stShowing = FALSE; return rc; } *************** *** 1247,1250 **** --- 1252,1256 ---- (int)(ZOOMED_SIZE(drawWinW)>>1), (int)(ZOOMED_SIZE(drawWinH)>>1)); } + stShowing = FALSE; return rc; } *************** *** 1356,1359 **** --- 1362,1366 ---- /* if ReturnStr is NULL, hitting any key will return INVALID */ { + static stDialoging=FALSE; char *real_msg=NULL, def_comment[MAXSTRING+1]; int real_len=strlen(Message), rc; *************** *** 1370,1373 **** --- 1377,1383 ---- return INVALID; } + if (stDialoging) return INVALID; + + stDialoging = TRUE; if (Comment == NULL) { sprintf(real_msg, "%s\n\n%s", Message, def_comment); *************** *** 1377,1380 **** --- 1387,1391 ---- rc = DoDialog(real_msg, ReturnStr); free(real_msg); + stDialoging = FALSE; return rc; } *** font.c.orig Mon Jan 25 14:41:39 1999 --- font.c Mon Jan 25 14:41:39 1999 *************** *** 2864,2868 **** { struct SelRec *sel_ptr; ! int ltx, lty, rbx, rby, changed=FALSE; if (StyleIndex == INVALID) return; --- 2864,2868 ---- { struct SelRec *sel_ptr; ! int ltx, lty, rbx, rby, changed=FALSE, saved_style=curStyle; if (StyleIndex == INVALID) return; *************** *** 2876,2879 **** --- 2876,2899 ---- SetCanvasFont(); allowFontFaceSubstitution = TRUE; + if (canvasFontSize == INVALID) { + char buf[MAXSTRING]; + + GetCurFontMsg(buf); + strcat(buf, " not available"); + curStyle = saved_style; + SetCanvasFont(); + MsgBox(buf, TOOL_NAME, INFO_MB); + } else if (SzUnitToFontSize(curSzUnit) != canvasFontSize) { + if (showFontSizeInPoints) { + sprintf(gszMsgBox, "Cannot change size to %1dpt. %1dpt used.", + SzUnitToPointSize(curSzUnit), + SzUnitToPointSize(FontSizeToSzUnit(canvasFontSize))); + } else { + sprintf(gszMsgBox, "Cannot change size to %1d. %1d used.", + SzUnitToFontSize(curSzUnit), canvasFontSize); + } + curSzUnit = FontSizeToSzUnit(canvasFontSize); + MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + } if (curChoice == DRAWTEXT && textCursorShown) { if (ChangeEditTextProperty(PROP_MASK_TEXT_STYLE, StyleIndex)) { *************** *** 3174,3188 **** changingFontSizeFromRead = TRUE; if (canvasFontSize == INVALID) { ! if (showFontSizeInPoints) { ! sprintf(gszMsgBox, "%s-%1dpt not available.", fontMenuStr[curFont], ! SzUnitToPointSize(curSzUnit)); ! } else { ! sprintf(gszMsgBox, "%s-%1d not available.", fontMenuStr[curFont], ! SzUnitToFontSize(curSzUnit)); ! } ! MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); curSzUnit = saved_sz_unit; SizeIndex = GetSizeMenuIndex(); SetCanvasFont(); } else if (SzUnitToFontSize(curSzUnit) != canvasFontSize) { if (showFontSizeInPoints) { --- 3194,3205 ---- changingFontSizeFromRead = TRUE; if (canvasFontSize == INVALID) { ! char buf[MAXSTRING]; ! ! GetCurFontMsg(buf); ! strcat(buf, " not available"); curSzUnit = saved_sz_unit; SizeIndex = GetSizeMenuIndex(); SetCanvasFont(); + MsgBox(buf, TOOL_NAME, INFO_MB); } else if (SzUnitToFontSize(curSzUnit) != canvasFontSize) { if (showFontSizeInPoints) { *************** *** 3194,3200 **** SzUnitToFontSize(curSzUnit), canvasFontSize); } - MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); curSzUnit = FontSizeToSzUnit(canvasFontSize); SizeIndex = GetSizeMenuIndex(); } if (curChoice == DRAWTEXT && textCursorShown) { --- 3211,3217 ---- SzUnitToFontSize(curSzUnit), canvasFontSize); } curSzUnit = FontSizeToSzUnit(canvasFontSize); SizeIndex = GetSizeMenuIndex(); + MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); } if (curChoice == DRAWTEXT && textCursorShown) { *************** *** 3401,3414 **** allowFontFaceSubstitution = TRUE; if (canvasFontSize == INVALID) { ! if (showFontSizeInPoints) { ! sprintf(gszMsgBox, "%s-%1dpt not available.", fontMenuStr[curFont], ! SzUnitToPointSize(curSzUnit)); ! } else { ! sprintf(gszMsgBox, "%s-%1d not available.", fontMenuStr[curFont], ! SzUnitToFontSize(curSzUnit)); ! } ! MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); curFont = FontIndex = saved_font; SetCanvasFont(); } else if (SzUnitToFontSize(curSzUnit) != canvasFontSize) { if (showFontSizeInPoints) { --- 3418,3428 ---- allowFontFaceSubstitution = TRUE; if (canvasFontSize == INVALID) { ! char buf[MAXSTRING]; ! ! GetCurFontMsg(buf); ! strcat(buf, " not available"); curFont = FontIndex = saved_font; SetCanvasFont(); + MsgBox(buf, TOOL_NAME, INFO_MB); } else if (SzUnitToFontSize(curSzUnit) != canvasFontSize) { if (showFontSizeInPoints) { *************** *** 3420,3425 **** SzUnitToFontSize(curSzUnit), canvasFontSize); } - MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); curSzUnit = FontSizeToSzUnit(canvasFontSize); } if (curChoice == DRAWTEXT && textCursorShown) { --- 3434,3439 ---- SzUnitToFontSize(curSzUnit), canvasFontSize); } curSzUnit = FontSizeToSzUnit(canvasFontSize); + MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); } if (curChoice == DRAWTEXT && textCursorShown) { *** patchlvl.h.orig Mon Jan 25 14:41:41 1999 --- patchlvl.h Mon Jan 25 14:41:41 1999 *************** *** 35,39 **** #define _TGIF_PATCHLEVEL_H_ ! #define TGIF_PATCHLEVEL 9 #endif /*_TGIF_PATCHLEVEL_H_*/ --- 35,39 ---- #define _TGIF_PATCHLEVEL_H_ ! #define TGIF_PATCHLEVEL 10 #endif /*_TGIF_PATCHLEVEL_H_*/ *** Imakefile.orig Mon Jan 25 14:41:42 1999 --- Imakefile Mon Jan 25 14:41:42 1999 *************** *** 53,57 **** $(MOREDEFINES) ! TGIFVERSION = 4.0.9 XCOMM Things to try to add to the DEFINES line above: --- 53,57 ---- $(MOREDEFINES) ! TGIFVERSION = 4.0.10 XCOMM Things to try to add to the DEFINES line above: *************** *** 298,302 **** @if [ -f home/RCS3.tar.gz ]; then \ mv home/RCS3.tar.gz home/RCS3.tar.gz.save; \ ! fi tar cf home/RCS3.tar RCS xbm.RCS gzip home/RCS3.tar --- 298,302 ---- @if [ -f home/RCS3.tar.gz ]; then \ mv home/RCS3.tar.gz home/RCS3.tar.gz.save; \ ! fi tar cf home/RCS3.tar RCS xbm.RCS gzip home/RCS3.tar *** HISTORY.orig Mon Jan 25 14:41:43 1999 --- HISTORY Mon Jan 25 14:41:44 1999 *************** *** 1,2 **** --- 1,13 ---- + -----------------------> tgif-4.0.9 => tgif-4.0.10 <----------------------- + Here's a short list of added features/bug fixes. + + 1) Fix a hanging bug when choosing a non-existant font. If you specify + additional fonts with Tgif.AdditionalFonts and a font doesn't exist + on your machine, tgif would normally bring up a message box saying + that the font is not available. If you re-expose tgif's main window + at this time, you may get a second message box and hangs tgif. + Thanks to Helmut Jarausch for + pointing out the problem. + -----------------------> tgif-4.0.8 => tgif-4.0.9 <----------------------- Here's a short list of added features/bug fixes.