Subversion Repositories Kolibri OS

Rev

Rev 5691 | Rev 5695 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5691 Rev 5694
Line 101... Line 101...
101
#endif
101
#endif
Line 102... Line 102...
102
 
102
 
103
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
103
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
Line 104... Line 104...
104
enum { CREATE_FILE=1, CREATE_FOLDER, RENAME_ITEM }; //NewElement
104
enum { CREATE_FILE=1, CREATE_FOLDER, RENAME_ITEM }; //NewElement
105
 
105
 
106
#define TITLE "Eolite File Manager v2.96"
106
#define TITLE "Eolite File Manager v3.0 beta"
Line 107... Line 107...
107
#define ABOUT_TITLE "Eolite 2.96"
107
#define ABOUT_TITLE "Eolite 3.0 beta"
108
dword col_padding, col_selec, col_lpanel;
108
dword col_padding, col_selec, col_lpanel;
Line 117... Line 117...
117
dword _not_draw = false;
117
dword _not_draw = false;
118
byte menu_call_mouse=0;
118
byte menu_call_mouse=0;
Line 119... Line 119...
119
 
119
 
Line -... Line 120...
-
 
120
llist files;
-
 
121
 
120
llist files;
122
byte list_full_redraw;
121
 
123
 
122
byte
124
byte
123
	path[4096],
125
	path[4096],
124
	file_path[4096],
126
	file_path[4096],
Line 140... Line 142...
140
dword eolite_ini_path;
142
dword eolite_ini_path;
Line 141... Line 143...
141
 
143
 
Line 142... Line 144...
142
dword menu_stak,about_stak,properties_stak,settings_stak,copy_stak;
144
dword menu_stak,about_stak,properties_stak,settings_stak,copy_stak;
143
 
145
 
144
proc_info Form;
146
proc_info Form;
145
int mouse_dd, scroll_used, sc_slider_h, sorting_arrow_x, kolibrios_drive;
147
int mouse_dd, sc_slider_h, sorting_arrow_x, kolibrios_drive;
146
dword buf;
148
dword buf;
147
dword file_mas[6898];
149
dword file_mas[6898];
148
int j, i;
150
int j, i;
149
int action_buf;
151
int action_buf;
150
int rand_n;
152
int rand_n;
Line 151... Line 153...
151
int selected_count;
153
int selected_count;
152
byte CMD_REFRESH;
154
byte CMD_REFRESH;
Line 153... Line 155...
153
 
155
 
154
signed x_old, y_old, dif_x, dif_y, adif_x, adif_y;
156
signed x_old, y_old, dif_x, dif_y, adif_x, adif_y;
155
byte stats;
157
 
156
 
158
 
157
edit_box edit2 = {250,213,80,0xFFFFCC,0x94AECE,0xFFFFCC,0xFFFFFF,0,248,#file_name,#mouse_dd,64,6,6};
159
edit_box edit2 = {250,213,80,0xFFFFCC,0x94AECE,0xFFFFCC,0xFFFFFF,0,248,#file_name,#mouse_dd,64,6,6};
158
edit_box new_file_ed = {171,213,180,0xFFFFFF,0x94AECE,0xFFFFFF,0xFFFFFF,0,248,#new_element_name,#mouse_dd,100000000000010b,6,0};
160
edit_box new_file_ed = {171,213,180,0xFFFFFF,0x94AECE,0xFFFFFF,0xFFFFFF,0,248,#new_element_name,#mouse_dd,100000000000010b,6,0};
159
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0};
161
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0};
160
PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0};
162
PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0};
161
byte cmd_free;
163
byte cmd_free=0;
162
#include "include\copy.h"
164
#include "include\copy.h"
Line 171... Line 173...
171
#include "include\properties.h"
173
#include "include\properties.h"
Line 172... Line 174...
172
 
174
 
173
 
175
 
-
 
