diff --git a/programs/cmm/appearance/appearance.c b/programs/cmm/appearance/appearance.c index 8c22f591b8..924ed41014 100644 --- a/programs/cmm/appearance/appearance.c +++ b/programs/cmm/appearance/appearance.c @@ -142,7 +142,7 @@ void main() mem_Init(); if (param) strcpy(#folder_path, #param); - list[SKINS].current = list[WALLPAPERS].current = 0; + list[SKINS].current = list[WALLPAPERS].current = -1; list[SKINS].first = list[WALLPAPERS].first = 0; GetFiles(WALLPAPERS); list[active].SetSizes(0, 230, 350, 400-PANEL_H, 40, 18); @@ -154,20 +154,13 @@ void main() case evMouse: mm.get(); if (mm.vert) && (list[active].MouseScroll(mm.vert)) Draw_List(); - /* if (mouse_clicked) { - if (!mm.lkm) && (list[active].ProcessMouse(mm.x, mm.y)) Apply(); + if (!mm.lkm) && (active==SKINS) && (list[SKINS].ProcessMouse(mm.x, mm.y)) Apply(); + if (!mm.lkm) && (active==WALLPAPERS) && (list[WALLPAPERS].ProcessMouse(mm.x, mm.y)) Apply(); mouse_clicked=0; } - if (mm.lkm) && (list[active].MouseOver(mm.x, mm.y)) mouse_clicked=1; - */ - EAX = active; - if (mm.lkm) - { - if (active==SKINS) && (list[SKINS].ProcessMouse(mm.x, mm.y)) Apply(); - if if (active==WALLPAPERS) && (list[WALLPAPERS].ProcessMouse(mm.x, mm.y)) Apply(); - } + if (mm.lkm) && (list[SKINS].MouseOver(mm.x, mm.y)) mouse_clicked=1; break; case evButton: diff --git a/programs/cmm/browser/HTMLv.c b/programs/cmm/browser/HTMLv.c index 95e8b260c6..760528e2f4 100644 --- a/programs/cmm/browser/HTMLv.c +++ b/programs/cmm/browser/HTMLv.c @@ -66,7 +66,7 @@ int action_buf; void main() { - int btn, key; + int key, btn; int half_scroll_size; int scroll_used=0, show_menu; @@ -98,8 +98,7 @@ void main() //break; };*/ - btn=GetProcessSlot(Form.ID); - if (btn<>GetActiveProcess()) break; + if (!CheckActiveProcess(Form.ID)) break; edit_box_mouse stdcall (#address_box); diff --git a/programs/cmm/browser/include/menu_rmb.h b/programs/cmm/browser/include/menu_rmb.h index c16ad89f34..cf6e2da3b1 100644 --- a/programs/cmm/browser/include/menu_rmb.h +++ b/programs/cmm/browser/include/menu_rmb.h @@ -14,39 +14,36 @@ char *ITEMS_LIST[]={ #endif 0}; +llist menu; +dword col_work = 0xE4DFE1; +dword col_border = 0x9098B0; void menu_rmb() { mouse mm; proc_info MenuForm; - llist menu; - int overid, key, N; - dword col_work = 0xE4DFE1; - dword col_border = 0x9098B0; + int key; menu.first = menu.current = 0; - while (ITEMS_LIST[menu.count*2]) {menu.count++; menu.visible++;} - menu.line_h = 19; - menu.w = 165; - menu.h = menu.count * menu.line_h; + while (ITEMS_LIST[menu.count*2]) menu.count++; + menu.SetSizes(2,2,165,menu.count*19,0,19); SetEventMask(100111b); loop() switch(WaitEvent()) { case evMouse: GetProcessInfo(#MenuForm, SelfInfo); - N=GetProcessSlot(MenuForm.ID); - if (N<>GetActiveProcess()) ExitProcess(); + if (!CheckActiveProcess(MenuForm.ID)) ExitProcess(); mm.get(); - if (menu.ProcessMouse(mm.x, mm.y)) goto _ITEMS_DRAW; + if (menu.ProcessMouse(mm.x, mm.y)) DrawMenuList(); if (mm.lkm) || (mm.pkm) { action_buf = ITEMS_LIST[menu.current*2+1]; ExitProcess(); } break; case evKey: key = GetKey(); if (key==27) ExitProcess(); - if (menu.ProcessKey(key)) goto _ITEMS_DRAW; + if (menu.ProcessKey(key)) DrawMenuList(); if (key==13) { action_buf = ITEMS_LIST[menu.current*2+1]; @@ -55,26 +52,26 @@ void menu_rmb() break; case evReDraw: - DefineAndDrawWindow(Form.left+m.x,Form.top+m.y+GetSkinHeight()+3,menu.w+2,menu.count*menu.line_h+4,0x01, 0, 0, 0x01fffFFF); - DrawPopup(0,0,menu.w,menu.count*menu.line_h+3,0, col_work,col_border); - - _ITEMS_DRAW: - for (N=0; N