Rev 4544 | Rev 5499 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4544 | Rev 4885 | ||
---|---|---|---|
Line 26... | Line 26... | ||
26 | 26 | ||
Line 27... | Line 27... | ||
27 | unsigned char icons[]= FROM "icons.raw"; |
27 | unsigned char icons[]= FROM "icons.raw"; |
28 | 28 | ||
29 | 29 | ||
Line 30... | Line 30... | ||
30 | #define PANEL_H 30 |
30 | #define PANEL_H 30 |
31 | #define SKINS_STANDART_PATH "/kolibrios/res/skins/" |
31 | #define SKINS_STANDART_PATH "/kolibrios/res/skins" |
32 | #define WALP_STANDART_PATH "/kolibrios/res/wallpapers/" |
32 | #define WALP_STANDART_PATH "/kolibrios/res/wallpapers" |
Line 63... | Line 63... | ||
63 | 63 | ||
64 | for (j=0; j |
64 | for (j=0; j |
65 | { |
65 | { |
66 | strcpy(#temp_filename, j*304 + buf+72); |
66 | strcpy(#temp_filename, j*304 + buf+72); |
67 | strlwr(#temp_filename); |
67 | strlwr(#temp_filename); |
68 | if (active==SKINS) if (strcmp(#temp_filename+strlen(#temp_filename)-4,".skn")!=0) continue; |
68 | if (active==SKINS) if (strcmpi(#temp_filename+strlen(#temp_filename)-4,".skn")!=0) continue; |
69 | if (active==WALLPAPERS) if (strcmp(#temp_filename+strlen(#temp_filename)-4,".txt")==0) continue; |
69 | if (active==WALLPAPERS) if (strcmpi(#temp_filename+strlen(#temp_filename)-4,".txt")==0) continue; |
70 | cur = list[active].count; |
70 | cur = list[active].count; |
71 | files_mas[cur]=j; |
71 | files_mas[cur]=j; |
72 | if (!strcmp("default.skn",#temp_filename)) files_mas[0]> |
72 | if (!strcmpi("default.skn",#temp_filename)) files_mas[0]> |
73 | list[active].count++; |
73 | list[active].count++; |
74 | } |
74 | } |
75 | Sort_by_Name(0, list[active].count-1); |
75 | Sort_by_Name(0, list[active].count-1); |
Line 116... | Line 116... | ||
116 | { |
116 | { |
117 | if (list[SKINS].active) |
117 | if (list[SKINS].active) |
118 | { |
118 | { |
119 | strcpy(#folder_path, SKINS_STANDART_PATH); |
119 | strcpy(#folder_path, SKINS_STANDART_PATH); |
120 | Open_Dir(); |
120 | Open_Dir(); |
121 | if (!list[active].count) notify("No skins were found"); |
121 | if (!list[active].count) notify("'No skins were found' -E"); |
122 | } |
122 | } |
123 | if (list[WALLPAPERS].active) |
123 | if (list[WALLPAPERS].active) |
124 | { |
124 | { |
125 | strcpy(#folder_path, WALP_STANDART_PATH); |
125 | strcpy(#folder_path, WALP_STANDART_PATH); |
126 | Open_Dir(); |
126 | Open_Dir(); |
127 | if (!list[active].count) notify("No wallpapers were found"); |
127 | if (!list[active].count) notify("'No wallpapers were found' -E"); |
128 | } |
128 | } |
129 | } |
129 | } |
Line 130... | Line 130... | ||
130 | 130 | ||
131 | void Apply() |
131 | void Apply() |
132 | { |
132 | { |
133 | if (list[SKINS].active) |
133 | if (list[SKINS].active) |
134 | { |
134 | { |
135 | strcpy(#cur_file_path, #folder_path); |
135 | strcpy(#cur_file_path, #folder_path); |
- | 136 | cur = list[SKINS].current; |
|
136 | cur = list[SKINS].current; |
137 | chrcat(#cur_file_path, '/'); |
137 | strcat(#cur_file_path, files_mas[cur]*304 + buf+72); |
138 | strcat(#cur_file_path, files_mas[cur]*304 + buf+72); |
138 | SetSystemSkin(#cur_file_path); |
139 | SetSystemSkin(#cur_file_path); |
139 | //Draw_List(); |
140 | //Draw_List(); |
140 | } |
141 | } |
141 | if (list[WALLPAPERS].active) |
142 | if (list[WALLPAPERS].active) |
142 | { |
143 | { |
143 | strcpy(#cur_file_path, "\\S__"); |
144 | strcpy(#cur_file_path, "\\S__"); |
144 | strcat(#cur_file_path, #folder_path); |
145 | strcat(#cur_file_path, #folder_path); |
- | 146 | cur = list[WALLPAPERS].current; |
|
145 | cur = list[WALLPAPERS].current; |
147 | chrcat(#cur_file_path, '/'); |
146 | strcat(#cur_file_path, files_mas[cur]*304 + buf+72); |
148 | strcat(#cur_file_path, files_mas[cur]*304 + buf+72); |
147 | RunProgram("/sys/media/kiv", #cur_file_path); |
149 | RunProgram("/sys/media/kiv", #cur_file_path); |
148 | Draw_List(); |
150 | Draw_List(); |
149 | } |
151 | } |
Line 161... | Line 163... | ||
161 | int id, key, mouse_clicked; |
163 | int id, key, mouse_clicked; |
162 | mouse mm; |
164 | mouse mm; |
Line 163... | Line 165... | ||
163 | 165 | ||
164 | mem_Init(); |
166 | mem_Init(); |
165 | SetEventMask(0x27); |
167 | SetEventMask(0x27); |
166 | if (load_dll2(boxlib, #box_lib_init,0)!=0) {notify("Fatal Error: library doesn't exists /rd/1/lib/box_lib.obj"); ExitProcess();} |
168 | if (load_dll2(boxlib, #box_lib_init,0)!=0) notify("'Fatal Error: library doesn't exists /rd/1/lib/box_lib.obj' -E"); |
167 | list[SKINS].current = list[WALLPAPERS].current = -1; |
169 | list[SKINS].current = list[WALLPAPERS].current = -1; |
168 | list[SKINS].first = list[WALLPAPERS].first = 0; |
170 | list[SKINS].first = list[WALLPAPERS].first = 0; |
169 | TabClick(WALLPAPERS); |
171 | TabClick(WALLPAPERS); |
170 | list[WALLPAPERS].SetSizes(0, 230, 350, 400-PANEL_H, 40, 18); |
172 | list[WALLPAPERS].SetSizes(0, 230, 350, 400-PANEL_H, 40, 18); |