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
d99d2833
Kaydet (Commit)
d99d2833
authored
Tem 22, 1996
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added SetFolder method which sets Standard File initial folder
üst
1ed9529a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
macfsmodule.c
Mac/Modules/macfsmodule.c
+29
-0
No files found.
Mac/Modules/macfsmodule.c
Dosyayı görüntüle @
d99d2833
...
...
@@ -31,6 +31,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <Folders.h>
#include <StandardFile.h>
#include <Aliases.h>
#include <LowMem.h>
#include "nfullpath.h"
...
...
@@ -689,6 +690,33 @@ mfs_StandardPutFile(self, args)
return
mkvalue
(
"(Oi)"
,
newmfssobject
(
&
reply
.
sfFile
),
reply
.
sfGood
);
}
/*
** Set initial directory for file dialogs */
static
object
*
mfs_SetFolder
(
self
,
args
)
object
*
self
;
object
*
args
;
{
FSSpec
spec
;
FSSpec
ospec
;
short
orefnum
;
long
oparid
;
/* Get old values */
orefnum
=
-
LMGetSFSaveDisk
();
oparid
=
LMGetCurDirStore
();
(
void
)
FSMakeFSSpec
(
orefnum
,
oparid
,
"\pplaceholder"
,
&
ospec
);
/* Go to working directory by default */
(
void
)
FSMakeFSSpec
(
0
,
0
,
"\p:placeholder"
,
&
spec
);
if
(
!
newgetargs
(
args
,
"|O&"
,
PyMac_GetFSSpec
,
&
spec
))
return
NULL
;
/* Set standard-file working directory */
LMSetSFSaveDisk
(
-
spec
.
vRefNum
);
LMSetCurDirStore
(
spec
.
parID
);
return
(
object
*
)
newmfssobject
(
&
ospec
);
}
static
object
*
mfs_FSSpec
(
self
,
args
)
object
*
self
;
/* Not used */
...
...
@@ -794,6 +822,7 @@ static struct methodlist mfs_methods[] = {
{
"PromptGetFile"
,
mfs_PromptGetFile
,
1
},
{
"StandardPutFile"
,
mfs_StandardPutFile
,
1
},
{
"GetDirectory"
,
mfs_GetDirectory
,
1
},
{
"SetFolder"
,
mfs_SetFolder
,
1
},
{
"FSSpec"
,
mfs_FSSpec
,
1
},
{
"RawFSSpec"
,
mfs_RawFSSpec
,
1
},
{
"RawAlias"
,
mfs_RawAlias
,
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