176
void main() 
174
void main() 
177
{
175
{
178
	word key, id;
176
	word key, id, can_show, can_select, m_selected;
179
	char can_show, can_select, scroll_used, stats;
177
	dword selected_offset;
180
	dword selected_offset;
178
	dword IPC_LEN,IPC_ID;
181
	dword IPC_LEN,IPC_ID;
179
	char IPC_BUF[10];
182
	char IPC_BUF[10];
Line 230... Line 233...
230
					{
233
					{
231
						if (dif_x > 150)
234
						if (dif_x > 150)
232
						{
235
						{
233
							if (HistoryPath(GO_FORWARD))
236
							if (HistoryPath(GO_FORWARD))
234
								{
237
								{
235
									files.first=files.current=NULL;
238
									files.KeyHome();
236
									Open_Dir(#path,WITH_REDRAW);
239
									Open_Dir(#path,WITH_REDRAW);
237
								}
240
								}
238
							stats = 0;
241
							stats = 0;
239
						}
242
						}
240
						if (dif_x < -150)
243
						if (dif_x < -150)
Line 257... Line 260...
257
					//select/open file {
260
					//select/open file {
258
					if (mouse.key&MOUSE_LEFT)&&((mouse.down)||(mouse.dblclick))
261
					if (mouse.key&MOUSE_LEFT)&&((mouse.down)||(mouse.dblclick))
259
					{
262
					{
260
						if (mouse.y>=files.y)//&&(mouse.click)
263
						if (mouse.y>=files.y)//&&(mouse.click)
261
						{
264
						{
262
							id = mouse.y - files.y / files.line_h;
265
							id = mouse.y - files.y / files.line_h + files.first;
263
							IF (files.current!=id)
266
							if (files.current!=id)
264
							{
267
							{
265
								mouse.clearTime();
268
								mouse.clearTime();
266
								if(!mouse.up)&&(id
269
								if(!mouse.up)&&(id-files.first
-
 
270
									files.current = id;
-
 
271
									List_ReDraw();
-
 
272
								}
267
							}
273
							}
268
							else IF(mouse.dblclick)Open(0);
274
							else IF(mouse.dblclick)Open(0);
269
						}
275
						}
270
					}
276
					}
271
					// } select/open file
277
					// } select/open file
272
					else
278
					else
273
					//file menu {
279
					//file menu {
274
					if (mouse.key&MOUSE_RIGHT)&&(mouse.up)
280
					if (mouse.key&MOUSE_RIGHT)&&(mouse.up)
275
					{
281
					{
276
						menu_call_mouse = 1;
282
						menu_call_mouse = 1;
-
 
283
						
277
						if (mouse.y>=files.y)//&&(mouse.click)
284
						if (files.MouseOver(mouse.x, mouse.y))
278
						{
285
						{
279
							id = mouse.y - files.y / files.line_h;
286
							files.current = mouse.y - files.y / files.line_h + files.first;
280
							if (files.current!=id) List_Current(id-files.current);
-
 
281
							//SwitchToAnotherThread();
-
 
282
							menu_stak = malloc(4096);
287
							menu_stak = malloc(4096);
283
							CreateThread(#FileMenu,menu_stak+4092);
288
							CreateThread(#FileMenu,menu_stak+4092);	
284
						}
289
						}
285
						break;
290
						break;
286
					}
291
					}
Line 359... Line 364...
359
							GoBack();
364
							GoBack();
360
							break;
365
							break;
361
					case 22: //Forward
366
					case 22: //Forward
362
							if (HistoryPath(GO_FORWARD))
367
							if (HistoryPath(GO_FORWARD))
363
							{
368
							{
364
								files.first=files.current=NULL; //aaa?o nienea
369
								files.KeyHome();
365
								Open_Dir(#path,WITH_REDRAW);
370
								Open_Dir(#path,WITH_REDRAW);
366
							}
371
							}
367
							break;
372
							break;
368
					case 23:
373
					case 23:
369
							Dir_Up();
374
							Dir_Up();
Line 389... Line 394...
389
							break;
394
							break;
390
					case 100...120:
395
					case 100...120:
391
						DEVICE_MARK:
396
						DEVICE_MARK:
392
							DrawRectangle(17,id-100*16+74,159,16, 0); //auaaeaiea
397
							DrawRectangle(17,id-100*16+74,159,16, 0); //auaaeaiea
393
							strcpy(#path, #disk_list[id-100].Item);
398
							strcpy(#path, #disk_list[id-100].Item);
394
							files.first=files.current=0;
399
							files.KeyHome();
395
							Open_Dir(#path,WITH_REDRAW);
400
							Open_Dir(#path,WITH_REDRAW);
396
							pause(5);
401
							pause(5);
397
							DrawRectangle(17,id-100*16+74,159,16, 0xFFFFFF);
402
							DrawRectangle(17,id-100*16+74,159,16, 0xFFFFFF);
398
							break;
403
							break;
399
				}
404
				}
Line 420... Line 425...
420
				{
425
				{
421
					EAX=key<<8;
426
					EAX=key<<8;
422
					edit_box_key stdcall (#edit2);
427
					edit_box_key stdcall (#edit2);
423
					break;
428
					break;
424
				}
429
				}
-
 
430
				if (files.ProcessKey(key))
-
 
431
				{
-
 
432
					List_ReDraw();
-
 
433
					break;
-
 
434
				}
425
				switch (key)
435
				switch (key)
426
				{
436
				{
427
						case 209...217:
437
						case 209...217:
428
								id=key-110;
438
								id=key-110;
429
								if (id-100>=disc_num) break;
439
								if (id-100>=disc_num) break;
Line 482... Line 492...
482
								break;
492
								break;
483
						case 173: //Ctrl+Enter
493
						case 173: //Ctrl+Enter
484
								if (!itdir) ShowOpenWithDialog();
494
								if (!itdir) ShowOpenWithDialog();
485
								else Open(1);
495
								else Open(1);
486
								break;
496
								break;
487
						case ASCII_KEY_UP:
-
 
488
								List_Current(-1);
-
 
489
								break;
-
 
490
						case ASCII_KEY_DOWN:
-
 
491
								List_Current(1);
-
 
492
								break;
-
 
493
						case ASCII_KEY_HOME:
-
 
494
								if (files.KeyHome()) List_ReDraw();
-
 
495
								break;
-
 
496
						case ASCII_KEY_END:
-
 
497
								if (files.KeyEnd()) List_ReDraw();
-
 
498
								break;
-
 
499
						case ASCII_KEY_PGDN:
-
 
500
								List_Current(files.visible-1);
-
 
501
								break;
-
 
502
						case ASCII_KEY_PGUP:
-
 
503
								List_Current(-files.visible+1);
-
 
504
								break;
-
 
505
						case ASCII_KEY_DEL:
497
						case ASCII_KEY_DEL:
506
								Del_Form();
498
								Del_Form();
507
								break;
499
								break;
508
						case ASCII_KEY_INS:
500
						case ASCII_KEY_INS:
509
								selected_offset = file_mas[files.current+files.first]*304 + buf+32 + 7;
501
								selected_offset = file_mas[files.current]*304 + buf+32 + 7;
510
								if (files.current+files.first==0) && (!strncmp(selected_offset+33, "..", 2)) goto _INSERT_END; //do not selec ".." directory
502
								if (files.current==0) && (!strncmp(selected_offset+33, "..", 2)) goto _INSERT_END; //do not selec ".." directory
511
								if (ESBYTE[selected_offset])
503
								if (ESBYTE[selected_offset])
512
								{
504
								{
513
									ESBYTE[selected_offset]=0;
505
									ESBYTE[selected_offset]=0;
514
									selected_count--;
506
									selected_count--;
515
								}
507
								}
Line 517... Line 509...
517
								{
509
								{
518
									ESBYTE[selected_offset] = 1;
510
									ESBYTE[selected_offset] = 1;
519
									selected_count++;
511
									selected_count++;
520
								}
512
								}
521
								_INSERT_END:
513
								_INSERT_END:
522
								List_Current(1);
514
								if (files.KeyDown()) List_ReDraw();
523
								break;
515
								break;
524
						case 048...059: //F1-F10
516
						case 048...059: //F1-F10
525
								FnProcess(key-49);
517
								FnProcess(key-49);
526
								break; 
518
								break; 
527
						default:    
519
						default:    
528
								for (i=files.current+files.first+1; i
520
								for (i=files.current+1; i
529
								{
521
								{
530
									strcpy(#temp, file_mas[i]*304+buf+72);
522
									strcpy(#temp, file_mas[i]*304+buf+72);
531
									if (temp[0]==key) || (temp[0]==key-32)
523
									if (temp[0]==key) || (temp[0]==key-32)
532
									{
524
									{
533
										List_Current(i-files.current-files.first);
525
										files.current = i - 1;
-
 
526
										files.KeyDown();
-
 
527
										List_ReDraw();
534
										break;
528
										break;
535
									}
529
									}
536
								}
530
								}
537
				}                         
531
				}                         
538
			break;
532
			break;
Line 578... Line 572...
578
void menu_action(dword id)
572
void menu_action(dword id)
579
{
573
{
580
	if (id==COPY_PASTE_END)
574
	if (id==COPY_PASTE_END)
581
	{
575
	{
582
		FnProcess(5);
576
		FnProcess(5);
583
		SelectFile(#copy_to+strrchr(#copy_to,'/'));
577
		SelectFileByName(#copy_to+strrchr(#copy_to,'/'));
584
	}
578
	}
585
	if (id==100) Open(0);
579
	if (id==100) Open(0);
586
	if (id==201) ShowOpenWithDialog();
580
	if (id==201) ShowOpenWithDialog();
587
	if (id==202) FnProcess(3); //F3
581
	if (id==202) FnProcess(3); //F3
588
	if (id==203) FnProcess(4); //F4
582
	if (id==203) FnProcess(4); //F4
Line 604... Line 598...
604
void draw_window()
598
void draw_window()
605
{
599
{
606
	DefineAndDrawWindow(GetScreenWidth()-550/4+rand_n,rand_n+30,550,500,0x73,system.color.work,TITLE,0);
600
	DefineAndDrawWindow(GetScreenWidth()-550/4+rand_n,rand_n+30,550,500,0x73,system.color.work,TITLE,0);
607
	GetProcessInfo(#Form, SelfInfo);
601
	GetProcessInfo(#Form, SelfInfo);
608
	if (Form.status_window>2) return;
602
	if (Form.status_window>2) return;
609
	files.SetSizes(192, 57, Form.cwidth - 210, onTop(57,6), disc_num*16+195,files.line_h);
-
 
610
	if (Form.height < files.min_h) MoveSize(OLD,OLD,OLD,files.min_h);
603
	if (Form.height < files.min_h) MoveSize(OLD,OLD,OLD,files.min_h);
611
	if (Form.width<480) MoveSize(OLD,OLD,480,OLD);
604
	if (Form.width<480) MoveSize(OLD,OLD,480,OLD);
612
	GetProcessInfo(#Form, SelfInfo); //if win_size changed
605
	GetProcessInfo(#Form, SelfInfo); //if win_size changed
613
 
-
 
-
 
606
	files.SetSizes(192, 57, Form.cwidth - 210, onTop(57,6), disc_num*16+195,files.line_h);
614
	PutPaletteImage(#toolbar,246,34,0,0,8,#toolbar_pal);
607
	PutPaletteImage(#toolbar,246,34,0,0,8,#toolbar_pal);
615
	DrawBar(127, 8, 1, 25, system.color.work_graph);
608
	DrawBar(127, 8, 1, 25, system.color.work_graph);
616
	for (j=0; j<3; j++) DefineButton(toolbar_buttons_x[j]+2,5+2,31-5,29-5,21+j+BT_HIDE,system.color.work);
609
	for (j=0; j<3; j++) DefineButton(toolbar_buttons_x[j]+2,5+2,31-5,29-5,21+j+BT_HIDE,system.color.work);
617
	for (j=3; j<6; j++) DefineButton(toolbar_buttons_x[j],5,31,29,21+j+BT_HIDE,system.color.work);
610
	for (j=3; j<6; j++) DefineButton(toolbar_buttons_x[j],5,31,29,21+j+BT_HIDE,system.color.work);
618
	DrawBar(246,0,Form.cwidth - 297,12, system.color.work); //upper editbox
611
	DrawBar(246,0,Form.cwidth - 297,12, system.color.work); //upper editbox
Line 636... Line 629...
636
	if (del_active) Del_Form();
629
	if (del_active) Del_Form();
637
	if (new_element_active) NewElement_Form(new_element_active, #new_element_name);
630
	if (new_element_active) NewElement_Form(new_element_active, #new_element_name);
638
}
631
}
Line 639... Line 632...
639
 
632
 
640
 
633
 
641
void KEdit()
634
void List_ReDraw()
642
{
635
{
643
	if (Form.width<480) return;
-
 
644
	PathShow.area_size_x = Form.cwidth-306;
-
 
645
	DrawBar(PathShow.start_x-3, PathShow.start_y-4, PathShow.area_size_x+2, 15, 0xFFFfff);
-
 
646
	PathShow_prepare stdcall(#PathShow);
-
 
Line -... Line 636...
-
 
636
	int paint_y;
Line 647... Line -...
647
	PathShow_draw stdcall(#PathShow);
-
 
648
}
-
 
649
 
-
 
650
 
-
 
651
void List_Current(signed int cur)
-
 
652
{
-
 
653
	if (cur<=0) //up
-
 
654
	{
-
 
655
		if (files.first==0) && (files.current<=0) return;
-
 
656
		if (-cur-1
637
	static int old_current, old_first;
657
		{
-
 
658
			Line_ReDraw(0xFFFFFF, files.current);
-
 
659
			files.current+=cur;
-
 
660
			Line_ReDraw(col_selec, files.current);
638
 
661
			return;
639
	files.CheckDoesValuesOkey(); //prevent some shit
662
		}
640
 
663
		else
641
	if (list_full_redraw) || (old_first != files.first)
664
		{
642
	{
665
			if (-cur
643
		old_current = files.current;
666
			files.current=0;
-
 
667
			List_ReDraw();
-
 
668
			return;
-
 
669
		}
644
		old_first = files.first;
670
	}
645
		list_full_redraw = false;
-
 
646
		goto _ALL_LIST_REDRAW;
671
	else  //down
647
	}
-
 
648
	if (old_current != files.current)
672
	{
649
	{
673
		if (files.first==files.count-files.visible) && (files.current==files.visible-1) 
650
		Line_ReDraw(0xFFFFFF, old_current-files.first);
674
		{
-
 
675
			Line_ReDraw(col_selec, files.current);
-
 
676
			return;
-
 
677
		}
-
 
678
		if (files.visible-files.current>cur)
-
 
679
		{
-
 
680
			Line_ReDraw(0xFFFFFF, files.current);
-
 
681
			files.current+=cur;
-
 
682
			Line_ReDraw(col_selec, files.current);
-
 
683
			return;
-
 
684
		}
-
 
685
		else
-
 
686
		{
-
 
687
			if(files.first+files.current+cur>=files.count)
-
 
688
			{
-
 
689
				files.first=files.count-files.visible;
-
 
690
				files.current=cur-files.first+files.current;
-
 
691
				}
-
 
692
			else
-
 
693
			{
-
 
694
				files.first+=cur+files.current-files.visible+1;
-
 
695
				files.current=files.visible-1;
-
 
696
			}
-
 
697
			
-
 
698
			if (files.current<0) || (files.current>files.visible)
-
 
699
			{
-
 
700
				files.current=files.visible-1;
-
 
701
			}
-
 
Line -... Line 651...
-
 
651
		Line_ReDraw(col_selec, files.current-files.first);
Line 702... Line -...
702
			List_ReDraw();
-
 
703
		}
-
 
704
	}
-
 
705
}
-
 
706
 
-
 
707
 
-
 
708
void List_ReDraw()
652
		old_current = files.current;
709
{
653
		return;
710
	int paint_y;
654
	}
711
	//we are in the end of the list => maximize window => there will be white lines after the last element
655
 
712
	if (files.count-files.firstfiles.visible-1)
656
	_ALL_LIST_REDRAW:
713
	{ files.first=files.count-files.visible; files.current=files.visible-1; }
657
 
Line 792... Line 736...
792
			Write_Error(errornum);
736
			Write_Error(errornum);
793
			return;
737
			return;
794
		}
738
		}
795
		maxcount = sizeof(file_mas)/sizeof(dword)-1;
739
		maxcount = sizeof(file_mas)/sizeof(dword)-1;
796
		if (files.count>maxcount) files.count = maxcount;
740
		if (files.count>maxcount) files.count = maxcount;
797
		if (files.count>0) && (files.current==-1) files.current=0;
741
		if (files.count>0) && (files.current-files.first==-1) files.current=0;
798
	}
742
	}
799
	if (files.count!=-1)
743
	if (files.count!=-1)
800
	{
744
	{
801
		if(!_not_draw)KEdit();
745
		if(!_not_draw)
-
 
746
		{
-
 
747
			PathShow.area_size_x = Form.cwidth-306;
-
 
748
			DrawBar(PathShow.start_x-3, PathShow.start_y-4, PathShow.area_size_x+2, 15, 0xFFFfff);
-
 
749
			PathShow_prepare stdcall(#PathShow);
-
 
750
			PathShow_draw stdcall(#PathShow);
-
 
751
		}
802
		HistoryPath(ADD_NEW_PATH);
752
		HistoryPath(ADD_NEW_PATH);
803
		files.visible = files.h / files.line_h;
753
		files.visible = files.h / files.line_h;
804
		if (files.count < files.visible) files.visible = files.count;
754
		if (files.count < files.visible) files.visible = files.count;
805
		if (sort_num==1) sorting_arrow_x = Form.width+60/2;
755
		if (sort_num==1) sorting_arrow_x = Form.width+60/2;
806
		if (sort_num==2) sorting_arrow_x = Form.width-115;
756
		if (sort_num==2) sorting_arrow_x = Form.width-115;
807
		if (sort_num==3) sorting_arrow_x = strlen(T_SIZE)*3-30+files.x+files.w;
757
		if (sort_num==3) sorting_arrow_x = strlen(T_SIZE)*3-30+files.x+files.w;
808
		WriteText(sorting_arrow_x,45,0x80,system.color.work_graph,"\x19");
758
		WriteText(sorting_arrow_x,45,0x80,system.color.work_graph,"\x19");
809
		if (redraw!=ONLY_SHOW) Sorting();
759
		if (redraw!=ONLY_SHOW) Sorting();
-
 
760
		list_full_redraw = true;
810
		if (redraw!=ONLY_OPEN)&&(!_not_draw) List_ReDraw();
761
		if (redraw!=ONLY_OPEN)&&(!_not_draw) List_ReDraw();
811
		DrawSystemDiscs();
762
		DrawSystemDiscs();
812
	}
763
	}
813
	if (files.count==-1) && (redraw!=ONLY_OPEN) {files.visible=files.count=0; if(!_not_draw)List_ReDraw();}
764
	if (files.count==-1) && (redraw!=ONLY_OPEN) 
-
 
765
	{
-
 
766
		files.KeyHome();
-
 
767
		if(!_not_draw) { list_full_redraw=true; List_ReDraw(); }
-
 
768
	}
814
}
769
}
Line 815... Line 770...
815
 
770
 
816
 
771
 
Line 957... Line 912...
957
	DeleteButton(302);
912
	DeleteButton(302);
958
	Open_Dir(#path,WITH_REDRAW);
913
	Open_Dir(#path,WITH_REDRAW);
959
}
914
}
Line 960... Line 915...
960
 
915
 
961
 
916
 
-
 
917
void SelectFileByName(dword that_file)
962
void SelectFile(dword that_file)
918
{
963
{
919
	int ind;
964
	files.first=files.current=0;
920
	files.KeyHome();
965
   	Open_Dir(#path,ONLY_OPEN);
921
   	Open_Dir(#path,ONLY_OPEN);
966
	if (!real_files_names_case) strttl(that_file);
922
	if (!real_files_names_case) strttl(that_file);
967
	for (i=files.count-1; i>=0; i--;)
923
	for (ind=files.count-1; ind>=0; ind--;) { if (!strcmp(file_mas[ind]*304+buf+72,that_file)) break; }
968
		if (!strcmp(file_mas[i]*304+buf+72,that_file)) break;
924
	files.current = ind - 1;
969
	List_Current(i);
925
	files.KeyDown();
Line 970... Line 926...
970
	List_ReDraw();
926
	List_ReDraw();
Line 978... Line 934...
978
	if (i==0) return;
934
	if (i==0) return;
979
	path[i]=0x00;
935
	path[i]=0x00;
980
	i = strrchr(#path, '/');
936
	i = strrchr(#path, '/');
981
	strcpy(#cur_folder, #path+i);
937
	strcpy(#cur_folder, #path+i);
982
	path[i]=0x00;
938
	path[i]=0x00;
983
	SelectFile(#cur_folder);
939
	SelectFileByName(#cur_folder);
984
}
940
}
Line 985... Line 941...
985
 
941
 
986
void Open(byte rez)
942
void Open(byte rez)
987
{
943
{
Line 1013... Line 969...
1013
 
969
 
1014
inline fastcall void GoBack()
970
inline fastcall void GoBack()
1015
{
971
{
1016
	char cur_folder[4096];
972
	char cur_folder[4096];
1017
	strcpy(#cur_folder, GetCurrentFolder());
973
	strcpy(#cur_folder, GetCurrentFolder());
1018
	if (HistoryPath(GO_BACK)) SelectFile(#cur_folder);
974
	if (HistoryPath(GO_BACK)) SelectFileByName(#cur_folder);
Line 1019... Line 975...
1019
}
975
}
1020
 
976
 
1021
void ShowOpenWithDialog()
977
void ShowOpenWithDialog()
Line 1076... Line 1032...
1076
							ShowMessage(T_DEL_ERROR_1, 150);
1032
							ShowMessage(T_DEL_ERROR_1, 150);
1077
							return;
1033
							return;
1078
						}
1034
						}
1079
						if (CreateDir(#temp)) CreateDir(#file_path);
1035
						if (CreateDir(#temp)) CreateDir(#file_path);
1080
						Open_Dir(#path,WITH_REDRAW);
1036
						Open_Dir(#path,WITH_REDRAW);
1081
						SelectFile(new_file_ed.text);
1037
						SelectFileByName(new_file_ed.text);
1082
					}
1038
					}
1083
					else
1039
					else
1084
					{
1040
					{
1085
						if (copy_rezult = CopyFile(#file_path,#temp))
1041
						if (copy_rezult = CopyFile(#file_path,#temp))
1086
						{
1042
						{
1087
							Write_Error(copy_rezult);
1043
							Write_Error(copy_rezult);
1088
						}
1044
						}
1089
						else
1045
						else
1090
						{
1046
						{
1091
							Del_File(true);
1047
							Del_File(true);
1092
							SelectFile(new_file_ed.text);
1048
							SelectFileByName(new_file_ed.text);
1093
						}
1049
						}
1094
					}
1050
					}
1095
				}
1051
				}
1096
				else
1052
				else
1097
				{
1053
				{
1098
					notify(FS_ITEM_ALREADY_EXISTS);
1054
					notify(FS_ITEM_ALREADY_EXISTS);
1099
				}
1055
				}
1100
		}
1056
		}
1101
		new_element_active = 0;
1057
		new_element_active = 0;
1102
		Open_Dir(#path,WITH_REDRAW);
1058
		Open_Dir(#path,WITH_REDRAW);
1103
		SelectFile(new_file_ed.text);
1059
		SelectFileByName(new_file_ed.text);
1104
	}
1060
	}
1105
	new_element_active = 0;
1061
	new_element_active = 0;
1106
	Open_Dir(#path,WITH_REDRAW);
1062
	Open_Dir(#path,WITH_REDRAW);
1107
}
1063
}