Rev 5444 | Rev 5463 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5444 | Rev 5459 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | ?define EDIT_FILE_ASSOCIATIONS "¥¤ ªâ¨à®¢ âì áá®æ¨ 樨 ä ©«®¢" |
6 | ?define EDIT_FILE_ASSOCIATIONS "¥¤ ªâ¨à®¢ âì áá®æ¨ 樨 ä ©«®¢" |
7 | ?define TITLE_SETT " áâனª¨" |
7 | ?define TITLE_SETT " áâனª¨" |
8 | ?define SET_1 "뢮¤¨âì §¢ ¨ï ª« áá ãáâனáâ¢" |
8 | ?define SET_1 "뢮¤¨âì §¢ ¨ï ª« áá ãáâனáâ¢" |
9 | ?define SET_2 "®ª §ë¢ âì ¨¬¥ ä ©«®¢ ¥ ¬¥ïï ॣ¨áâà" |
9 | ?define SET_2 "®ª §ë¢ âì ¨¬¥ ä ©«®¢ ¥ ¬¥ïï ॣ¨áâà" |
10 | ?define SET_3 "ëá®â áâப¨ ¢ ᯨ᪥" |
10 | ?define SET_3 "ëá®â áâப¨ ¢ ᯨ᪥" |
- | 11 | ?define SET_4 "¢¥¤®¬«ïâì ® § ¢¥à襨¨ ª®¯¨à®¢ ¨ï" |
|
11 | ?define CANCEL_T "⬥ " |
12 | ?define CANCEL_T "⬥ " |
12 | ?define APPLY_T "ਬ¥¨âì" |
13 | ?define APPLY_T "ਬ¥¨âì" |
13 | #else |
14 | #else |
14 | ?define EDIT_FILE_ASSOCIATIONS "Edit file associations" |
15 | ?define EDIT_FILE_ASSOCIATIONS "Edit file associations" |
15 | ?define TITLE_SETT "Settings" |
16 | ?define TITLE_SETT "Settings" |
16 | ?define SET_1 "Show device class name" |
17 | ?define SET_1 "Show device class name" |
17 | ?define SET_2 "Show real file names without changing case" |
18 | ?define SET_2 "Show real file names without changing case" |
18 | ?define SET_3 "List line height" |
19 | ?define SET_3 "List line height" |
- | 20 | ?define SET_4 "To notify the completion of the copy" |
|
19 | ?define CANCEL_T "Cancel" |
21 | ?define CANCEL_T "Cancel" |
20 | ?define APPLY_T "Apply" |
22 | ?define APPLY_T "Apply" |
21 | #endif |
23 | #endif |
Line 22... | Line 24... | ||
22 | 24 | ||
23 | int mouse_ddd; |
25 | int mouse_ddd; |
24 | char lineh_s[30]="18\0"; |
26 | char lineh_s[30]="18\0"; |
25 | edit_box LineHeight_ed = {52,10,70,0xffffff,0x94AECE,0xffc90E,0xffffff,2,4,#lineh_s,#mouse_ddd, 1000000000000000b,2,2}; |
27 | edit_box LineHeight_ed = {52,10,90,0xffffff,0x94AECE,0xffc90E,0xffffff,2,4,#lineh_s,#mouse_ddd, 1000000000000000b,2,2}; |
26 | checkbox2 ShowDeviceName_chb = {10*65536+15, 10*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, SET_1, CH_FLAG_MIDDLE, 0}; |
28 | checkbox2 ShowDeviceName_chb = {10*65536+15, 10*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, SET_1, CH_FLAG_MIDDLE, 0}; |
- | 29 | checkbox2 RealFileNamesCase_chb = {10*65536+15, 30*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, SET_2, CH_FLAG_MIDDLE, 0}; |
|
Line 27... | Line 30... | ||
27 | checkbox2 RealFileNamesCase_chb = {10*65536+15, 30*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, SET_2, CH_FLAG_MIDDLE, 0}; |
30 | checkbox2 InfoAfterCopy_chb = {10*65536+15, 50*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, SET_4, CH_FLAG_MIDDLE, 0}; |
28 | 31 | ||
29 | void settings_dialog() |
32 | void settings_dialog() |
30 | { |
33 | { |
31 | byte id; |
34 | byte id; |
Line 32... | Line 35... | ||
32 | unsigned int key; |
35 | unsigned int key; |
33 | proc_info settings_form; |
36 | proc_info settings_form; |
Line 34... | Line 37... | ||
34 | 37 | ||
35 | if (active_about) ExitProcess(); |
38 | if (active_settings) ExitProcess(); |
- | 39 | active_settings=1; |
|
Line 36... | Line 40... | ||
36 | active_about=1; |
40 | |
37 | 41 | ShowDeviceName_chb.size_of_str = strlen(SET_1) * 6; |
|
38 | ShowDeviceName_chb.size_of_str = strlen(SET_1) * 6; |
42 | RealFileNamesCase_chb.size_of_str = strlen(SET_2) * 6; |
39 | RealFileNamesCase_chb.size_of_str = strlen(SET_2) * 6; |
43 | InfoAfterCopy_chb.size_of_str = strlen(SET_4) * 6; |
40 | 44 | ||
41 | SetEventMask(0x27); |
45 | SetEventMask(0x27); |
42 | loop() switch(WaitEvent()) |
46 | loop() switch(WaitEvent()) |
43 | { |
47 | { |
44 | case evButton: |
48 | case evButton: |
45 | id=GetButtonID(); |
49 | id=GetButtonID(); |
46 | if (id==10) |
50 | if (id==10) |
47 | { |
51 | { |
48 | SaveIniSettings(); |
52 | SaveIniSettings(); |
49 | active_about=0; |
53 | active_settings=0; |
50 | action_buf = 300; |
54 | action_buf = 300; |
51 | ExitProcess(); |
55 | ExitProcess(); |
52 | } |
56 | } |
53 | if (id==1) || (id==11) |
57 | if (id==1) || (id==11) |
54 | { |
58 | { |
55 | active_about=0; |
59 | active_settings=0; |
Line 63... | Line 67... | ||
63 | 67 | ||
64 | case evKey: |
68 | case evKey: |
65 | key = GetKey(); |
69 | key = GetKey(); |
66 | if (key==27) |
70 | if (key==27) |
67 | { |
71 | { |
68 | active_about=0; |
72 | active_settings=0; |
69 | action_buf = 300; |
73 | action_buf = 300; |
70 | ExitProcess(); |
74 | ExitProcess(); |
71 | } |
75 | } |
72 | EAX=key<<8; |
76 | EAX=key<<8; |
73 | edit_box_key stdcall(#LineHeight_ed); |
77 | edit_box_key stdcall(#LineHeight_ed); |
Line 74... | Line 78... | ||
74 | break; |
78 | break; |
75 | 79 | ||
76 | case evMouse: |
80 | case evMouse: |
- | 81 | check_box_mouse stdcall (#ShowDeviceName_chb); |
|
77 | check_box_mouse stdcall (#ShowDeviceName_chb); |
82 | check_box_mouse stdcall (#RealFileNamesCase_chb); |
78 | check_box_mouse stdcall (#RealFileNamesCase_chb); |
83 | check_box_mouse stdcall (#InfoAfterCopy_chb); |
Line 79... | Line 84... | ||
79 | edit_box_mouse stdcall (#LineHeight_ed); |
84 | edit_box_mouse stdcall (#LineHeight_ed); |
80 | break; |
85 | break; |
81 | 86 | ||
Line 82... | Line 87... | ||
82 | case evReDraw: |
87 | case evReDraw: |
83 | DefineAndDrawWindow(Form.left + 100, 150, 300, 200+GetSkinHeight(),0x34,sc.work,TITLE_SETT); |
88 | DefineAndDrawWindow(Form.left + 100, 150, 300, 200+GetSkinHeight(),0x34,sc.work,TITLE_SETT); |
- | 89 | GetProcessInfo(#settings_form, SelfInfo); |
|
Line 84... | Line 90... | ||
84 | GetProcessInfo(#settings_form, SelfInfo); |
90 | |
85 | 91 | ShowDeviceName_chb.flags |= 1 << show_dev_name; |
|
Line 86... | Line 92... | ||
86 | ShowDeviceName_chb.flags |= 1 << show_dev_name; |
92 | RealFileNamesCase_chb.flags |= 1 << real_files_names_case; |
87 | RealFileNamesCase_chb.flags |= 1 << real_files_names_case; |
93 | InfoAfterCopy_chb.flags |= 1 << info_after_copy; |
- | 94 | ||
88 | 95 | key = itoa(files.line_h); |
|
89 | key = itoa(files.line_h); |
96 | strcpy(#lineh_s, key); |
90 | strcpy(#lineh_s, key); |
97 | |
91 | 98 | check_box_draw stdcall (#ShowDeviceName_chb); |
|
92 | check_box_draw stdcall (#ShowDeviceName_chb); |
99 | check_box_draw stdcall (#RealFileNamesCase_chb); |
93 | check_box_draw stdcall (#RealFileNamesCase_chb); |
100 | check_box_draw stdcall (#InfoAfterCopy_chb); |
94 | edit_box_draw stdcall (#LineHeight_ed); |
101 | edit_box_draw stdcall (#LineHeight_ed); |
95 | DrawRectangle(LineHeight_ed.left-1, LineHeight_ed.top-1, LineHeight_ed.width+2, 16, sc.work_graph); |
102 | DrawRectangle(LineHeight_ed.left-1, LineHeight_ed.top-1, LineHeight_ed.width+2, 16, sc.work_graph); |
Line 110... | Line 117... | ||
110 | files.line_h = EAX; |
117 | files.line_h = EAX; |
111 | ini_get_int stdcall (eolite_ini_path, "Config", "ShowDeviceName", 1); |
118 | ini_get_int stdcall (eolite_ini_path, "Config", "ShowDeviceName", 1); |
112 | show_dev_name = EAX; |
119 | show_dev_name = EAX; |
113 | ini_get_int stdcall (eolite_ini_path, "Config", "RealFileNamesCase", 0); |
120 | ini_get_int stdcall (eolite_ini_path, "Config", "RealFileNamesCase", 0); |
114 | real_files_names_case = EAX; |
121 | real_files_names_case = EAX; |
- | 122 | ini_get_int stdcall (eolite_ini_path, "Config", "InfoAfterCopy", 0); |
|
- | 123 | info_after_copy = EAX; |
|
115 | } |
124 | } |
Line 116... | Line 125... | ||
116 | 125 | ||
117 | void SaveIniSettings() |
126 | void SaveIniSettings() |
118 | { |
127 | { |
119 | show_dev_name = TestBit(ShowDeviceName_chb.flags, 1); |
128 | show_dev_name = TestBit(ShowDeviceName_chb.flags, 1); |
- | 129 | real_files_names_case = TestBit(RealFileNamesCase_chb.flags, 1); |
|
120 | real_files_names_case = TestBit(RealFileNamesCase_chb.flags, 1); |
130 | info_after_copy = TestBit(InfoAfterCopy_chb.flags, 1); |
121 | ini_set_int stdcall (eolite_ini_path, "Config", "ShowDeviceName", show_dev_name); |
131 | ini_set_int stdcall (eolite_ini_path, "Config", "ShowDeviceName", show_dev_name); |
- | 132 | ini_set_int stdcall (eolite_ini_path, "Config", "RealFileNamesCase", real_files_names_case); |
|
122 | ini_set_int stdcall (eolite_ini_path, "Config", "RealFileNamesCase", real_files_names_case); |
133 | ini_set_int stdcall (eolite_ini_path, "Config", "InfoAfterCopy", info_after_copy); |
123 | ini_set_int stdcall (eolite_ini_path, "Config", "LineHeight", atoi(#lineh_s)); |
134 | ini_set_int stdcall (eolite_ini_path, "Config", "LineHeight", atoi(#lineh_s)); |