Rev 5719 | Rev 5745 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5416 | punk_joker | 1 | |
2 | ?define EDIT_FILE_ASSOCIATIONS "Редактировать ассоциации файлов" |
||
5435 | leency | 3 | ?define TITLE_SETT "Настройки" |
5416 | punk_joker | 4 | ?define SHOW_DEVICE_CLASS "Выводить названия класса устройств" |
5526 | leency | 5 | ?define SHOW_REAL_NAMES "Показывать имена файлов не меняя регистр" |
6 | ?define FONT_SIZE_LABEL "Размер шрифта" |
||
5743 | leency | 7 | ?define USE_TWO_PANELS "Две панели" |
5719 | leency | 8 | ?define LIST_LINE_HEIGHT "Высота строки в списке" |
5526 | leency | 9 | ?define NOTIFY_COPY_END "Уведомлять о завершении копирования" |
10 | ?define T_DOUBLE_CLICK "Время двойного клика (в сотых)" |
||
5581 | leency | 11 | #else |
5416 | punk_joker | 12 | ?define EDIT_FILE_ASSOCIATIONS "Edit file associations" |
5435 | leency | 13 | ?define TITLE_SETT "Settings" |
5428 | leency | 14 | ?define SHOW_DEVICE_CLASS "Show device class name" |
5526 | leency | 15 | ?define SHOW_REAL_NAMES "Show real file names without changing case" |
16 | ?define FONT_SIZE_LABEL "Font size" |
||
5743 | leency | 17 | ?define USE_TWO_PANELS "Two panels" |
5719 | leency | 18 | ?define LIST_LINE_HEIGHT "List line height" |
5526 | leency | 19 | ?define NOTIFY_COPY_END "Notify when copying finished" |
20 | ?define T_DOUBLE_CLICK "Double click time (in hundredths)" |
||
5581 | leency | 21 | #endif |
5416 | punk_joker | 22 | |
23 | |||
5526 | leency | 24 | |
5416 | punk_joker | 25 | |
5526 | leency | 26 | |
5416 | punk_joker | 27 | { |
28 | byte id; |
||
29 | |||
5459 | punk_joker | 30 | |
5576 | pavelyakov | 31 | switch(WaitEvent()) |
5591 | pavelyakov | 32 | { |
33 | case evButton: |
||
34 | id=GetButtonID(); |
||
5416 | punk_joker | 35 | if (id==1) ExitSettings(); |
5743 | leency | 36 | else if (id==5) |
5591 | pavelyakov | 37 | { |
5435 | leency | 38 | RunProgram("tinypad", "/sys/settings/assoc.ini"); |
39 | break; |
||
5463 | leency | 40 | } |
5435 | leency | 41 | else if (id==20) show_dev_name ^= 1; |
5591 | pavelyakov | 42 | else if (id==21) { action_buf=109; real_files_names_case ^= 1; } |
5743 | leency | 43 | else if (id==22) info_after_copy ^= 1; |
5591 | pavelyakov | 44 | else if (id==24) two_panels ^= 1; |
5719 | leency | 45 | else if (id==25) files.line_h++; |
5591 | pavelyakov | 46 | else if (id==26) && (files.line_h>18) files.line_h--; |
5743 | leency | 47 | else if (id==27) MOUSE_TIME++; |
5591 | pavelyakov | 48 | else if (id==28) && (MOUSE_TIME>29) MOUSE_TIME--; |
49 | else if (id==30) && (font_size<30) { font_size++; BigFontsChange(); } |
||
5743 | leency | 50 | else if (id==31) && (font_size>10) { font_size--; BigFontsChange(); } |
51 | SaveIniSettings(); |
||
52 | EventRedrawWindow(Form.left,Form.top); |
||
5606 | pavelyakov | 53 | DrawSettingsCheckBoxes(); |
5463 | leency | 54 | break; |
5591 | pavelyakov | 55 | |
56 | |||
57 | GetKeys(); |
||
5707 | leency | 58 | if (key_scancode==SCAN_CODE_ESC) ExitSettings(); |
5743 | leency | 59 | break; |
5416 | punk_joker | 60 | |
5591 | pavelyakov | 61 | |
62 | DefineAndDrawWindow(Form.left + Form.width/2-10, Form.top + Form.height/2 - 75, 300, 226+GetSkinHeight(),0x34,system.color.work,TITLE_SETT); |
||
5743 | leency | 63 | DrawSettingsCheckBoxes(); |
5463 | leency | 64 | DrawFlatButton(9, 186, strlen(EDIT_FILE_ASSOCIATIONS)+4*6, 22, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS); |
5719 | leency | 65 | } |
5591 | pavelyakov | 66 | } |
5416 | punk_joker | 67 | } |
5428 | leency | 68 | |
69 | |||
5743 | leency | 70 | { |
71 | settings_window = 0; |
||
72 | cmd_free = 4; |
||
73 | SaveIniSettings(); |
||
74 | ExitProcess(); |
||
75 | } |
||
76 | |||
77 | |||
5463 | leency | 78 | { |
79 | CheckBox2(10, 11, 20, SHOW_DEVICE_CLASS, show_dev_name); |
||
5526 | leency | 80 | CheckBox2(10, 33, 21, SHOW_REAL_NAMES, real_files_names_case); |
81 | CheckBox2(10, 55, 22, NOTIFY_COPY_END, info_after_copy); |
||
82 | CheckBox2(10, 77, 24, USE_TWO_PANELS, two_panels); |
||
5743 | leency | 83 | MoreLessBox(10, 103, 18, 30, 31, #system.color, font_size, FONT_SIZE_LABEL); |
84 | MoreLessBox(10, 130, 18, 25, 26, #system.color, files.line_h, LIST_LINE_HEIGHT); |
||
85 | MoreLessBox(10, 157, 18, 27, 28, #system.color, MOUSE_TIME, T_DOUBLE_CLICK); |
||
86 | } |
||
5463 | leency | 87 | |
5428 | leency | 88 | |
5463 | leency | 89 | |
5441 | leency | 90 | { |
5428 | leency | 91 | ini_get_color stdcall (eolite_ini_path, #confir_section, "SelectionColor", 0x94AECE); col_selec = EAX; |
5698 | leency | 92 | ini_get_int stdcall (eolite_ini_path, #confir_section, "ShowDeviceName", 1); show_dev_name = EAX; |
5532 | leency | 93 | ini_get_int stdcall (eolite_ini_path, #confir_section, "RealFileNamesCase", 0); real_files_names_case = EAX; |
94 | ini_get_int stdcall (eolite_ini_path, #confir_section, "InfoAfterCopy", 0); info_after_copy = EAX; |
||
95 | ini_get_int stdcall (eolite_ini_path, #confir_section, "FontSize", 9); font_size = EAX; |
||
5743 | leency | 96 | ini_get_int stdcall (eolite_ini_path, #confir_section, "TwoPanels", 0); two_panels = EAX; |
5719 | leency | 97 | ini_get_int stdcall (eolite_ini_path, #confir_section, "LineHeight", 18); files.line_h = EAX; |
5532 | leency | 98 | ini_get_int stdcall (eolite_ini_path, #confir_section, "TimeDoubleClick", 50); MOUSE_TIME = EAX; |
5575 | pavelyakov | 99 | BigFontsChange(); |
5687 | leency | 100 | } |
5428 | leency | 101 | |
102 | |||
5687 | leency | 103 | |
5441 | leency | 104 | { |
105 | ini_set_int stdcall (eolite_ini_path, #confir_section, "ShowDeviceName", show_dev_name); |
||
5526 | leency | 106 | ini_set_int stdcall (eolite_ini_path, #confir_section, "RealFileNamesCase", real_files_names_case); |
107 | ini_set_int stdcall (eolite_ini_path, #confir_section, "InfoAfterCopy", info_after_copy); |
||
108 | ini_set_int stdcall (eolite_ini_path, #confir_section, "FontSize", font_size); |
||
5743 | leency | 109 | ini_set_int stdcall (eolite_ini_path, #confir_section, "TwoPanels", two_panels); |
5719 | leency | 110 | ini_set_int stdcall (eolite_ini_path, #confir_section, "LineHeight", files.line_h); |
5526 | leency | 111 | ini_set_int stdcall (eolite_ini_path, #confir_section, "TimeDoubleClick", MOUSE_TIME); |
5576 | pavelyakov | 112 | } |
5441 | leency | 113 | |
5428 | leency | 114 | |
5441 | leency | 115 | |
116 | |||
5428 | leency | 117 | { |
118 | char error_message[500]; |
||
119 | dword ii; |
||
120 | if (files.current>=0) Line_ReDraw(0xFF0000, files.current); |
||
121 | pause(5); |
||
122 | sprintf(#error_message,"\"%s\n%s\" -%s","Eolite",get_error(error_number),"tE"); |
||
5576 | pavelyakov | 123 | notify(#error_message); |
5620 | leency | 124 | } |
5428 | leency | 125 | |
126 | |||
127 | |||
128 | { |
||
129 | system.color.work = 0xE4DFE1; |
||
5674 | pavelyakov | 130 | system.color.work_text = 0; |
131 | system.color.work_graph = 0x9098B0; //A0A0B8; //0x819FC5; |
||
132 | system.color.work_button = 0xD2D3D3; |
||
133 | system.color.work_button_text = 0x000000; |
||
134 | col_padding = 0xC8C9C9; |
||
5428 | leency | 135 | //col_selec = 0x94AECE; |
136 | col_lpanel = 0x00699C; |
||
137 | } |
||
5463 | leency | 138 | |
139 | |||
140 | |||
5687 | leency | 141 | { |
142 | files.line_h = font.height + 4; |
||
5743 | leency | 143 | if (files.line_h<18) files.line_h = 18; |
144 | |||
145 | |||
146 | { |
||
5687 | leency | 147 | files.SetFont(8, 14, 10110000b); |
5710 | leency | 148 | FileShow.font_size_x = files.font_w; |
149 | FileShow.font_number = 3; |
||
5687 | leency | 150 | } |
151 | else |
||
152 | { |
||
153 | files.SetFont(6, 6, 10000000b); |
||
5710 | leency | 154 | FileShow.font_size_x = files.font_w; |
155 | FileShow.font_number = 0; |
||
5687 | leency | 156 | } |
157 | } |
||
158 | |||
159 | |||
160 | |||
5463 | leency | 161 | CheckBox(x, y, 14, 14, id, text, system.color.work_graph, system.color.work_text, value); |
5674 | pavelyakov | 162 | }18)>30)> |
5416 | punk_joker | 163 |