Eolite 1.35: crash fixed. No react on keys in rolled up window mode now

git-svn-id: svn://kolibrios.org@3029 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2012-11-12 18:56:19 +00:00
parent e8b5870f84
commit 5771bc24c3
3 changed files with 18 additions and 13 deletions

View File

@ -20,7 +20,7 @@ int BUTTON_HEIGHT=18;
#define ONLY_OPEN 2
//ïåðåìåííûå
#define title "Eolite File Manager v1.34"
#define title "Eolite File Manager v1.35"
dword selection_col = 0x94AECE;
dword lpanel_col = 0x00699C;
@ -82,10 +82,11 @@ dword buf, off; //
#include "include\history.h"
void main()
word key, id;
mouse m;
int scroll_used=0;
{
word key, id;
mouse m;
int scroll_used;
load_editbox_lib();
GetSystemDiscs();
GetIni(1);
@ -160,7 +161,7 @@ int scroll_used=0;
List_ReDraw();
}
//ñêðîëë
if (!m.lkm) scroll_used=0;
if (!m.lkm) scroll_used=NULL;
if (m.x>=Form.width-26) && (m.x<=Form.width-6) && (m.y>56) && (m.y<Form.height) && (m.lkm) scroll_used=1;
if (scroll_used)
@ -192,7 +193,7 @@ int scroll_used=0;
case 22: //Forward
if (HistoryPath(GO_FORWARD))
{
za_kadrom=curbtn=0; //ââåðõ ñïèñêà
za_kadrom=curbtn=NULL; //ââåðõ ñïèñêà
Open_Dir(#path,WITH_REDRAW);
}
break;
@ -240,7 +241,7 @@ int scroll_used=0;
copystr(#path, #temp);
copystr("New folder", #temp+strlen(#temp));
CreateFolder(#temp);
IF (EAX==0){
IF (!EAX){
SelectFile("New folder");
goto REN_MARK;
}
@ -279,6 +280,7 @@ int scroll_used=0;
//Key pressed-----------------------------------------------------------------------------
case evKey:
key = GetKey();
if (Form.status_window>2) break;
IF (del_active)
{
IF (key==013) Del_File(true);
@ -409,14 +411,14 @@ inline fastcall void draw_window()
else
DefineAndDrawWindow(98,90,582,482,0x73,0xE4DFE1,title);
Form.GetInfo(#Form, SelfInfo);
IF (Form.status_window>2) return; //íè÷åãî íå äåëàòü åñëè îêíî ñõëîïíóòî â çàãîëîâîê
IF (Form.height<280) MoveSize(OLD,OLD,OLD,280);
IF (Form.width<480) MoveSize(OLD,OLD,480,OLD);
if (Form.status_window>2) return; //íè÷åãî íå äåëàòü åñëè îêíî ñõëîïíóòî â çàãîëîâîê
if (Form.height<280) MoveSize(OLD,OLD,OLD,280);
if (Form.width<480) MoveSize(OLD,OLD,480,OLD);
//toolbar buttons
PutPaletteImage(#toolbar,246,39,0,0,#toolbar_pal);
FOR (j=0; j<3; j++) DefineButton(toolbar_buttons_x[j]+2,5+2,31-5,29-5,21+j+BT_HIDE,0xE4DFE1);
FOR (j=3; j<6; j++) DefineButton(toolbar_buttons_x[j],5,31,29,21+j+BT_HIDE,0xE4DFE1);
for (j=0; j<3; j++) DefineButton(toolbar_buttons_x[j]+2,5+2,31-5,29-5,21+j+BT_HIDE,0xE4DFE1);
for (j=3; j<6; j++) DefineButton(toolbar_buttons_x[j],5,31,29,21+j+BT_HIDE,0xE4DFE1);
//ïîëîñà àäðåñà
edit1.width=Form.width-314;
DrawBar(246,0,onLeft(246,60),12,0xE4DFE1); //ôîí íàä ïîëîñîé àäðåñà

View File

@ -1,3 +1,5 @@
12.11.12 -- v1.35
- теперь окно не обрабатывает клавиши если свёрнуто в заголовок;
- фикс для строки адреса;
- исправлена 100% загрузка процессора при удержании ползунка;
- исправлена серьёзная утечка памяти, уменьшено её потребление.

View File

@ -31,6 +31,7 @@ char program_path[4096];
#define true 1
#define false 0
#define NULL 0
struct mouse