Eolite: move paste action into one place

git-svn-id: svn://kolibrios.org@5608 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2015-07-23 12:15:53 +00:00
parent d50725e30c
commit 9f3afe93b0
2 changed files with 16 additions and 15 deletions

View File

@ -146,6 +146,8 @@ byte
dword eolite_ini_path; dword eolite_ini_path;
dword menu_stak,about_stak,properties_stak,settings_stak,copy_stak;
proc_info Form; proc_info Form;
system_colors sc; system_colors sc;
mouse m; mouse m;
@ -178,7 +180,6 @@ byte cmd_free;
#include "include\settings.h" #include "include\settings.h"
#include "include\properties.h" #include "include\properties.h"
dword menu_stak,about_stak,properties_stak,settings_stak,copy_stak;
void main() void main()
{ {
@ -377,18 +378,17 @@ void main()
Open_Dir(#path,WITH_REDRAW); Open_Dir(#path,WITH_REDRAW);
} }
break; break;
case 23: //up! case 23:
Dir_Up(); Dir_Up();
break; break;
case 24: //cut case 24:
Copy(#file_path, CUT); Copy(#file_path, CUT);
break; break;
case 25: //copy case 25:
Copy(#file_path, NOCUT); Copy(#file_path, NOCUT);
break; break;
case 26: //paste case 26:
copy_stak = malloc(4096); Paste();
CreateThread(#Paste,copy_stak+4092);
break; break;
case 31...33: //sort case 31...33: //sort
if(sort_num==1) DrawFilledBar(sorting_arrow_x,42,6,10); if(sort_num==1) DrawFilledBar(sorting_arrow_x,42,6,10);
@ -461,8 +461,7 @@ void main()
Copy(#file_path, NOCUT); Copy(#file_path, NOCUT);
break; break;
case 022: //Ctrl+V case 022: //Ctrl+V
copy_stak = malloc(4096); Paste();
CreateThread(#Paste,copy_stak+4092);
break; break;
case 001: //Ctrl+A case 001: //Ctrl+A
debugln("press Ctrl+A"); debugln("press Ctrl+A");
@ -601,11 +600,7 @@ void menu_action(dword id)
if (id==203) FnProcess(4); //F4 if (id==203) FnProcess(4); //F4
if (id==104) Copy(#file_path, NOCUT); if (id==104) Copy(#file_path, NOCUT);
if (id==105) Copy(#file_path, CUT); if (id==105) Copy(#file_path, CUT);
if (id==106) if (id==106) Paste();
{
copy_stak = malloc(4096);
CreateThread(#Paste,copy_stak+4092);
}
if (id==207) FnProcess(2); if (id==207) FnProcess(2);
if (id==108) Del_Form(); if (id==108) Del_Form();
if (id==109) FnProcess(5); if (id==109) FnProcess(5);

View File

@ -1,4 +1,10 @@
void Paste() {
copy_stak = malloc(4096);
CreateThread(#PasteThread,copy_stak+4092);
}
byte copy_to[4096]; byte copy_to[4096];
byte copy_from[4096]; byte copy_from[4096];
byte cut_active=0; byte cut_active=0;
@ -46,7 +52,7 @@ void Copy(dword pcth, char cut)
} }
void Paste() void PasteThread()
{ {
char copy_rezult; char copy_rezult;
int j; int j;