home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d5xx
/
d540
/
browser.lha
/
Browser
/
BrowserII_Src.LZH
/
Menus.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-06-21
|
24KB
|
1,767 lines
/*
* Menus.c - Copyright © 1991 by S.R. & P.C.
*
* Created: 18 Feb 1991 10:12:59
* Modified: 21 Jun 1991 17:38:38
*
* Make>> make
*/
#include "Global.h"
#include "proto/Menus.h"
static struct IntuiText IText37 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Delete",
NULL
};
static struct MenuItem MenuItem37 = {
NULL,
0,54,
102,9,
ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText37,
NULL,
'D',
NULL,
MENUNULL
};
static struct IntuiText IText36 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Set Protect",
NULL
};
static struct MenuItem MenuItem36 = {
&MenuItem37,
0,45,
102,9,
ITEMTEXT+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText36,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText35 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Set Comment",
NULL
};
static struct MenuItem MenuItem35 = {
&MenuItem36,
0,36,
102,9,
ITEMTEXT+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText35,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText34 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Touch",
NULL
};
static struct MenuItem MenuItem34 = {
&MenuItem35,
0,27,
102,9,
ITEMTEXT+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText34,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText33 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Duplicate",
NULL
};
static struct MenuItem MenuItem33 = {
&MenuItem34,
0,18,
102,9,
ITEMTEXT+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText33,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText32 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"MakeDir",
NULL
};
static struct MenuItem MenuItem32 = {
&MenuItem33,
0,9,
102,9,
ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText32,
NULL,
'M',
NULL,
MENUNULL
};
static struct IntuiText IText31 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Rename",
NULL
};
static struct MenuItem MenuItem31 = {
&MenuItem32,
0,0,
102,9,
ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText31,
NULL,
'R',
NULL,
MENUNULL
};
static struct Menu Menu3 = {
NULL,
144,0,
68,0,
MENUENABLED,
"Actions",
&MenuItem31
};
/*****************************************************************************/
static struct IntuiText IText29 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Affect All",
NULL
};
static struct MenuItem MenuItem29 = {
NULL,
0,72,
136,9,
ITEMTEXT+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText29,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText285 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Type",
NULL
};
static struct MenuItem SubItem285 = {
NULL,
113,36,
55,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText285,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText284 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Key",
NULL
};
static struct MenuItem SubItem284 = {
&SubItem285,
113,27,
55,9,
CHECKIT+ITEMTEXT+ITEMENABLED+HIGHCOMP,
7,
(APTR)&IText284,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText283 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Size",
NULL
};
static struct MenuItem SubItem283 = {
&SubItem284,
113,18,
55,9,
CHECKIT+ITEMTEXT+ITEMENABLED+HIGHCOMP,
11,
(APTR)&IText283,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText282 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Date",
NULL
};
static struct MenuItem SubItem282 = {
&SubItem283,
113,9,
55,9,
CHECKIT+ITEMTEXT+ITEMENABLED+HIGHCOMP,
13,
(APTR)&IText282,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText281 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Name",
NULL
};
static struct MenuItem SubItem281 = {
&SubItem282,
113,0,
55,9,
CHECKIT+ITEMTEXT+ITEMENABLED+HIGHCOMP,
14,
(APTR)&IText281,
NULL,
NULL,
NULL,
MENUNULL
};
#define SortSubItem1 SubItem281
static struct IntuiText IText28 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Sort by",
NULL
};
static struct MenuItem MenuItem28 = {
&MenuItem29,
0,63,
136,9,
ITEMTEXT+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText28,
NULL,
NULL,
&SubItem281,
MENUNULL
};
static struct IntuiText IText275 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Disk Key",
NULL
};
static struct MenuItem SubItem275 = {
NULL,
113,36,
135,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText275,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText274 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Date",
NULL
};
static struct MenuItem SubItem274 = {
&SubItem275,
113,27,
135,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText274,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText273 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Protection",
NULL
};
static struct MenuItem SubItem273 = {
&SubItem274,
113,18,
135,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText273,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText272 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Size in Blocks",
NULL
};
static struct MenuItem SubItem272 = {
&SubItem273,
113,9,
135,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText272,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText271 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Size in Bytes",
NULL
};
static struct MenuItem SubItem271 = {
&SubItem272,
113,0,
135,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText271,
NULL,
NULL,
NULL,
MENUNULL
};
#define EntryInfoSubItem1 SubItem271
static struct IntuiText IText27 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"File Info",
NULL
};
static struct MenuItem MenuItem27 = {
&MenuItem28,
0,54,
136,9,
ITEMTEXT+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText27,
NULL,
NULL,
&SubItem271,
MENUNULL
};
static struct IntuiText IText265 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Invert",
NULL
};
static struct MenuItem SubItem265 = {
NULL,
113,36,
112,9,
ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText265,
NULL,
'/',
NULL,
MENUNULL
};
static struct IntuiText IText264 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Clear",
NULL
};
static struct MenuItem SubItem264 = {
&SubItem265,
113,27,
112,9,
ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText264,
NULL,
'-',
NULL,
MENUNULL
};
static struct IntuiText IText263 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"No .info",
NULL
};
static struct MenuItem SubItem263 = {
&SubItem264,
113,18,
112,9,
ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText263,
NULL,
'.',
NULL,
MENUNULL
};
static struct IntuiText IText262 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Prefs",
NULL
};
static struct MenuItem SubItem262 = {
&SubItem263,
113,9,
112,9,
ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText262,
NULL,
'=',
NULL,
MENUNULL
};
static struct IntuiText IText261 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Set...",
NULL
};
static struct MenuItem SubItem261 = {
&SubItem262,
113,0,
112,9,
ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText261,
NULL,
'F',
NULL,
MENUNULL
};
static struct IntuiText IText26 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Filters",
NULL
};
static struct MenuItem MenuItem26 = {
&MenuItem27,
0,45,
136,9,
ITEMTEXT+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText26,
NULL,
NULL,
&SubItem261,
MENUNULL
};
static struct IntuiText IText25 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Select All",
NULL
};
static struct MenuItem MenuItem25 = {
&MenuItem26,
0,36,
136,9,
ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText25,
NULL,
'A',
NULL,
MENUNULL
};
static struct IntuiText IText24 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Select Match",
NULL
};
static struct MenuItem MenuItem24 = {
&MenuItem25,
0,27,
136,9,
ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText24,
NULL,
'?',
NULL,
MENUNULL
};
static struct IntuiText IText23 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Open Dir...",
NULL
};
static struct MenuItem MenuItem23 = {
&MenuItem24,
0,18,
136,9,
ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText23,
NULL,
'O',
NULL,
MENUNULL
};
static struct IntuiText IText22 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Open Parent",
NULL
};
static struct MenuItem MenuItem22 = {
&MenuItem23,
0,9,
136,9,
ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText22,
NULL,
'P',
NULL,
MENUNULL
};
static struct IntuiText IText21 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Rescan",
NULL
};
static struct MenuItem MenuItem21 = {
&MenuItem22,
0,0,
136,9,
ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText21,
NULL,
'S',
NULL,
MENUNULL
};
static struct Menu Menu2 = {
&Menu3,
84,0,
60,0,
MENUENABLED,
"Window",
&MenuItem21
};
/*****************************************************************************/
static struct IntuiText IText1B = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Quit",
NULL
};
static struct MenuItem MenuItem1B = {
NULL,
0,90,
102,9,
ITEMTEXT+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText1B,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText1A = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Save Config",
NULL
};
static struct MenuItem MenuItem1A = {
&MenuItem1B,
0,81,
102,9,
ITEMTEXT+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText1A,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText195 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"ASynchronous actions",
NULL
};
static struct MenuItem SubItem195 = {
NULL,
81,36,
320,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText195,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText194 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Ask before moving into subdirectories",
NULL
};
static struct MenuItem SubItem194 = {
&SubItem195,
81,27,
320,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText194,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText193 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Move files into subdirectories",
NULL
};
static struct MenuItem SubItem193 = {
&SubItem194,
81,18,
320,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText193,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText192 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Toggle Selections",
NULL
};
static struct MenuItem SubItem192 = {
&SubItem193,
81,9,
320,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText192,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText191 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Keep Selected",
NULL
};
static struct MenuItem SubItem191 = {
&SubItem192,
81,0,
320,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText191,
NULL,
NULL,
NULL,
MENUNULL
};
#define OptionsSubItem1 SubItem191
static struct IntuiText IText19 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Options",
NULL
};
static struct MenuItem MenuItem19 = {
&MenuItem1A,
0,72,
102,9,
ITEMTEXT+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText19,
NULL,
NULL,
&SubItem191,
MENUNULL
};
static struct IntuiText IText183 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Assigns",
NULL
};
static struct MenuItem SubItem183 = {
NULL,
81,18,
80,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText183,
NULL,
NULL,
NULL,
MENUNULL
};
#define DisplaySubItem3 SubItem183
static struct IntuiText IText182 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Volumes",
NULL
};
static struct MenuItem SubItem182 = {
&SubItem183,
81,9,
80,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText182,
NULL,
NULL,
NULL,
MENUNULL
};
#define DisplaySubItem2 SubItem182
static struct IntuiText IText181 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Devices",
NULL
};
static struct MenuItem SubItem181 = {
&SubItem182,
81,0,
80,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText181,
NULL,
NULL,
NULL,
MENUNULL
};
#define DisplaySubItem1 SubItem181
static struct IntuiText IText18 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Display",
NULL
};
static struct MenuItem MenuItem18 = {
&MenuItem19,
0,63,
102,9,
ITEMTEXT+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText18,
NULL,
NULL,
&SubItem181,
MENUNULL
};
static struct IntuiText IText174 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Comment",
NULL
};
static struct MenuItem SubItem174 = {
NULL,
81,27,
80,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
1,
(APTR)&IText174,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText173 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Protect",
NULL
};
static struct MenuItem SubItem173 = {
&SubItem174,
81,18,
80,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
1,
(APTR)&IText173,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText172 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Dates",
NULL
};
static struct MenuItem SubItem172 = {
&SubItem173,
81,9,
80,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
1,
(APTR)&IText172,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText171 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Clone",
NULL
};
static struct MenuItem SubItem171 = {
&SubItem172,
81,0,
80,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
14,
(APTR)&IText171,
NULL,
NULL,
NULL,
MENUNULL
};
#define CopyFlagsSubItem1 SubItem171
static struct IntuiText IText17 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Copy Flags",
NULL
};
static struct MenuItem MenuItem17 = {
&MenuItem18,
0,54,
102,9,
ITEMTEXT+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText17,
NULL,
NULL,
&SubItem171,
MENUNULL
};
static struct IntuiText IText168 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Copy Hierarchy",
NULL
};
static struct MenuItem SubItem168 = {
NULL,
81,63,
192,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText168,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText167 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Copy Empty Dirs",
NULL
};
static struct MenuItem SubItem167 = {
&SubItem168,
81,54,
192,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText167,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText166 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Ask before overwrite",
NULL
};
static struct MenuItem SubItem166 = {
&SubItem167,
81,45,
192,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
16,
(APTR)&IText166,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText165 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Don't overwrite files",
NULL
};
static struct MenuItem SubItem165 = {
&SubItem166,
81,36,
192,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
40,
(APTR)&IText165,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText164 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Update",
NULL
};
static struct MenuItem SubItem164 = {
&SubItem165,
81,27,
192,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
16,
(APTR)&IText164,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText163 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Allways Move",
NULL
};
static struct MenuItem SubItem163 = {
&SubItem164,
81,18,
192,9,
CHECKIT+ITEMTEXT+ITEMENABLED+HIGHCOMP,
3,
(APTR)&IText163,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText162 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Allways Copy",
NULL
};
static struct MenuItem SubItem162 = {
&SubItem163,
81,9,
192,9,
CHECKIT+ITEMTEXT+ITEMENABLED+HIGHCOMP,
5,
(APTR)&IText162,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText161 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Context",
NULL
};
static struct MenuItem SubItem161 = {
&SubItem162,
81,0,
192,9,
CHECKIT+ITEMTEXT+ITEMENABLED+HIGHCOMP,
6,
(APTR)&IText161,
NULL,
NULL,
NULL,
MENUNULL
};
#define CopyModeSubItem1 SubItem161
static struct IntuiText IText16 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Copy Mode",
NULL
};
static struct MenuItem MenuItem16 = {
&MenuItem17,
0,45,
102,9,
ITEMTEXT+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText16,
NULL,
NULL,
&SubItem161,
MENUNULL
};
static struct IntuiText IText153 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Request",
NULL
};
static struct MenuItem SubItem153 = {
NULL,
81,18,
80,9,
CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText153,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText152 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Shell",
NULL
};
static struct MenuItem SubItem152 = {
&SubItem153,
81,9,
80,9,
CHECKIT+ITEMTEXT+ITEMENABLED+HIGHCOMP,
1,
(APTR)&IText152,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText151 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"RunBack",
NULL
};
static struct MenuItem SubItem151 = {
&SubItem152,
81,0,
80,9,
CHECKIT+ITEMTEXT+ITEMENABLED+HIGHCOMP,
2,
(APTR)&IText151,
NULL,
NULL,
NULL,
MENUNULL
};
#define RunModeSubItem1 SubItem151
static struct IntuiText IText15 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Run Mode",
NULL
};
static struct MenuItem MenuItem15 = {
&MenuItem16,
0,36,
102,9,
ITEMTEXT+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText15,
NULL,
NULL,
&SubItem151,
MENUNULL
};
static struct IntuiText IText142 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Custom",
NULL
};
static struct MenuItem ScreenSubItem2 = {
NULL,
81,9,
96,9,
CHECKIT+ITEMTEXT+ITEMENABLED+HIGHCOMP,
1,
(APTR)&IText142,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText141 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Workbench",
NULL
};
static struct MenuItem ScreenSubItem1 = {
&ScreenSubItem2,
81,0,
96,9,
CHECKIT+ITEMTEXT+ITEMENABLED+HIGHCOMP,
2,
(APTR)&IText141,
NULL,
NULL,
NULL,
MENUNULL
};
static struct IntuiText IText14 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Screen",
NULL
};
static struct MenuItem MenuItem14 = {
&MenuItem15,
0,27,
102,9,
ITEMTEXT+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText14,
NULL,
NULL,
&ScreenSubItem1,
MENUNULL
};
static struct IntuiText IText13 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Command",
NULL
};
static struct MenuItem MenuItem13 = {
&MenuItem14,
0,18,
102,9,
ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText13,
NULL,
'C',
NULL,
MENUNULL
};
static struct IntuiText IText122 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Shell",
NULL
};
static struct MenuItem SubItem122 = {
NULL,
81,9,
72,9,
CHECKIT+ITEMTEXT+ITEMENABLED+HIGHCOMP,
1,
(APTR)&IText122,
NULL,
NULL,
NULL,
MENUNULL
};
#define CmdModeSubItem2 SubItem122
static struct IntuiText IText121 = {
0,1,JAM1,
21,1,
NULL,
(UBYTE *)"Simple",
NULL
};
static struct MenuItem SubItem121 = {
&SubItem122,
81,0,
72,9,
CHECKIT+ITEMTEXT+ITEMENABLED+HIGHCOMP,
2,
(APTR)&IText121,
NULL,
NULL,
NULL,
MENUNULL
};
#define CmdModeSubItem1 SubItem121
static struct IntuiText IText12 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Cmd Mode",
NULL
};
static struct MenuItem MenuItem12 = {
&MenuItem13,
0,9,
102,9,
ITEMTEXT+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText12,
NULL,
NULL,
&SubItem121,
MENUNULL
};
static struct IntuiText IText11 = {
0,1,JAM1,
2,1,
NULL,
(UBYTE *)"Update Menus",
NULL
};
static struct MenuItem MenuItem11 = {
&MenuItem12,
0,0,
102,9,
ITEMTEXT+ITEMENABLED+HIGHCOMP,
0,
(APTR)&IText11,
NULL,
NULL,
NULL,
MENUNULL
};
struct Menu Menu1 = {
&Menu2,
0,0,
84,0,
MENUENABLED,
"BrowserII",
&MenuItem11
};
/*****************************************************************************/
extern struct BrowserWindow *CurrentWin;
extern struct MinList WindowList;
extern struct Config Config;
extern struct ParMConfig ParMConfig;
extern char *ReqTitle;
extern short NumProcess;
static struct MenuFlags MenuFlags;
void UpdateMenus(void)
{
struct BrowserWindow *Win;
Win = (struct BrowserWindow *)WindowList.mlh_Head;
Forbid();
while(Win->bw_Node.mln_Succ) {
ClearMenuStrip(Win->bw_Window);
Win = (struct BrowserWindow *)Win->bw_Node.mln_Succ;
}
Permit();
ParMConfig.MenuPen = 0;
if (!ParseMenus(&ParMConfig))
FreeMenus(&ParMConfig);
Win = (struct BrowserWindow *)WindowList.mlh_Head;
Forbid();
while(Win->bw_Node.mln_Succ) {
SetMenuStrip(Win->bw_Window, &Menu1);
Win = (struct BrowserWindow *)Win->bw_Node.mln_Succ;
}
Permit();
}
void SetMenus(struct BrowserWindow *Win)
{
struct MenuItem *mi;
short i;
Forbid(); /* Prevent user from using menus during setup */
mi = &EntryInfoSubItem1; /* Size in bytes */
for( i=0 ; i<6 ; i++ ) {
if (Win->bw_EntryInfoFlags & 1<<i)
mi->Flags |= CHECKED;
else
mi->Flags &= ~CHECKED;
mi = mi->NextItem;
}
mi = &SortSubItem1; /* Sort by Name */
for( i=0 ; i<4 ; i++ ) {
if ((Win->bw_Sort & 0x0F) == i)
mi->Flags |= CHECKED;
else
mi->Flags &= ~CHECKED;
mi = mi->NextItem;
}
if (Win->bw_Sort & TYPE_SORT)
mi->Flags |= CHECKED;
else
mi->Flags &= ~CHECKED;
MenuFlags.OldFileInfo = Win->bw_EntryInfoFlags;
MenuFlags.OldSort = Win->bw_Sort;
Permit();
}
static void CheckItems(struct MenuItem *mi, short Flags, short NumFlags)
{
short i;
for( i=0 ; i<NumFlags ; i++ ) {
if (Flags & 1<<i)
mi->Flags |= CHECKED;
mi = mi->NextItem;
}
}
void InitMenus(void)
{
ParMConfig.LinkMenu = &Menu3;
if (Config.CmdMode)
CmdModeSubItem1.Flags |= CHECKED;
else
CmdModeSubItem2.Flags |= CHECKED;
if (Config.Screen == BROWSER_WORKBENCH)
ScreenSubItem1.Flags |= CHECKED;
else
ScreenSubItem2.Flags |= CHECKED;
CheckItems(&RunModeSubItem1, Config.RunMode, 3);
CheckItems(&CopyModeSubItem1, Config.CopyMode, 8);
CheckItems(&CopyFlagsSubItem1, Config.CopyFlags, 4);
CheckItems(&OptionsSubItem1, Config.Options, 5);
if (Config.Display & DLF_DEVICES)
DisplaySubItem1.Flags |= CHECKED;
if (Config.Display & DLF_VOLUMES)
DisplaySubItem2.Flags |= CHECKED;
if (Config.Display & DLF_DIRS)
DisplaySubItem3.Flags |= CHECKED;
}
void CmdMode(void)
{
Config.CmdMode = ParMConfig.SimpleCmdMode = CmdModeSubItem1.Flags & CHECKED;
}
void ScreenType(void)
{
Config.Screen = (ScreenSubItem1.Flags & CHECKED) ? BROWSER_WORKBENCH : BROWSER_CUSTOM;
}
void RunMode(void)
{
struct MenuItem *mi;
short i;
mi = &RunModeSubItem1;
Config.RunMode = 0;
for( i=0 ; i<3 ; i++ ) {
if (mi->Flags & CHECKED)
Config.RunMode |= 1<<i;
mi = mi->NextItem;
}
}
void CopyMode(void)
{
struct MenuItem *mi;
short i;
mi = &CopyModeSubItem1;
Config.CopyMode = 0;
for( i=0 ; i<8 ; i++ ) {
if (mi->Flags & CHECKED)
Config.CopyMode |= 1<<i;
mi = mi->NextItem;
}
}
void CopyFlags(void)
{
struct MenuItem *mi;
short i;
mi = &CopyFlagsSubItem1;
Config.CopyFlags = 0;
for( i=0 ; i<4 ; i++ ) {
if (mi->Flags & CHECKED)
Config.CopyFlags |= 1<<i;
mi = mi->NextItem;
}
}
void DisplayDevs(void)
{
Config.Display = 0;
if (DisplaySubItem1.Flags & CHECKED)
Config.Display |= DLF_DEVICES|DLF_DISKONLY;
if (DisplaySubItem2.Flags & CHECKED)
Config.Display |= DLF_VOLUMES;
if (DisplaySubItem3.Flags & CHECKED)
Config.Display |= DLF_DIRS;
MenuFlags.NewDevs = TRUE;
}
void Options(void)
{
struct MenuItem *mi;
short i;
Config.Options = 0;
mi = &OptionsSubItem1;
for( i=0 ; i<4 ; i++ ) {
if (mi->Flags & CHECKED)
Config.Options |= 1<<i;
mi = mi->NextItem;
}
/* now mi points to ASynchronous option. */
if (mi->Flags & CHECKED) {
Config.Options |= OPT_ASYNCHRONOUS;
}
else if (NumProcess > 0) {
SimpleRequest(ReqTitle, "Processes still running");
mi->Flags |= CHECKED;
Config.Options |= OPT_ASYNCHRONOUS;
}
}
void FileInfo(void)
{
struct MenuItem *mi;
short i;
mi = &EntryInfoSubItem1;
CurrentWin->bw_EntryInfoFlags = 0;
for( i=0 ; i<5 ; i++ ) {
if (mi->Flags & CHECKED)
CurrentWin->bw_EntryInfoFlags |= 1<<i;
mi = mi->NextItem;
}
}
void SortBy(void)
{
struct MenuItem *mi;
short i;
mi = &SortSubItem1;
for( i=0 ; i<4 ; i++ ) {
if (mi->Flags & CHECKED)
CurrentWin->bw_Sort = i;
mi = mi->NextItem;
}
if (mi->Flags & CHECKED)
CurrentWin->bw_Sort |= TYPE_SORT;
}
struct MenuFlags *GetMenuFlags(void)
{
return &MenuFlags;
}