Rev 5655 | Rev 5674 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5655 | Rev 5656 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | #ifndef AUTOBUILD |
3 | #ifndef AUTOBUILD |
4 | ?include "lang.h--" |
4 | ?include "lang.h--" |
5 | #endif |
5 | #endif |
Line 6... | Line 6... | ||
6 | 6 | ||
7 | #define MEMSIZE 0xFE800 |
- | |
8 | #include "..\lib\kolibri.h" |
7 | #define MEMSIZE 0xFE800 |
9 | #include "..\lib\mem.h" |
8 | #include "..\lib\mem.h" |
10 | #include "..\lib\strings.h" |
- | |
11 | #include "..\lib\dll.h" |
9 | #include "..\lib\strings.h" |
12 | #include "..\lib\io.h" |
10 | #include "..\lib\io.h" |
13 | #include "..\lib\list_box.h" |
11 | #include "..\lib\list_box.h" |
14 | #include "..\lib\gui.h" |
12 | #include "..\lib\gui.h" |
Line 25... | Line 23... | ||
25 | #endif |
23 | #endif |
Line 26... | Line 24... | ||
26 | 24 | ||
Line 27... | Line 25... | ||
27 | unsigned char icons[]= FROM "icons.raw"; |
25 | unsigned char icons[]= FROM "icons.raw"; |
28 | 26 | ||
- | 27 | #define PANEL_H 30 |
|
- | 28 | #define SKINS_STANDART_PATH "/sys/skins" |
|
29 | #define PANEL_H 30 |
29 | //"/kolibrios/res/skins" |
Line 30... | Line 30... | ||
30 | #define SKINS_STANDART_PATH "/sys/skins" //"/kolibrios/res/skins" |
30 | |
31 | #define WALP_STANDART_PATH "/kolibrios/res/wallpapers" |
31 | #define WALP_STANDART_PATH "/kolibrios/res/wallpapers" |
32 | 32 | ||
Line 48... | Line 48... | ||
48 | 48 | ||
49 | void Open_Dir() |
49 | void Open_Dir() |
50 | { |
50 | { |
51 | int j; |
51 | int j; |
- | 52 | list[active].count = 0; |
|
52 | list[active].count = 0; |
53 | if(io.dir.buffer)free(io.dir.buffer); |
53 | io.dir.load(#folder_path,DIR_ONLYREAL); |
54 | io.dir.load(#folder_path,DIR_ONLYREAL); |
54 | for (j=0; j |
55 | for (j=0; j |
55 | { |
56 | { |
56 | strcpy(#temp_filename, io.dir.position(j)); |
57 | strcpy(#temp_filename, io.dir.position(j)); |
Line 80... | Line 81... | ||
80 | temp_filename[strlen(#temp_filename)-4] = 0; |
81 | temp_filename[strlen(#temp_filename)-4] = 0; |
81 | yyy = i*list[active].line_h+list[active].y; |
82 | yyy = i*list[active].line_h+list[active].y; |
Line 82... | Line 83... | ||
82 | 83 | ||
83 | if (list[active].current-list[active].first==i) |
84 | if (list[active].current-list[active].first==i) |
84 | { |
85 | { |
85 | if (sc.work_button<>sc.work) |
86 | if (sc.work_button!=sc.work) |
86 | { |
87 | { |
87 | DrawBar(0, yyy, list[active].w, list[active].line_h, sc.work_button); |
88 | DrawBar(0, yyy, list[active].w, list[active].line_h, sc.work_button); |
88 | if (i |
89 | if (i |
89 | } |
90 | } |
Line 121... | Line 122... | ||
121 | 122 | ||
122 | void Apply() |
123 | void Apply() |
123 | { |
124 | { |
124 | if (list[SKINS].active) |
125 | if (list[SKINS].active) |
125 | { |
- | |
126 | strcpy(#cur_file_path, #folder_path); |
126 | { |
127 | cur = list[SKINS].current; |
- | |
128 | chrcat(#cur_file_path, '/'); |
127 | cur = list[SKINS].current; |
129 | strcat(#cur_file_path, io.dir.position(files_mas[cur])); |
128 | sprintf(#cur_file_path,"%s/%s",#folder_path,io.dir.position(files_mas[cur])); |
130 | SetSystemSkin(#cur_file_path); |
129 | SetSystemSkin(#cur_file_path); |
131 | } |
130 | } |
132 | if (list[WALLPAPERS].active) |
131 | if (list[WALLPAPERS].active) |
133 | { |
- | |
134 | strcpy(#cur_file_path, "\\S__"); |
- | |
135 | strcat(#cur_file_path, #folder_path); |
132 | { |
136 | cur = list[WALLPAPERS].current; |
- | |
137 | chrcat(#cur_file_path, '/'); |
133 | cur = list[WALLPAPERS].current; |
138 | strcat(#cur_file_path, io.dir.position(files_mas[cur])); |
134 | sprintf(#cur_file_path,"\\S__%s/%s",#folder_path,io.dir.position(files_mas[cur])); |
139 | RunProgram("/sys/media/kiv", #cur_file_path); |
135 | RunProgram("/sys/media/kiv", #cur_file_path); |
140 | Draw_List(); |
136 | Draw_List(); |
141 | } |
137 | } |
Line 163... | Line 159... | ||
163 | { |
159 | { |
164 | switch(WaitEvent()) |
160 | switch(WaitEvent()) |
165 | { |
161 | { |
166 | case evMouse: |
162 | case evMouse: |
167 | if (!CheckActiveProcess(Form.ID)) break; |
163 | if (!CheckActiveProcess(Form.ID)) break; |
- | 164 | mouse.get(); |
|
168 | scrollbar_v_mouse (#scroll1); |
165 | scrollbar_v_mouse (#scroll1); |
169 | if (list[active].first <> scroll1.position) |
166 | if (list[active].first != scroll1.position) |
170 | { |
167 | { |
171 | list[active].first = scroll1.position; |
168 | list[active].first = scroll1.position; |
172 | Draw_List(); |
169 | Draw_List(); |
173 | break; |
170 | break; |
174 | } |
171 | } |
Line 175... | Line -... | ||
175 | - | ||
176 | mouse.get(); |
- | |
177 | 172 | ||
178 | if (mouse.vert) |
173 | if (mouse.vert) |
179 | { |
174 | { |
180 | if (list[SKINS].active) && (list[SKINS].MouseScroll(mouse.vert)) Draw_List(); |
175 | if (list[SKINS].active) && (list[SKINS].MouseScroll(mouse.vert)) Draw_List(); |
181 | if (list[WALLPAPERS].active) && (list[WALLPAPERS].MouseScroll(mouse.vert)) Draw_List(); |
176 | if (list[WALLPAPERS].active) && (list[WALLPAPERS].MouseScroll(mouse.vert)) Draw_List(); |
Line 182... | Line 177... | ||
182 | } |
177 | } |
183 | 178 | ||
184 | if (mouse_clicked) |
179 | if (mouse.up)&&(mouse_clicked) |
185 | { |
180 | { |
186 | if (!mouse.lkm) && (list[SKINS].active) && (list[SKINS].ProcessMouse(mouse.x, mouse.y)) Apply(); |
181 | if (mouse.lkm) &&(list[SKINS].active) && (list[SKINS].ProcessMouse(mouse.x, mouse.y)) Apply(); |
187 | if (!mouse.lkm) && (list[WALLPAPERS].active) && (list[WALLPAPERS].ProcessMouse(mouse.x, mouse.y)) Apply(); |
182 | if (mouse.lkm) &&(list[WALLPAPERS].active) && (list[WALLPAPERS].ProcessMouse(mouse.x, mouse.y)) Apply(); |
188 | mouse_clicked=0; |
183 | mouse_clicked=false; |
189 | } |
184 | } |
Line 190... | Line 185... | ||
190 | if (mouse.lkm) && (list[SKINS].MouseOver(mouse.x, mouse.y)) mouse_clicked=1; |
185 | else if (mouse.down)&&(mouse.lkm) && (list[SKINS].MouseOver(mouse.x, mouse.y)) mouse_clicked=true; |
191 | break; |
186 | break; |