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