summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1998-07-31 09:36:30 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1998-07-31 09:36:30 (GMT)
commit7e1fb7c92deff570fee8761e77adfa4e4ef5bdf7 (patch)
tree7950672e53d8223464ec386b24c01b44432ecde8 /Mac
parent017e0ff1a0aedff9e4cce0e1a55cf18bb51eb458 (diff)
downloadcpython-7e1fb7c92deff570fee8761e77adfa4e4ef5bdf7.zip
cpython-7e1fb7c92deff570fee8761e77adfa4e4ef5bdf7.tar.gz
cpython-7e1fb7c92deff570fee8761e77adfa4e4ef5bdf7.tar.bz2
New about box, with the version mesage filled in in a text item, and
PLstrcmp() fixed. (Just)
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Python/macglue.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/Mac/Python/macglue.c b/Mac/Python/macglue.c
index 3252cf0..fa27c79 100644
--- a/Mac/Python/macglue.c
+++ b/Mac/Python/macglue.c
@@ -245,9 +245,9 @@ PLstrcmp(s1, s2)
if ( res != 0 )
return res;
- if ( s1 < s2 )
+ if ( s1[0] < s2[0] )
return -1;
- else if ( s1 > s2 )
+ else if ( s1[0] > s2[0] )
return 1;
else
return 0;
@@ -660,26 +660,27 @@ PyMac_RestoreMenuBar()
/*
** Our replacement about box
*/
+
+#include "patchlevel.h"
+
void
SIOUXDoAboutBox(void)
{
DialogPtr theDialog;
- WindowRef theWindow;
- CGrafPtr thePort;
+ WindowPtr theWindow;
short item;
- short xpos, ypos, width, height, swidth, sheight;
+ short fontID;
if( (theDialog = GetNewDialog(ABOUT_ID, NULL, (WindowPtr)-1)) == NULL )
return;
theWindow = GetDialogWindow(theDialog);
- thePort = GetWindowPort(theWindow);
- width = thePort->portRect.right - thePort->portRect.left;
- height = thePort->portRect.bottom - thePort->portRect.top;
- swidth = qd.screenBits.bounds.right - qd.screenBits.bounds.left;
- sheight = qd.screenBits.bounds.bottom - qd.screenBits.bounds.top - LMGetMBarHeight();
- xpos = (swidth-width)/2;
- ypos = (sheight-height)/5 + LMGetMBarHeight();
- MoveWindow(theWindow, xpos, ypos, 0);
+ SetPortWindowPort(theWindow);
+ GetFNum("\pPython-Sans", &fontID);
+ if (fontID == 0)
+ fontID = kFontIDGeneva;
+ TextFont(fontID);
+ TextSize(9);
+ ParamText(Pstring(PATCHLEVEL), "\p", "\p", "\p");
ShowWindow(theWindow);
ModalDialog(NULL, &item);
DisposeDialog(theDialog);