Subversion Repositories Kolibri OS

Rev

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

Rev 6403 Rev 6404
Line 74... Line 74...
74
	DefaultPath[4096],
74
	DefaultPath[4096],
75
	file_path[4096],
75
	file_path[4096],
76
	file_name[256],
76
	file_name[256],
77
	new_element_name[256],
77
	new_element_name[256],
78
	temp[4096],
78
	temp[4096],
-
 
79
	status_bar_str[50],
79
	itdir;
80
	itdir;
Line 80... Line 81...
80
 
81
 
Line 81... Line 82...
81
char active_path[4096], inactive_path[4096];
82
char active_path[4096], inactive_path[4096];
Line 422... Line 423...
422
									if (!i) if (!strncmp(selected_offset+33, "..", 2)) continue; //do not selec ".." directory
423
									if (!i) if (!strncmp(selected_offset+33, "..", 2)) continue; //do not selec ".." directory
423
									ESBYTE[selected_offset] = 1;
424
									ESBYTE[selected_offset] = 1;
424
									selected_count++;
425
									selected_count++;
425
								}
426
								}
426
								List_ReDraw();
427
								List_ReDraw();
-
 
428
								DrawStatusBar();
427
								break;
429
								break;
428
						case 022: //Ctrl+U - unselect all files
430
						case 022: //Ctrl+U - unselect all files
429
								for (i=0; i
431
								for (i=0; i
430
								{
432
								{
431
									selected_offset = file_mas[i]*304 + buf+32 + 7;
433
									selected_offset = file_mas[i]*304 + buf+32 + 7;
432
									ESBYTE[selected_offset] = 0;
434
									ESBYTE[selected_offset] = 0;
433
								}
435
								}
434
								selected_count = 0;
436
								selected_count = 0;
435
								List_ReDraw();
437
								List_ReDraw();
-
 
438
								DrawStatusBar();
436
								break;
439
								break;
437
					}
440
					}
438
					break;
441
					break;
439
				}
442
				}
Line 449... Line 452...
449
								break; 
452
								break; 
450
						case SCAN_CODE_TAB:
453
						case SCAN_CODE_TAB:
451
								if (!two_panels) break;
454
								if (!two_panels) break;
452
								if (active_panel==1) active_panel=2; else active_panel=1;
455
								if (active_panel==1) active_panel=2; else active_panel=1;
453
								ChangeActivePanel();
456
								ChangeActivePanel();
-
 
457
								DrawStatusBar();
454
								break;
458
								break;
455
						case 093: //menu
459
						case 093: //menu
456
								menu_call_mouse=0;
460
								menu_call_mouse=0;
457
								menu_stak = malloc(4096);
461
								menu_stak = malloc(4096);
458
								CreateThread(#FileMenu,menu_stak+4092);
462
								CreateThread(#FileMenu,menu_stak+4092);
Line 474... Line 478...
474
									selected_count++;
478
									selected_count++;
475
								}
479
								}
476
								_INSERT_END:
480
								_INSERT_END:
477
								files.KeyDown();
481
								files.KeyDown();
478
								List_ReDraw();
482
								List_ReDraw();
-
 
483
								DrawStatusBar();
479
								break;
484
								break;
480
						case 059...068: //F1-F10
485
						case 059...068: //F1-F10
481
								FnProcess(key_scancode-58);
486
								FnProcess(key_scancode-58);
482
								break; 
487
								break; 
483
						default:
488
						default:
Line 557... Line 562...
557
	DrawRectangle(0,39,Form.cwidth-1,Form.cheight - 40,col_palette[4]); //bg
562
	DrawRectangle(0,39,Form.cwidth-1,Form.cheight - 40,col_palette[4]); //bg
558
	for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]);
563
	for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]);
