Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
ee081040
Kaydet (Commit)
ee081040
authored
Nis 21, 2000
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Made the GUSI options work again with GUSI 2.
üst
6dd9fc1a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
5 deletions
+42
-5
macglue.h
Mac/Include/macglue.h
+4
-0
gusiconfig.cpp
Mac/Python/gusiconfig.cpp
+36
-3
macgetpath.c
Mac/Python/macgetpath.c
+2
-2
No files found.
Mac/Include/macglue.h
Dosyayı görüntüle @
ee081040
...
...
@@ -127,6 +127,10 @@ PyObject *PyMac_Buildwide(wide *); /* Convert wide to PyObject */
void
PyMac_InitApplet
(
void
);
/* Initialize and run an Applet */
void
PyMac_Initialize
(
void
);
/* Initialize function for embedding Python */
#ifdef USE_GUSI2
short
PyMac_OpenPrefFile
(
void
);
/* From macgetpath.c, open and return preference file */
#endif
/* From macfiletype.c: */
long
getfiletype
(
char
*
);
/* Get file type */
...
...
Mac/Python/gusiconfig.cpp
Dosyayı görüntüle @
ee081040
...
...
@@ -5,9 +5,11 @@
#define GUSI_SOURCE
#include <GUSIConfig.h>
#include <sys/cdefs.h>
#include <Resources.h>
#include "Python.h"
#include "macglue.h"
#include "pythonresources.h"
static
void
PyMac_GUSISpin
(
bool
wait
)
...
...
@@ -79,13 +81,44 @@ void GUSISetupDevices()
GUSIConfiguration
::
FileSuffix
sSuffices
[]
=
{
""
,
'
????
'
,
'
????
'
};
extern
"C"
void
GUSISetupConfig
()
{
Handle
h
;
short
oldrh
,
prefrh
=
-
1
;
short
resource_id
=
GUSIConfiguration
::
kNoResource
;
oldrh
=
CurResFile
();
/* Try override from the application resource fork */
UseResFile
(
PyMac_AppRefNum
);
h
=
Get1Resource
(
'
GU
\
267
I
'
,
GUSIOPTIONSOVERRIDE_ID
);
if
(
h
)
{
resource_id
=
GUSIOPTIONSOVERRIDE_ID
;
}
else
{
/* Next try normal resource from preference file */
prefrh
=
PyMac_OpenPrefFile
();
h
=
Get1Resource
(
'
GU
\
267
I
'
,
GUSIOPTIONS_ID
);
if
(
h
)
{
resource_id
=
GUSIOPTIONS_ID
;
}
else
{
/* Finally try normal resource from application */
if
(
prefrh
!=
-
1
)
{
CloseResFile
(
prefrh
);
prefrh
=
-
1
;
}
resource_id
=
GUSIOPTIONS_ID
;
}
}
/* Now we have the right resource file topmost and the id. Init GUSI. */
GUSIConfiguration
*
config
=
GUSIConfiguration
::
CreateInstance
(
GUSIConfiguration
::
kNoResource
);
GUSIConfiguration
::
CreateInstance
(
resource_id
);
/* Finally restore the old resource file */
if
(
prefrh
!=
-
1
)
CloseResFile
(
prefrh
);
UseResFile
(
oldrh
);
config
->
ConfigureDefaultTypeCreator
(
'
TEXT
'
,
'
TEXT
'
);
config
->
ConfigureDefaultTypeCreator
(
'
ttxt
'
,
'
TEXT
'
);
config
->
ConfigureSuffices
(
sizeof
(
sSuffices
)
/
sizeof
(
GUSIConfiguration
::
FileSuffix
)
-
1
,
sSuffices
);
config
->
ConfigureAutoInitGraf
(
false
);
...
...
Mac/Python/macgetpath.c
Dosyayı görüntüle @
ee081040
...
...
@@ -189,7 +189,7 @@ Py_GetPath()
/*
** Open/create the Python Preferences file, return the handle
*/
s
tatic
s
hort
short
PyMac_OpenPrefFile
()
{
AliasHandle
handle
;
...
...
@@ -467,4 +467,4 @@ PyMac_SetGUSIOptions()
if
(
prefrh
!=
-
1
)
CloseResFile
(
prefrh
);
UseResFile
(
oldrh
);
}
#endif
/* USE_GUSI */
#endif
/* USE_GUSI
1
*/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment