2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
9 /*********************************************************************************************/
16 /*********************************************************************************************/
20 {NM_TITLE
, (STRPTR
)MSG_MEN_PROJECT
},
21 {NM_ITEM
, (STRPTR
)MSG_MEN_PROJECT_OPEN
},
22 {NM_ITEM
, (STRPTR
)MSG_MEN_PROJECT_SAVEAS
},
23 {NM_ITEM
, NM_BARLABEL
},
24 {NM_ITEM
, (STRPTR
)MSG_MEN_PROJECT_QUIT
},
25 {NM_TITLE
, (STRPTR
)MSG_MEN_EDIT
},
26 {NM_ITEM
, (STRPTR
)MSG_MEN_EDIT_DEFAULT
},
27 {NM_ITEM
, (STRPTR
)MSG_MEN_EDIT_LASTSAVED
},
28 {NM_ITEM
, (STRPTR
)MSG_MEN_EDIT_RESTORE
},
29 {NM_TITLE
, (STRPTR
)MSG_MEN_SETTINGS
},
30 {NM_ITEM
, (STRPTR
)MSG_MEN_SETTINGS_CREATEICONS
, NULL
, CHECKIT
| MENUTOGGLE
},
34 /*********************************************************************************************/
38 struct NewMenu
*actnm
= nm
;
40 for(actnm
= nm
; actnm
->nm_Type
!= NM_END
; actnm
++)
42 if (actnm
->nm_Label
!= NM_BARLABEL
)
44 ULONG id
= (ULONG
)actnm
->nm_Label
;
47 if (actnm
->nm_Type
== NM_TITLE
)
49 actnm
->nm_Label
= str
;
51 actnm
->nm_Label
= str
+ 2;
52 if (str
[0] != ' ') actnm
->nm_CommKey
= str
;
54 actnm
->nm_UserData
= (APTR
)id
;
56 } /* if (actnm->nm_Label != NM_BARLABEL) */
58 } /* for(actnm = nm; nm->nm_Type != NM_END; nm++) */
62 /*********************************************************************************************/
64 /*********************************************************************************************/
66 STRPTR
GetFile(STRPTR title
, STRPTR dir
, BOOL savemode
)
68 static UBYTE filebuffer
[300];
69 struct FileRequester
*req
;
72 AslBase
= OpenLibrary("asl.library", 39);
75 req
= AllocAslRequestTags(ASL_FileRequest
, ASLFR_TitleText
, (IPTR
)title
,
76 ASLFR_DoPatterns
, TRUE
,
77 ASLFR_InitialDrawer
, (IPTR
)dir
,
78 ASLFR_DoSaveMode
, savemode
,
82 if (AslRequest(req
, NULL
))
84 strncpy(filebuffer
, req
->fr_Drawer
, 299);
85 AddPart(filebuffer
, req
->fr_File
, 299);
89 } /* if (AslRequest(req, NULL) */
95 CloseLibrary(AslBase
);
102 /*********************************************************************************************/