559
	llist_copy(#files_active, #files);
564
	llist_copy(#files_active, #files);
560
	strcpy(#active_path, #path);
565
	strcpy(#active_path, #path);
561
	DrawFilePanels();
566
	DrawFilePanels();
-
 
567
	DrawStatusBar();
562
	if (del_active) Del_Form();
568
	if (del_active) Del_Form();
563
	if (new_element_active) NewElement_Form(new_element_active, #new_element_name);
569
	if (new_element_active) NewElement_Form(new_element_active, #new_element_name);
564
}
570
}
Line 565... Line 571...
565
 
571
 
Line 577... Line 583...
577
	WriteText(sorting_arrow_x,files.y-12,0x80,col_graph,"\x19");
583
	WriteText(sorting_arrow_x,files.y-12,0x80,col_graph,"\x19");
578
	DrawBar(files.x+files.w,files.y,1,files.h,col_graph);
584
	DrawBar(files.x+files.w,files.y,1,files.h,col_graph);
579
	if (two_panels) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,col_graph);	
585
	if (two_panels) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,col_graph);	
580
}
586
}
Line -... Line 587...
-
 
587
 
-
 
588
void DrawStatusBar()
-
 
589
{
-
 
590
	DrawBar(1, Form.cheight - 18, Form.cwidth-2, 17, col_palette);
-
 
591
	sprintf(#status_bar_str, STATUS_STR, files.count, selected_count);
-
 
592
	WriteText(6,Form.cheight - 13,0x80,0x000000,#status_bar_str);
-
 
593
}
581
 
594
 
582
void DrawFilePanels()
595
void DrawFilePanels()
583
{
596
{
584
	int files_y;
597
	int files_y;
585
	if (!two_panels)
598
	if (!two_panels)
586
	{
599
	{
587
		DrawDeviceAndActionsLeftPanel();
600
		DrawDeviceAndActionsLeftPanel();
588
		files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59, files.item_h);
601
		files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 75, files.item_h);
589
		DrawList();
602
		DrawList();
590
		Open_Dir(#path,ONLY_SHOW);
603
		Open_Dir(#path,ONLY_SHOW);
591
	}
604
	}
592
	else
605
	else
Line 601... Line 614...
601
		if (active_panel==1)
614
		if (active_panel==1)
602
		{
615
		{
603
			llist_copy(#files, #files_inactive);
616
			llist_copy(#files, #files_inactive);
604
			strcpy(#path, #inactive_path);
617
			strcpy(#path, #inactive_path);
605
			col_selec = 0xCCCccc;
618
			col_selec = 0xCCCccc;
606
			files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2, files.item_h);
619
			files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2-16, files.item_h);
607
			DrawList();
620
			DrawList();
608
			Open_Dir(#path,WITH_REDRAW);
621
			Open_Dir(#path,WITH_REDRAW);
609
			llist_copy(#files, #files_active);
622
			llist_copy(#files, #files_active);
610
			strcpy(#path, #active_path);
623
			strcpy(#path, #active_path);
611
			col_selec = 0x94AECE;
624
			col_selec = 0x94AECE;
612
			files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2, files.item_h);
625
			files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2-16, files.item_h);
613
			DrawList();
626
			DrawList();
614
			Open_Dir(#path,WITH_REDRAW);
627
			Open_Dir(#path,WITH_REDRAW);
615
		}
628
		}
616
		if (active_panel==2)
629
		if (active_panel==2)
617
		{
630
		{
618
			files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2, files.item_h);
631
			files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2-16, files.item_h);
619
			DrawList();
632
			DrawList();
620
			Open_Dir(#path,WITH_REDRAW);
633
			Open_Dir(#path,WITH_REDRAW);
621
			llist_copy(#files, #files_active);
634
			llist_copy(#files, #files_active);
622
			strcpy(#path, #active_path);
635
			strcpy(#path, #active_path);
623
			col_selec = 0x94AECE;
636
			col_selec = 0x94AECE;
624
			files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2, files.item_h);
637
			files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2-16, files.item_h);
625
			DrawList();
638
			DrawList();
626
			Open_Dir(#path,WITH_REDRAW);
639
			Open_Dir(#path,WITH_REDRAW);
627
		}
640
		}
628
	}
641
	}
629
}
642
}