Rev 7311 | Rev 7428 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7311 | Rev 7422 | ||
---|---|---|---|
Line 38... | Line 38... | ||
38 | 38 | ||
Line 39... | Line 39... | ||
39 | struct _SystemDiscs |
39 | struct _SystemDiscs |
40 | { |
40 | { |
41 | collection list; |
41 | collection list; |
- | 42 | int dev_num; |
|
42 | byte Get(); |
43 | void Get(); |
43 | void Draw(); |
44 | void Draw(); |
44 | void Click(); |
45 | void Click(); |
45 | } SystemDiscs; |
46 | } SystemDiscs; |
Line 86... | Line 87... | ||
86 | ESBYTE[dev_icon]=3; |
87 | ESBYTE[dev_icon]=3; |
87 | strcpy(disc_name, T_UNC); |
88 | strcpy(disc_name, T_UNC); |
88 | } |
89 | } |
89 | } |
90 | } |
90 | dword __countSysDiscs = 0; |
91 | |
91 | byte _SystemDiscs::Get() |
- | |
- | 92 | void _SystemDiscs::Get() |
|
92 | { |
93 | { |
93 | byte ret = 0; |
94 | byte ret = 0; |
94 | char dev_name[10], sys_discs[10]; |
95 | char dev_name[10], sys_discs[10]; |
95 | int i1, j1, dev_num, dev_disc_num; |
96 | int i1, j1, dev_num_i, dev_disc_num; |
96 | dword temp_file_count, tempbuf; |
97 | dword devbuf; |
97 | dword devbuf; |
- | |
98 | 98 | ||
Line 99... | Line 99... | ||
99 | list.drop(); |
99 | list.drop(); |
100 | devbuf = malloc(10000); |
100 | devbuf = malloc(10000); |
101 | ReadDir(19, devbuf, "/"); |
101 | ReadDir(19, devbuf, "/"); |
102 | dev_num = EBX; |
102 | dev_num = dev_num_i = EBX; |
103 | IF (dev_num != __countSysDiscs) |
- | |
104 | { |
- | |
105 | __countSysDiscs = dev_num; |
- | |
106 | ret = 0xFF; |
- | |
107 | } |
- | |
108 | ELSE ret = 0; |
- | |
109 | for (i1=0; i1 |
103 | for (i1=0; i1 |
110 | { |
104 | { |
111 | sprintf(#dev_name,"/%s",i1*304+ devbuf+72); |
105 | sprintf(#dev_name,"/%s",i1*304+ devbuf+72); |
112 | Open_Dir(#dev_name, ONLY_OPEN); |
106 | Open_Dir(#dev_name, ONLY_OPEN); |
113 | dev_disc_num = files.count; |
107 | dev_disc_num = files.count; |
114 | for (j1=0; j1 |
108 | for (j1=0; j1 |
Line 117... | Line 111... | ||
117 | list.add(#sys_discs); |
111 | list.add(#sys_discs); |
118 | } |
112 | } |
119 | if (!strcmp(#sys_discs, "/rd/1")) |
113 | if (!strcmp(#sys_discs, "/rd/1")) |
120 | { |
114 | { |
121 | GetDir(#tempbuf, #temp_file_count, "/kolibrios", DIRS_ONLYREAL); |
115 | if (dir_exists("/kolibrios")) { |
122 | if (temp_file_count) list.add("/kolibrios"); |
116 | list.add("/kolibrios"); |
123 | free(tempbuf); |
117 | dev_num++; |
124 | } |
118 | } |
- | 119 | } |
|
125 | } |
120 | } |
126 | free(devbuf); |
121 | free(devbuf); |
127 | return ret; |
122 | } |
128 | } |
- | |
129 | 123 | ||
Line 130... | Line 124... | ||
130 | void _SystemDiscs::Draw() |
124 | void _SystemDiscs::Draw() |
131 | { |
125 | { |
132 | char dev_name[15], disc_name[100], i, dev_icon, is_active, name_len; |
126 | char dev_name[15], disc_name[100], i, dev_icon, is_active, name_len; |
Line 212... | Line 206... | ||
212 | } |
206 | } |
213 | 207 | ||
Line 214... | Line 208... | ||
214 | void ActionsDraw() |
208 | void ActionsDraw() |
215 | { |
209 | { |
- | 210 | int i; |
|
216 | int actions_y= SystemDiscs.list.count*16+108, lineh=16; |
211 | int actions_y= SystemDiscs.list.count*16+108, lineh=16; |
217 | Tip(actions_y-18, T_ACTIONS, 77, ""); //çàãîëîâîê |
212 | Tip(actions_y-18, T_ACTIONS, 77, ""); //çàãîëîâîê |
218 | for (i=0; actions[i*3]!=0; i++, actions_y+=lineh) |
213 | for (i=0; actions[i*3]!=0; i++, actions_y+=lineh) |
219 | { |
214 | { |
220 | DrawBar(17,actions_y,160,lineh,0xFFFFFF); //áåëîå |
215 | DrawBar(17,actions_y,160,lineh,0xFFFFFF); //áåëîå |