Rev 7243 | Rev 7245 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7243 | Rev 7244 | ||
---|---|---|---|
Line 38... | Line 38... | ||
38 | #path_start,#set_mouse_dd, 100000000000010b,0,0}; |
38 | #path_start,#set_mouse_dd, 100000000000010b,0,0}; |
39 | 39 | ||
Line 40... | Line 40... | ||
40 | more_less_box font_size = { NULL, 9, 22, FONT_SIZE_LABEL }; |
40 | more_less_box font_size = { NULL, 9, 22, FONT_SIZE_LABEL }; |
41 | more_less_box line_height = { NULL, 16, 64, LIST_LINE_HEIGHT }; |
41 | more_less_box line_height = { NULL, 16, 64, LIST_LINE_HEIGHT }; |
- | 42 | checkbox show_dev_name = { SHOW_DEVICE_CLASS }; |
|
- | 43 | checkbox show_real_names = { SHOW_REAL_NAMES }; |
|
- | 44 | checkbox show_status_bar = { SHOW_STATUS_BAR }; |
|
- | 45 | checkbox info_after_copy = { NOTIFY_COPY_END }; |
|
- | 46 | checkbox show_breadcrumb = { SHOW_BREADCRUMBS }; |
|
- | 47 | checkbox big_icons = { BIG_ICONS }; |
|
- | 48 | checkbox two_panels = { USE_TWO_PANELS }; |
|
Line 42... | Line 49... | ||
42 | 49 | ||
43 | 50 | ||
44 | void settings_dialog() |
51 | void settings_dialog() |
45 | { |
52 | { |
46 | byte id; |
53 | int id; |
47 | active_settings=1; |
54 | active_settings=1; |
48 | font_size.value = kfont.size.pt; |
55 | font_size.value = kfont.size.pt; |
49 | line_height.value = files.item_h; |
56 | line_height.value = files.item_h; |
Line 56... | Line 63... | ||
56 | break; |
63 | break; |
57 | 64 | ||
Line 58... | Line 65... | ||
58 | case evButton: |
65 | case evButton: |
59 | id=GetButtonID(); |
66 | id=GetButtonID(); |
60 | if (id==1) { ExitSettings(); break; } |
67 | if (1==id) { ExitSettings(); break; } |
61 | else if (id==5) |
68 | else if (id==5) |
62 | { |
69 | { |
63 | RunProgram("tinypad", "/sys/settings/assoc.ini"); |
70 | RunProgram("tinypad", "/sys/settings/assoc.ini"); |
64 | break; |
71 | break; |
65 | } |
72 | } |
Line 76... | Line 83... | ||
76 | { |
83 | { |
77 | ini.SetString("DefaultPath", #path_start,strlen(#path_start)); |
84 | ini.SetString("DefaultPath", #path_start,strlen(#path_start)); |
78 | break; |
85 | break; |
79 | } |
86 | } |
80 | else if (id==20) show_dev_name ^= 1; |
87 | show_dev_name.click(id); |
81 | else if (id==21) { action_buf=109; real_files_names_case ^= 1; } |
88 | if (show_real_names.click(id)) action_buf=109; |
82 | else if (id==22) info_after_copy ^= 1; |
89 | info_after_copy.click(id); |
83 | else if (id==24) two_panels ^= true; |
90 | two_panels.click(id); |
84 | else if (id==32) show_breadcrumb ^= true; |
91 | show_breadcrumb.click(id); |
85 | else if (id==27) show_status_bar ^= 1; |
92 | show_status_bar.click(id); |
86 | else if (font_size.click(id)) { |
93 | if (font_size.click(id)) { |
87 | kfont.size.pt = font_size.value; |
94 | kfont.size.pt = font_size.value; |
88 | kfont.changeSIZE(); |
95 | kfont.changeSIZE(); |
89 | BigFontsChange(); |
96 | BigFontsChange(); |
90 | } |
97 | } |
91 | else if (line_height.click(id)) { |
98 | if (line_height.click(id)) files.item_h = line_height.value; |
92 | files.item_h = line_height.value; |
- | |
93 | } |
99 | if (big_icons.click(id)) BigIconsSwitch(); |
94 | else if (id==33) { |
- | |
95 | big_icons ^= 1; |
- | |
96 | if (big_icons) { |
- | |
97 | icon_size=32; |
- | |
98 | files.item_h = line_height.value = 34; |
- | |
99 | if (!icons32_default.image) |
- | |
100 | { |
- | |
101 | Libimg_LoadImage(#icons32_default, "/sys/icons32.png"); |
- | |
102 | Libimg_LoadImage(#icons32_selected, "/sys/icons32.png"); |
- | |
103 | Libimg_ReplaceColor(icons32_default.image, icons32_selected.w, |
100 | EventRedrawWindow(Form.left,Form.top); |
104 | icons32_selected.h, 0x00000000, 0xffFFFfff); |
- | |
105 | Libimg_ReplaceColor(icons32_selected.image, icons32_selected.w, |
- | |
106 | icons32_selected.h, 0x00000000, col_selec); |
- | |
107 | } |
- | |
108 | } |
- | |
109 | else { |
- | |
110 | icon_size=16; |
- | |
111 | files.item_h = line_height.value = 18; |
- | |
112 | } |
- | |
113 | } |
- | |
114 | EventRedrawWindow(Form.left,Form.top); |
- | |
115 | break; |
101 | break; |
116 | 102 | ||
Line 117... | Line 103... | ||
117 | case evKey: |
103 | case evKey: |
118 | GetKeys(); |
104 | GetKeys(); |
Line 141... | Line 127... | ||
141 | { |
127 | { |
142 | incn y; |
128 | incn y; |
143 | int x=11, frx=26, but_x; |
129 | int x=11, frx=26, but_x; |
144 | y.n = 0; |
130 | y.n = 0; |
145 | CheckBox(x, y.inc(14), 20, SHOW_DEVICE_CLASS, show_dev_name); |
131 | show_dev_name.draw(x, y.inc(14)); |
146 | CheckBox(x, y.inc(25), 21, SHOW_REAL_NAMES, real_files_names_case); |
132 | show_real_names.draw(x, y.inc(25)); |
147 | CheckBox(x, y.inc(25), 27, SHOW_STATUS_BAR, show_status_bar); |
133 | show_status_bar.draw(x, y.inc(25)); |
148 | CheckBox(x, y.inc(25), 22, NOTIFY_COPY_END, info_after_copy); |
134 | info_after_copy.draw(x, y.inc(25)); |
149 | CheckBox(x, y.inc(25), 32, SHOW_BREADCRUMBS, show_breadcrumb); |
135 | show_breadcrumb.draw(x, y.inc(25)); |
150 | CheckBox(x, y.inc(25), 33, BIG_ICONS, big_icons); |
136 | big_icons.draw(x, y.inc(25)); |
151 | CheckBox(x, y.inc(25), 24, USE_TWO_PANELS, two_panels); |
137 | two_panels.draw(x, y.inc(25)); |
152 | font_size.draw(x, y.inc(31)); |
138 | font_size.draw(x, y.inc(31)); |
153 | line_height.draw(x, y.inc(31)); |
139 | line_height.draw(x, y.inc(31)); |
154 | 140 | ||
Line 155... | Line 141... | ||
155 | DrawFrame(x, y.inc(37), 340, 95, START_PATH); |
141 | DrawFrame(x, y.inc(37), 340, 95, START_PATH); |
156 | // START_PATH { |
142 | // START_PATH { |
Line 170... | Line 156... | ||
170 | ini.path = GetIni(#eolite_ini_path, "EOLITE.INI"); |
156 | ini.path = GetIni(#eolite_ini_path, "EOLITE.INI"); |
171 | ini.section = "Config"; |
157 | ini.section = "Config"; |
172 | 158 | ||
Line 173... | Line 159... | ||
173 | files.SetFont(6, 9, 10000000b); |
159 | files.SetFont(6, 9, 10000000b); |
174 | real_files_names_case = ini.GetInt("RealFileNamesCase", 1); |
160 | show_real_names.checked = ini.GetInt("RealFileNamesCase", true); |
175 | show_dev_name = ini.GetInt("ShowDeviceName", 1); |
161 | show_dev_name.checked = ini.GetInt("ShowDeviceName", true); |
176 | show_status_bar = ini.GetInt("ShowStatusBar", 1); |
162 | show_status_bar.checked = ini.GetInt("ShowStatusBar", true); |
177 | info_after_copy = ini.GetInt("InfoAfterCopy", 0); |
163 | info_after_copy.checked = ini.GetInt("InfoAfterCopy", false); |
- | 164 | two_panels.checked = ini.GetInt("TwoPanels", false); |
|
178 | kfont.size.pt = ini.GetInt("FontSize", 13); |
165 | kfont.size.pt = ini.GetInt("FontSize", 13); |
179 | two_panels = ini.GetInt("TwoPanels", 0); |
- | |
180 | files.item_h = ini.GetInt("LineHeight", 19); |
166 | files.item_h = ini.GetInt("LineHeight", 19); |
181 | WinX = ini.GetInt("WinX", 200); |
167 | WinX = ini.GetInt("WinX", 200); |
182 | WinY = ini.GetInt("WinY", 50); |
168 | WinY = ini.GetInt("WinY", 50); |
183 | WinW = ini.GetInt("WinW", 550); |
169 | WinW = ini.GetInt("WinW", 550); |
184 | WinH = ini.GetInt("WinH", 506); |
170 | WinH = ini.GetInt("WinH", 506); |
Line 195... | Line 181... | ||
195 | 181 | ||
Line 196... | Line 182... | ||
196 | 182 | ||
197 | void SaveIniSettings() |
183 | void SaveIniSettings() |
198 | { |
184 | { |
199 | ini.SetInt("ShowDeviceName", show_dev_name); |
185 | ini.SetInt("ShowDeviceName", show_dev_name.checked); |
200 | ini.SetInt("ShowStatusBar", show_status_bar); |
186 | ini.SetInt("ShowStatusBar", show_status_bar.checked); |
201 | ini.SetInt("RealFileNamesCase", real_files_names_case); |
187 | ini.SetInt("RealFileNamesCase", show_real_names.checked); |
202 | ini.SetInt("InfoAfterCopy", info_after_copy); |
188 | ini.SetInt("InfoAfterCopy", info_after_copy.checked); |
203 | ini.SetInt("FontSize", kfont.size.pt); |
189 | ini.SetInt("FontSize", kfont.size.pt); |
204 | ini.SetInt("TwoPanels", two_panels); |
190 | ini.SetInt("TwoPanels", two_panels.checked); |
205 | ini.SetInt("LineHeight", files.item_h); |
191 | ini.SetInt("LineHeight", files.item_h); |
206 | ini.SetInt("WinX", Form.left); |
192 | ini.SetInt("WinX", Form.left); |
207 | ini.SetInt("WinY", Form.top); |
193 | ini.SetInt("WinY", Form.top); |
208 | ini.SetInt("WinW", Form.width); |
194 | ini.SetInt("WinW", Form.width); |
Line 243... | Line 229... | ||
243 | files.item_h = kfont.size.pt + 4; |
229 | files.item_h = kfont.size.pt + 4; |
244 | if (files.item_h<18) files.item_h = 18; |
230 | if (files.item_h<18) files.item_h = 18; |
245 | files_active.item_h = files_inactive.item_h = files.item_h; |
231 | files_active.item_h = files_inactive.item_h = files.item_h; |
246 | }18)>><> |
232 | } |
247 | 233 | ||
- | 234 | void BigIconsSwitch() |
|
- | 235 | { |
|
- | 236 | if (big_icons.checked) |
|
- | 237 | { |
|
- | 238 | icon_size=32; |
|
- | 239 | files.item_h = line_height.value = 34; |
|
- | 240 | if (!icons32_default.image) |
|
- | 241 | { |
|
- | 242 | Libimg_LoadImage(#icons32_default, "/sys/icons32.png"); |
|
- | 243 | Libimg_LoadImage(#icons32_selected, "/sys/icons32.png"); |
|
- | 244 | Libimg_ReplaceColor(icons32_default.image, icons32_selected.w, |
|
- | 245 | icons32_selected.h, 0x00000000, 0xffFFFfff); |
|
- | 246 | Libimg_ReplaceColor(icons32_selected.image, icons32_selected.w, |
|
- | 247 | icons32_selected.h, 0x00000000, col_selec); |
|
- | 248 | } |
|
- | 249 | } |
|
- | 250 | else { |
|
- | 251 | icon_size=16; |
|
- | 252 | files.item_h = line_height.value = 18; |
|
- | 253 | } |
|
- | 254 | }18)>><> |
|
- | 255 |