diff --git a/programs/cmm/browser/WebView.c b/programs/cmm/browser/WebView.c index e5590efe59..f55614130a 100644 --- a/programs/cmm/browser/WebView.c +++ b/programs/cmm/browser/WebView.c @@ -30,6 +30,7 @@ #include "..\lib\patterns\http_downloader.h" #include "..\lib\patterns\simple_open_dialog.h" #include "..\lib\patterns\toolbar_button.h" +#include "..\lib\patterns\restart_process.h" #include "texts.h" #include "cache.h" @@ -101,6 +102,7 @@ edit_box address_box = {, PADDING+TSZE*2+PADDING+6, PADDING+3, 0xffffff, char editbox_icons[] = FROM "editbox_icons.raw"; +dword shared_url; void LoadLibraries() { @@ -130,11 +132,18 @@ void HandleParam() source_mode = true; history.add(#param + 8); } else { - history.add(#param); + if (GetProcessesCount("WEBVIEW") == 1) { + history.add(#param); + } else { + shared_url = memopen(#webview_shared, URL_SIZE+1, SHM_OPEN + SHM_WRITE); + strncpy(shared_url, #param, URL_SIZE); + ExitProcess(); + } } } else { history.add(URL_SERVICE_HOMEPAGE); } + shared_url = memopen(#webview_shared, URL_SIZE+1, SHM_CREATE + SHM_WRITE); } void main() @@ -148,7 +157,7 @@ void main() WB1.list.no_selection = true; WB1.custom_encoding = -1; SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER + EVM_STACK); - loop() switch(WaitEvent()) + loop() switch(@WaitEventTimeout(30)) { case evMouse: edit_box_mouse stdcall (#address_box); @@ -246,6 +255,13 @@ void main() pages_cache.add(history.current(), http.content_pointer, http.content_received); LoadInternalPage(http.content_pointer, http.content_received); } + break; + default: + if (ESDWORD[shared_url] != '\0') { + EventOpenNewTab(shared_url); + ESDWORD[shared_url] = '\0'; + ActivateWindow(GetProcessSlot(Form.ID)); + } } } diff --git a/programs/cmm/browser/texts.h b/programs/cmm/browser/texts.h index c5e65d74b2..0a945bc0de 100644 --- a/programs/cmm/browser/texts.h +++ b/programs/cmm/browser/texts.h @@ -1,4 +1,4 @@ -char version[]="WebView 2.48"; +char version[]="WebView 2.5"; #ifdef LANG_RUS char page_not_found[] = FROM "html\\page_not_found_ru.htm""\0"; @@ -65,3 +65,4 @@ char clear_cache_ok[] = "'WebView\nThe cache has been cleared.' -tI"; #define URL_SERVICE_HOMEPAGE "WebView:home" #define URL_SERVICE_HELP "WebView:help" +char webview_shared[] = "WEBVIEW"; diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index c5422c0d8c..11e43bd2c4 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -206,7 +206,13 @@ void main() if (dir_exists(#param)) { strcpy(#path, #param); } else { - notify(T_NOTIFY_APP_PARAM_WRONG); + file_size stdcall (#param); + if (EAX==-1) notify(T_NOTIFY_APP_PARAM_WRONG); + else { + param[strrchr(#param, '/')-1] = '\0'; + strcpy(#path, #param); + //in future we need also to select file + } } } diff --git a/programs/cmm/eolite/include/properties.h b/programs/cmm/eolite/include/properties.h index 538c8a70e6..f711c46b36 100644 --- a/programs/cmm/eolite/include/properties.h +++ b/programs/cmm/eolite/include/properties.h @@ -250,7 +250,8 @@ void properties_dialog() EventApplyProperties(); break; - default: + case SCAN_CODE_KEY_A: + case SCAN_CODE_KEY_C: if (key_modifier & KEY_LCTRL) || (key_modifier & KEY_RCTRL) { EAX = key_editbox; edit_box_key stdcall(#file_name_ed); diff --git a/programs/cmm/eolite/include/translations.h b/programs/cmm/eolite/include/translations.h index 42cd8dee23..34312831d1 100644 --- a/programs/cmm/eolite/include/translations.h +++ b/programs/cmm/eolite/include/translations.h @@ -1,5 +1,5 @@ -#define TITLE "Eolite File Manager 4.28" -#define ABOUT_TITLE "EOLITE 4.28" +#define TITLE "Eolite File Manager 4.28b" +#define ABOUT_TITLE "EOLITE 4.28b" #ifdef LANG_RUS ?define T_FILE "” ©«" diff --git a/programs/cmm/lib/clipboard.h b/programs/cmm/lib/clipboard.h index 74225b08c3..25acf80265 100644 --- a/programs/cmm/lib/clipboard.h +++ b/programs/cmm/lib/clipboard.h @@ -65,7 +65,7 @@ inline fastcall dword Clipboard__ResetBlockingBuffer() :void Clipboard__CopyText(dword _text) { -int size_buf; +dword size_buf; dword buff_data; size_buf = strlen(_text) + 12; diff --git a/programs/cmm/lib/kolibri.h b/programs/cmm/lib/kolibri.h index 840975553d..20908c69bb 100644 --- a/programs/cmm/lib/kolibri.h +++ b/programs/cmm/lib/kolibri.h @@ -73,12 +73,6 @@ char program_path[4096]; inline fastcall dword calc(EAX) { return EAX; } -inline fastcall swap(EAX, EBX) -{ - $push ESDWORD[EAX] - ESDWORD[EAX] = ESDWORD[EBX]; - $pop ESDWORD[EBX]; -} :struct raw_image { dword w, h, data; diff --git a/programs/cmm/lib/patterns/restart_process.h b/programs/cmm/lib/patterns/restart_process.h index e3ff537704..234b6dffdd 100644 --- a/programs/cmm/lib/patterns/restart_process.h +++ b/programs/cmm/lib/patterns/restart_process.h @@ -37,6 +37,17 @@ enum { } } +:int GetProcessesCount(dword proc_name) { + int i, count=0; + proc_info Process; + for (i=0; i