forked from KolibriOS/kolibrios
Eolite 2.25: fixes the copy function
git-svn-id: svn://kolibrios.org@4864 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
efbd3e0f04
commit
fba34f0ab9
@ -82,8 +82,8 @@
|
|||||||
|
|
||||||
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
|
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
|
||||||
|
|
||||||
#define TITLE "Eolite File Manager v2.22"
|
#define TITLE "Eolite File Manager v2.25"
|
||||||
#define ABOUT_TITLE "Eolite v2.22"
|
#define ABOUT_TITLE "Eolite v2.25"
|
||||||
dword col_padding, col_selec, col_lpanel;
|
dword col_padding, col_selec, col_lpanel;
|
||||||
|
|
||||||
int toolbar_buttons_x[7]={9,46,85,134,167,203};
|
int toolbar_buttons_x[7]={9,46,85,134,167,203};
|
||||||
@ -428,8 +428,9 @@ void main()
|
|||||||
Del_Form();
|
Del_Form();
|
||||||
break;
|
break;
|
||||||
case 185: //ins
|
case 185: //ins
|
||||||
|
add_to_copy_active=1;
|
||||||
add_to_copy(#file_path);
|
add_to_copy(#file_path);
|
||||||
notify("'Eolite\nFile was added to copy queue' -tI");
|
//notify("'Eolite\nFile was added to copy queue' -tI");
|
||||||
break;
|
break;
|
||||||
case 050...059: //F1-F10
|
case 050...059: //F1-F10
|
||||||
FnProcess(key-49);
|
FnProcess(key-49);
|
||||||
|
@ -17,6 +17,7 @@ Clipboard clipboard;
|
|||||||
struct Copy_Path {
|
struct Copy_Path {
|
||||||
dword size;
|
dword size;
|
||||||
dword type;
|
dword type;
|
||||||
|
int count;
|
||||||
path_str copy_list[MAX_HISTORY_NUM];
|
path_str copy_list[MAX_HISTORY_NUM];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -24,15 +25,19 @@ Copy_Path copy_path;
|
|||||||
|
|
||||||
void add_to_copy(dword pcth)
|
void add_to_copy(dword pcth)
|
||||||
{
|
{
|
||||||
add_to_copy_active=1;
|
|
||||||
strlcpy(#copy_path.copy_list[id_add_to_copy].Item, pcth);
|
strlcpy(#copy_path.copy_list[id_add_to_copy].Item, pcth);
|
||||||
id_add_to_copy++;
|
if (add_to_copy_active == 1)
|
||||||
|
{
|
||||||
|
id_add_to_copy++;
|
||||||
|
copy_path.count = id_add_to_copy;
|
||||||
|
}
|
||||||
|
else copy_path.count = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Copy(dword pcth, char cut)
|
void Copy(dword pcth, char cut)
|
||||||
{
|
{
|
||||||
add_to_copy(pcth);
|
if (add_to_copy_active == 0) add_to_copy(pcth);
|
||||||
copy_path.type = 3;
|
copy_path.type = 3;
|
||||||
copy_path.size = sizeof(copy_path);
|
copy_path.size = sizeof(copy_path);
|
||||||
clipboard.SetSlotData(sizeof(copy_path), #copy_path);
|
clipboard.SetSlotData(sizeof(copy_path), #copy_path);
|
||||||
@ -58,11 +63,19 @@ void Paste()
|
|||||||
{
|
{
|
||||||
char copy_rezult;
|
char copy_rezult;
|
||||||
byte copy_from[4096];
|
byte copy_from[4096];
|
||||||
int tst;
|
int tst, count;
|
||||||
|
dword buf;
|
||||||
|
|
||||||
for (j = 0; j < MAX_HISTORY_NUM; j++) {
|
buf = clipboard.GetSlotData(clipboard.GetSlotCount()-1);
|
||||||
|
count = DSINT[buf+8];
|
||||||
|
debugi(count);
|
||||||
|
|
||||||
|
add_to_copy_active=0;
|
||||||
|
id_add_to_copy=0;
|
||||||
|
|
||||||
|
for (j = 0; j < count; j++) {
|
||||||
tst = j*4096;
|
tst = j*4096;
|
||||||
strlcpy(#copy_from, clipboard.GetSlotData(clipboard.GetSlotCount()-1)+8+tst, 4096);
|
strlcpy(#copy_from, buf+12+tst, 4096);
|
||||||
debug(#copy_from);
|
debug(#copy_from);
|
||||||
if (!copy_from) CopyExit();
|
if (!copy_from) CopyExit();
|
||||||
strcpy(#copy_to, #path);
|
strcpy(#copy_to, #path);
|
||||||
@ -93,9 +106,7 @@ void Paste()
|
|||||||
Del_File(true);
|
Del_File(true);
|
||||||
cut_active=false;
|
cut_active=false;
|
||||||
}
|
}
|
||||||
for (j = 0; j < MAX_HISTORY_NUM; j++) strcpy(#copy_path.copy_list[j].Item, 0);
|
for (j = 0; j < MAX_HISTORY_NUM; j++) strcpy(#copy_path.copy_list[j].Item[0], 0);
|
||||||
add_to_copy_active=0;
|
|
||||||
id_add_to_copy=0;
|
|
||||||
CopyExit();
|
CopyExit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user