Rev 5651 | Rev 5655 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5651 | Rev 5654 | ||
---|---|---|---|
Line 7... | Line 7... | ||
7 | #define MEMSIZE 0xFE800 |
7 | #define MEMSIZE 0xFE800 |
8 | #include "..\lib\kolibri.h" |
8 | #include "..\lib\kolibri.h" |
9 | #include "..\lib\mem.h" |
9 | #include "..\lib\mem.h" |
10 | #include "..\lib\strings.h" |
10 | #include "..\lib\strings.h" |
11 | #include "..\lib\dll.h" |
11 | #include "..\lib\dll.h" |
12 | #include "..\lib\file_system.h" |
12 | #include "..\lib\io.h" |
13 | #include "..\lib\list_box.h" |
13 | #include "..\lib\list_box.h" |
14 | #include "..\lib\gui.h" |
14 | #include "..\lib\gui.h" |
15 | #include "..\lib\obj\box_lib.h" |
15 | #include "..\lib\obj\box_lib.h" |
Line 16... | Line 16... | ||
16 | 16 | ||
Line 24... | Line 24... | ||
24 | ?define T_WALLPAPERS " Wallpappers" |
24 | ?define T_WALLPAPERS " Wallpappers" |
25 | #endif |
25 | #endif |
Line 26... | Line 26... | ||
26 | 26 | ||
Line 27... | Line -... | ||
27 | unsigned char icons[]= FROM "icons.raw"; |
- | |
28 | 27 | unsigned char icons[]= FROM "icons.raw"; |
|
29 | 28 | ||
30 | #define PANEL_H 30 |
29 | #define PANEL_H 30 |
Line 31... | Line 30... | ||
31 | #define SKINS_STANDART_PATH "/kolibrios/res/skins" |
30 | #define SKINS_STANDART_PATH "/sys/skins" //"/kolibrios/res/skins" |
32 | #define WALP_STANDART_PATH "/kolibrios/res/wallpapers" |
31 | #define WALP_STANDART_PATH "/kolibrios/res/wallpapers" |
33 | 32 | ||
Line 34... | Line 33... | ||
34 | llist list[2]; |
33 | llist list[2]; |
35 | int active; |
34 | int active; |
36 | enum { WALLPAPERS, SKINS }; |
35 | enum { WALLPAPERS, SKINS }; |
37 | 36 | ||
38 | char folder_path[4096]; |
- | |
Line 39... | Line 37... | ||
39 | char cur_file_path[4096]; |
37 | char folder_path[4096]; |
Line 40... | Line 38... | ||
40 | char temp_filename[4096]; |
38 | char cur_file_path[4096]; |
41 | int files_mas[100]; |
39 | char temp_filename[4096]; |
Line 42... | Line 40... | ||
42 | dword buf; |
40 | int files_mas[100]; |
Line 43... | Line -... | ||
43 | - | ||
44 | int cur; |
- | |
45 | - | ||
46 | system_colors sc; |
- | |
47 | proc_info Form; |
- | |
48 | 41 | ||
49 | scroll_bar scroll1 = { 18,200,398, 44,18,0,115,15,0,0xeeeeee,0xD2CED0,0x555555,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}; |
42 | int cur; |
50 | 43 | ||
51 | #include "other.h" |
- | |
52 | 44 | system_colors sc; |
|
53 | //icons configurate, delete from list, delete from disk, make default |
- | |
54 | //remember current |
45 | proc_info Form; |
55 | - | ||
56 | void Open_Dir() |
46 | |
57 | { |
47 | scroll_bar scroll1 = { 18,200,398, 44,18,0,115,15,0,0xeeeeee,0xD2CED0,0x555555,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}; |
58 | int j, filesnum; |
48 | |
59 | 49 | void Open_Dir() |
|
60 | list[active].count = 0; |
50 | { |
61 | free(buf); |
51 | int j; |
62 | if (GetDir(#buf, #filesnum, #folder_path, DIRS_ONLYREAL)!=0) return; |
52 | list[active].count = 0; |
63 | 53 | io.dir_buffer(#folder_path,DIR_ONLYREAL); |
|
64 | for (j=0; j |
54 | for (j=0; j |
65 | { |
55 | { |
66 | strcpy(#temp_filename, j*304 + buf+72); |
56 | strcpy(#temp_filename, io.dir_position(j)); |
67 | strlwr(#temp_filename); |
- | |
68 | if (active==SKINS) if (strcmpi(#temp_filename+strlen(#temp_filename)-4,".skn")!=0) continue; |
57 | strlwr(#temp_filename); |
Line 69... | Line 58... | ||
69 | if (active==WALLPAPERS) if (strcmpi(#temp_filename+strlen(#temp_filename)-4,".txt")==0) continue; |
58 | if (active==SKINS) if (strcmpi(#temp_filename+strlen(#temp_filename)-4,".skn")!=0) continue; |
70 | cur = list[active].count; |
59 | if (active==WALLPAPERS) if (strcmpi(#temp_filename+strlen(#temp_filename)-4,".txt")==0) continue; |
71 | files_mas[cur]=j; |
60 | cur = list[active].count; |
Line 85... | Line 74... | ||
85 | if (list[active].count > list[active].visible) list_last = list[active].visible; else list_last = list[active].count; |
74 | if (list[active].count > list[active].visible) list_last = list[active].visible; else list_last = list[active].count; |
Line 86... | Line 75... | ||
86 | 75 | ||
87 | for (i=0; i |
76 | for (i=0; i |
88 | { |
77 | { |
89 | cur = list[active].first; |
78 | cur = list[active].first; |
90 | strcpy(#temp_filename, files_mas[i+cur]*304 + buf+72); |
79 | strcpy(#temp_filename, io.dir_position(files_mas[i+cur])); |
91 | temp_filename[strlen(#temp_filename)-4] = 0; |
80 | temp_filename[strlen(#temp_filename)-4] = 0; |
Line 92... | Line 81... | ||
92 | yyy = i*list[active].line_h+list[active].y; |
81 | yyy = i*list[active].line_h+list[active].y; |
93 | 82 | ||
Line 135... | Line 124... | ||
135 | if (list[SKINS].active) |
124 | if (list[SKINS].active) |
136 | { |
125 | { |
137 | strcpy(#cur_file_path, #folder_path); |
126 | strcpy(#cur_file_path, #folder_path); |
138 | cur = list[SKINS].current; |
127 | cur = list[SKINS].current; |
139 | chrcat(#cur_file_path, '/'); |
128 | chrcat(#cur_file_path, '/'); |
140 | strcat(#cur_file_path, files_mas[cur]*304 + buf+72); |
129 | strcat(#cur_file_path, io.dir_position(files_mas[cur])); |
141 | SetSystemSkin(#cur_file_path); |
130 | SetSystemSkin(#cur_file_path); |
142 | //Draw_List(); |
- | |
143 | } |
131 | } |
144 | if (list[WALLPAPERS].active) |
132 | if (list[WALLPAPERS].active) |
145 | { |
133 | { |
146 | strcpy(#cur_file_path, "\\S__"); |
134 | strcpy(#cur_file_path, "\\S__"); |
147 | strcat(#cur_file_path, #folder_path); |
135 | strcat(#cur_file_path, #folder_path); |
148 | cur = list[WALLPAPERS].current; |
136 | cur = list[WALLPAPERS].current; |
149 | chrcat(#cur_file_path, '/'); |
137 | chrcat(#cur_file_path, '/'); |
150 | strcat(#cur_file_path, files_mas[cur]*304 + buf+72); |
138 | strcat(#cur_file_path, io.dir_position(files_mas[cur])); |
151 | RunProgram("/sys/media/kiv", #cur_file_path); |
139 | RunProgram("/sys/media/kiv", #cur_file_path); |
152 | Draw_List(); |
140 | Draw_List(); |
153 | } |
141 | } |
154 | } |
142 | } |
Line 259... | Line 247... | ||
259 | 247 | ||
260 | 248 | ||
261 | void DrawTabs() |
249 | void DrawTabs() |
262 | { |
- | |
263 | DrawBar(0,0, Form.cwidth, PANEL_H-1, sc.work); |
250 | { |
264 | 251 | DrawBar(0,0, Form.cwidth, PANEL_H-1, sc.work); |
|
265 | DrawTab(10,7, 2, list[WALLPAPERS].active, T_WALLPAPERS); |
- | |
266 | DrawTab(strlen(T_WALLPAPERS)*6+BT_PADDING+21,7, 3, list[SKINS].active, T_SKINS); |
252 | DrawTab(10,7, 2, list[WALLPAPERS].active, T_WALLPAPERS); |
267 | 253 | DrawTab(strlen(T_WALLPAPERS)*6+BT_PADDING+21,7, 3, list[SKINS].active, T_SKINS); |
|
268 | DrawBar(0,PANEL_H-2, Form.cwidth, 1, sc.work_graph); |
254 | DrawBar(0,PANEL_H-2, Form.cwidth, 1, sc.work_graph); |
Line 269... | Line 255... | ||
269 | DrawBar(0,PANEL_H-1, Form.cwidth, 1, 0xEEEeee); |
255 | DrawBar(0,PANEL_H-1, Form.cwidth, 1, 0xEEEeee); |