mirror of
https://github.com/python/cpython.git
synced 2025-12-04 16:43:27 +00:00
New about box, with the version mesage filled in in a text item, and
PLstrcmp() fixed. (Just)
This commit is contained in:
parent
017e0ff1a0
commit
7e1fb7c92d
1 changed files with 14 additions and 13 deletions
|
|
@ -245,9 +245,9 @@ PLstrcmp(s1, s2)
|
||||||
if ( res != 0 )
|
if ( res != 0 )
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
if ( s1 < s2 )
|
if ( s1[0] < s2[0] )
|
||||||
return -1;
|
return -1;
|
||||||
else if ( s1 > s2 )
|
else if ( s1[0] > s2[0] )
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -660,26 +660,27 @@ PyMac_RestoreMenuBar()
|
||||||
/*
|
/*
|
||||||
** Our replacement about box
|
** Our replacement about box
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "patchlevel.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
SIOUXDoAboutBox(void)
|
SIOUXDoAboutBox(void)
|
||||||
{
|
{
|
||||||
DialogPtr theDialog;
|
DialogPtr theDialog;
|
||||||
WindowRef theWindow;
|
WindowPtr theWindow;
|
||||||
CGrafPtr thePort;
|
|
||||||
short item;
|
short item;
|
||||||
short xpos, ypos, width, height, swidth, sheight;
|
short fontID;
|
||||||
|
|
||||||
if( (theDialog = GetNewDialog(ABOUT_ID, NULL, (WindowPtr)-1)) == NULL )
|
if( (theDialog = GetNewDialog(ABOUT_ID, NULL, (WindowPtr)-1)) == NULL )
|
||||||
return;
|
return;
|
||||||
theWindow = GetDialogWindow(theDialog);
|
theWindow = GetDialogWindow(theDialog);
|
||||||
thePort = GetWindowPort(theWindow);
|
SetPortWindowPort(theWindow);
|
||||||
width = thePort->portRect.right - thePort->portRect.left;
|
GetFNum("\pPython-Sans", &fontID);
|
||||||
height = thePort->portRect.bottom - thePort->portRect.top;
|
if (fontID == 0)
|
||||||
swidth = qd.screenBits.bounds.right - qd.screenBits.bounds.left;
|
fontID = kFontIDGeneva;
|
||||||
sheight = qd.screenBits.bounds.bottom - qd.screenBits.bounds.top - LMGetMBarHeight();
|
TextFont(fontID);
|
||||||
xpos = (swidth-width)/2;
|
TextSize(9);
|
||||||
ypos = (sheight-height)/5 + LMGetMBarHeight();
|
ParamText(Pstring(PATCHLEVEL), "\p", "\p", "\p");
|
||||||
MoveWindow(theWindow, xpos, ypos, 0);
|
|
||||||
ShowWindow(theWindow);
|
ShowWindow(theWindow);
|
||||||
ModalDialog(NULL, &item);
|
ModalDialog(NULL, &item);
|
||||||
DisposeDialog(theDialog);
|
DisposeDialog(theDialog);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue