/programs/cmm/Calypte/Calypte.c |
---|
49,7 → 49,7 |
?define MENU3 "Reopen" |
char menu_file_list[] = |
"Open |
"Open|Ctrl+O |
Close |
Properties |
Exit"; |
196,10 → 196,7 |
break; |
case evReDraw: |
if (menu.cur_y) |
{ |
EventMenuClick(); |
} |
if (CheckActiveProcess(Form.ID)) EventMenuClick(); |
draw_window(); |
break; |
} |
268,7 → 265,7 |
} |
if (encoding!=CH_CP866) |
{ |
ChangeCharset(charsets[encoding], "CP866", bufpointer); |
ChangeCharset(encoding, "CP866", bufpointer); |
} |
} |
393,10 → 390,11 |
// EVENTS // |
// // |
//===================================================// |
dword menu_id; |
void EventMenuClick() |
{ |
switch(menu.cur_y) |
dword click_id = get_menu_click(); |
if (click_id) switch(click_id + menu_id - 1) |
{ |
//File |
case FILE_SUBMENU_ID_OPEN: |
413,7 → 411,7 |
break; |
//Encoding |
case MENU_ID_ENCODING...MENU_ID_ENCODING+9: |
EventChangeEncoding(menu.cur_y-MENU_ID_ENCODING); |
EventChangeEncoding(click_id-1); |
break; |
//Reopen |
case FILE_SUBMENU_ID_TINYPAD: |
440,8 → 438,9 |
void EventShowMenu(dword _menu_item_x, _menu_list, _id, _selected) |
{ |
menu.selected = _selected; |
menu.show(Form.left+5 + _menu_item_x, Form.top+skin_height + TOPPANELH, 140, _menu_list, _id); |
open_lmenu(Form.left+5 + _menu_item_x, Form.top+skin_height + TOPPANELH, |
MENU_ALIGN_TOP_LEFT, _selected, _menu_list); |
menu_id = _id; |
} |
void EventOpenFile() |
/programs/cmm/TWB/TWB.c |
---|
137,7 → 137,7 |
memmov(o_bufpointer, bufpointer, bufsize); |
if (custom_encoding != -1) { |
cur_encoding = custom_encoding; |
bufpointer = ChangeCharset(cur_encoding*10+#charsets, "CP866", bufpointer); |
bufpointer = ChangeCharset(cur_encoding, "CP866", bufpointer); |
} |
} |
//============================================================================================ |
547,9 → 547,9 |
{ |
if (cur_encoding == _new_encoding) return; |
cur_encoding = _new_encoding; |
bufpointer = ChangeCharset(cur_encoding*10+#charsets, "CP866", bufpointer); |
bufpointer = ChangeCharset(cur_encoding, "CP866", bufpointer); |
if (header) { |
ChangeCharset(cur_encoding*10+#charsets, "CP866", #header); |
ChangeCharset(cur_encoding, "CP866", #header); |
DrawTitle(#header); |
} |
} |
/programs/cmm/aelia/prepare_page.h |
---|
333,7 → 333,7 |
_dom dom; |
strcpy(#title, history.current()+strrchr(history.current(),'/')); |
ChangeCharset(charsets[encoding], "CP866", io.buffer_data); |
ChangeCharset(encoding, "CP866", io.buffer_data); |
link.clear(); |
kfont.size.height = 0; |
/programs/cmm/browser/texts.h |
---|
6,13 → 6,13 |
char help[] = FROM "html\\help_ru.htm""\0"; |
char accept_language[]= "Accept-Language: ru\n"; |
char rmb_menu[] = |
"®á¬®âà¥âì ¨á室¨ª|CTRL+U |
"®á¬®âà¥âì ¨á室¨ª|Ctrl+U |
¥¤ ªâ¨à®¢ âì ¨á室¨ª"; |
char main_menu[] = |
"âªàëâì ä ©«|CTRL+O |
®¢®¥ ®ª®|CTRL+N |
áâ®à¨ï|CTRL+H |
¥¥¤¦¥à § £à㧮ª|CTRL+J |
"âªàëâì ä ©«|Ctrl+O |
®¢®¥ ®ª®|Ctrl+N |
áâ®à¨ï|Ctrl+H |
¥¥¤¦¥à § £à㧮ª|Ctrl+J |
ç¨áâ¨âì ªíè |
¡®¢¨âì ¡à 㧥à"; |
char link_menu[] = |
32,13 → 32,13 |
char help[] = FROM "html\\help_en.htm""\0"; |
char accept_language[]= "Accept-Language: en\n"; |
char rmb_menu[] = |
"View source|CTRL+U |
"View source|Ctrl+U |
Edit source"; |
char main_menu[] = |
"Open local file|CTRL+O |
New window|CTRL+N |
History|CTRL+H |
Download Manager|CTRL+J |
"Open local file|Ctrl+O |
New window|Ctrl+N |
History|Ctrl+H |
Download Manager|Ctrl+J |
Clear cache |
Update browser"; |
char link_menu[] = |
/programs/cmm/eolite/include/menu.h |
---|
111,7 → 111,7 |
text = #file_actions; |
active_menu = MENU_FILE; |
} |
open_lmenu(mouse.x+Form.left+5, mouse.y+Form.top+3+skin_height, 1, 0, text); |
open_lmenu(mouse.x+Form.left+5, mouse.y+Form.top+3+skin_height, MENU_ALIGN_TOP_LEFT, NULL, text); |
} |
bool GetMenuClick() |
122,7 → 122,5 |
return false; |
} |
return true; |
} |
/programs/cmm/iconedit/iconedit.c |
---|
277,7 → 277,7 |
case evReDraw: |
Window_CanvasReSize.thread_exists(); |
EventCheckMenuItemSelected(); |
if (CheckActiveProcess(Form.ID)) EventCheckMenuItemSelected(); |
DrawWindow(); |
break; |
} |
726,20 → 726,19 |
void EventShowImageMenu() |
{ |
menu.selected = 0; |
menu.show(Form.left+5 + image_menu_btn.x, |
Form.top+skin_height + image_menu_btn.y + image_menu_btn.h, |
240, |
#image_menu_items, |
20); |
open_lmenu(Form.left+5 + image_menu_btn.x, Form.top+skin_height + |
image_menu_btn.y + image_menu_btn.h, MENU_ALIGN_TOP_LEFT, NULL, #image_menu_items); |
} |
void EventCheckMenuItemSelected() |
{ |
if (menu.cur_y) { |
if (20 == menu.cur_y) EventCountColorsUsed(); |
if (21 == menu.cur_y) EventReplaceImageColors(color1, color2); |
menu.cur_y = 0; |
switch(get_menu_click()) { |
case 1: |
EventCountColorsUsed(); |
break; |
case 2: |
EventReplaceImageColors(color1, color2); |
break; |
} |
} |
/programs/cmm/lib/gui/menu.h |
---|
105,7 → 105,9 |
return NULL; |
} else { |
menu_process_id = NULL; |
return ESDWORD[shared_mem]; |
EAX = ESDWORD[shared_mem]; |
ESDWORD[shared_mem] = 0; |
return EAX; |
} |
} |
/programs/cmm/lib/obj/iconv.h |
---|
23,6 → 23,8 |
{ |
dword cd, in_len, out_len, new_buf; |
from_chs = from_chs*10+#charsets; |
debug("iconv: from_chs = "); debugln(from_chs); |
debug("iconv: to_chs = "); debugln(to_chs); |
/programs/cmm/txtread/txtread.c |
---|
97,6 → 97,8 |
dword bg_color; |
dword text_color; |
dword menu_id; |
//===================================================// |
// // |
// INTERNAL INCLUDES // |
148,7 → 150,7 |
HandleButtonEvent(); |
break; |
case evReDraw: |
EventMenuClick(); |
if (CheckActiveProcess(Form.ID)) EventMenuClick(); |
draw_window(); |
} |
} |
295,22 → 297,23 |
void EventShowEncodingList() |
{ |
menu.selected = encoding + 1; |
menu.show(Form.left+5 + charsets_mx, Form.top+29+skin_height, 130, |
"UTF-8\nKOI8-RU\nCP1251\nCP1252\nISO8859-5\nCP866", 10); |
open_lmenu(Form.left+5 + charsets_mx, Form.top+29+skin_height, MENU_ALIGN_TOP_LEFT, encoding+1, |
"UTF-8\nKOI8-RU\nCP1251\nCP1252\nISO8859-5\nCP866"); |
menu_id = 10; |
} |
void EventShowReopenMenu() |
{ |
menu.selected = 0; |
menu.show(Form.left+5 + reopenin_mx, Form.top+29+skin_height, 130, |
"Tinypad\nTextEdit\nWebView\nFB2Read\nHexView\nOther", 20); |
open_lmenu(Form.left+5 + reopenin_mx, Form.top+29+skin_height, MENU_ALIGN_TOP_LEFT, 0, |
"Tinypad\nTextEdit\nWebView\nFB2Read\nHexView\nOther"); |
menu_id = 20; |
} |
void EventShowColorSchemesList() |
{ |
menu.selected = curcol_scheme + 1; |
menu.show(Form.left+5 + colscheme_mx, Form.top+29+skin_height, 175, #color_scheme_names, 30); |
open_lmenu(Form.left+5 + colscheme_mx, Form.top+29+skin_height, MENU_ALIGN_TOP_LEFT, |
curcol_scheme+1, #color_scheme_names); |
menu_id = 30; |
} |
void EventSetColorScheme(dword _setn) |
343,11 → 346,12 |
void EventMenuClick() |
{ |
byte open_param[4096]; |
switch(menu.cur_y) |
dword click_id = get_menu_click(); |
if (click_id) switch(click_id + menu_id - 1) |
{ |
//Encoding |
case 10...15: |
EventChangeEncoding(menu.cur_y-10); |
EventChangeEncoding(click_id-1); |
break; |
//Reopen |
case 20: |
372,11 → 376,10 |
break; |
//ColorSchemes |
case 30...38: |
EventSetColorScheme(menu.cur_y-30); |
EventSetColorScheme(click_id-1); |
PreparePage(); |
break; |
} |
menu.cur_y = 0; |
} |
//===================================================// |
399,7 → 402,7 |
io.buffer_data = INTRO_TEXT; |
strcpy(#title, "Text Reader"); |
} |
if (encoding!=CH_CP866) ChangeCharset(charsets[encoding], "CP866", io.buffer_data); |
if (encoding!=CH_CP866) ChangeCharset(encoding, "CP866", io.buffer_data); |
list.KeyHome(); |
list.ClearList(); |
} |