Subversion Repositories Kolibri OS

Rev

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

Rev 6278 Rev 6289
Line 26... Line 26...
26
#include "imgs\icons.txt"
26
#include "imgs\icons.txt"
Line 27... Line 27...
27
 
27
 
28
//Button IDs
28
//Button IDs
29
enum {
29
enum {
30
	POPUP_BTN1 = 201,
30
	POPUP_BTN1 = 201,
-
 
31
	POPUP_BTN2 = 202,
31
	POPUP_BTN2 = 202
32
	BREADCRUMB_ID = 300
Line 32... Line 33...
32
};
33
};
33
 
34
 
34
//NewElement options
35
//NewElement options
Line 96... Line 97...
96
int sort_num=2,
97
int sort_num=2,
97
	show_dev_name=true,
98
	show_dev_name=true,
98
	real_files_names_case=false,
99
	real_files_names_case=false,
99
	info_after_copy=false,
100
	info_after_copy=false,
100
	two_panels=false,
101
	two_panels=false,
-
 
102
	show_breadcrumb=false,
101
	active_panel=1;
103
	active_panel=1;
102
//} settings;
104
//} settings;
Line 103... Line 105...
103
 
105
 
104
edit_box new_file_ed = {171,213,180,0xFFFFFF,0x94AECE,0xFFFFFF,0xFFFFFF,0,248,#new_element_name,#mouse_dd,100000000000010b,6,0};
-
 
105
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0};
106
edit_box new_file_ed = {171,213,180,0xFFFFFF,0x94AECE,0xFFFFFF,0xFFFFFF,0,248,#new_element_name,#mouse_dd,100000000000010b,6,0};
106
PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0};
107
PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0};
107
byte cmd_free=0;
108
byte cmd_free=0;
108
#include "include\translations.h"
109
#include "include\translations.h"
Line 120... Line 121...
120
#include "include\left_panel.h"
121
#include "include\left_panel.h"
121
#include "include\menu.h"
122
#include "include\menu.h"
122
#include "include\delete.h"
123
#include "include\delete.h"
123
#include "include\about.h"
124
#include "include\about.h"
124
#include "include\properties.h"
125
#include "include\properties.h"
-
 
126
#include "include\breadcrumbs.h"
Line 125... Line 127...
125
 
127
 
126
void main() 
128
void main() 
127
{
129
{
128
	word id;
130
	dword id;
129
	byte count_sl = 0;
131
	byte count_sl = 0;
130
	signed x_old, y_old, dif_x, dif_y, adif_x, adif_y;
132
	signed x_old, y_old, dif_x, dif_y, adif_x, adif_y;
131
	char can_show, can_select, stats;
133
	char can_show, can_select, stats;
132
	dword selected_offset;
134
	dword selected_offset;
Line 341... Line 343...
341
						if (del_active) Del_File(id-POPUP_BTN2);
343
						if (del_active) Del_File(id-POPUP_BTN2);
342
						if (new_element_active) NewElement(id-POPUP_BTN2);
344
						if (new_element_active) NewElement(id-POPUP_BTN2);
343
						DeleteButton(POPUP_BTN1);
345
						DeleteButton(POPUP_BTN1);
344
						DeleteButton(POPUP_BTN2);
346
						DeleteButton(POPUP_BTN2);
345
						break;
347
						break;
-
 
348
					case BREADCRUMB_ID...400:
-
 
349
						ClickOnBreadCrumb(id-BREADCRUMB_ID);
-
 
350
						break;
346
				}
351
				}
347
				break;
352
				break;
348
	//Key pressed-----------------------------------------------------------------------------
353
	//Key pressed-----------------------------------------------------------------------------
349
			case evKey:
354
			case evKey:
350
				GetKeys();
355
				GetKeys();
Line 537... Line 542...
537
	GetProcessInfo(#Form, SelfInfo); //if win_size changed
542
	GetProcessInfo(#Form, SelfInfo); //if win_size changed
538
	PutPaletteImage(#toolbar,246,34,0,0,8,#toolbar_pal);
543
	PutPaletteImage(#toolbar,246,34,0,0,8,#toolbar_pal);
539
	DrawBar(127, 8, 1, 25, col_graph);
544
	DrawBar(127, 8, 1, 25, col_graph);
540
	for (j=0; j<3; j++) DefineButton(toolbar_buttons_x[j]+2,5+2,31-5,29-5,21+j+BT_HIDE,NULL);
545
	for (j=0; j<3; j++) DefineButton(toolbar_buttons_x[j]+2,5+2,31-5,29-5,21+j+BT_HIDE,NULL);
541
	for (j=3; j<6; j++) DefineButton(toolbar_buttons_x[j],5,31,29,21+j+BT_HIDE,NULL);
546
	for (j=3; j<6; j++) DefineButton(toolbar_buttons_x[j],5,31,29,21+j+BT_HIDE,NULL);
542
	DrawBar(246,0, Form.cwidth - 297,12, col_work); //upper editbox
547
	DrawBar(246,0, Form.cwidth - 246, 34, col_work);
543
	DrawBar(246,29,Form.cwidth - 297,5,  col_work); //lower editbox
548
	if (!show_breadcrumb) {
544
	DrawRectangle(246,12,Form.cwidth - 303,16,col_graph);
549
		DrawRectangle(246,12,Form.cwidth - 303,16,col_graph);
545
	DefineButton(Form.cwidth - 32,6,27,28,51+BT_HIDE+BT_NOFRAME,0); //about
550
		DefineButton(Form.cwidth - 32,6,27,28,51+BT_HIDE+BT_NOFRAME,0); //about
546
	PutPaletteImage(#goto_about,56,34,Form.width-65,0,8,#goto_about_pal);
551
		PutPaletteImage(#goto_about,56,34,Form.width-65,0,8,#goto_about_pal);
-
 
552
	}
547
	//main rectangles
553
	//main rectangles
548
	DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42,col_graph);
554
	DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42,col_graph);
549
	DrawRectangle(0,39,Form.cwidth-1,Form.cheight - 40,col_palette[4]); //bg
555
	DrawRectangle(0,39,Form.cwidth-1,Form.cheight - 40,col_palette[4]); //bg
550
	for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]);
556
	for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]);
551
	llist_copy(#files_active, #files);
557
	llist_copy(#files_active, #files);
Line 751... Line 757...
751
		if (files.count>maxcount) files.count = maxcount;
757
		if (files.count>maxcount) files.count = maxcount;
752
		if (files.count>0) && (files.cur_y-files.first==-1) files.cur_y=0;
758
		if (files.count>0) && (files.cur_y-files.first==-1) files.cur_y=0;
753
	}
759
	}
754
	if (files.count!=-1)
760
	if (files.count!=-1)
755
	{
761
	{
756
		if(!_not_draw)
-
 
757
		{
-
 
758
			PathShow.area_size_x = Form.cwidth-306;
-
 
759
			DrawBar(PathShow.start_x-3, PathShow.start_y-4, PathShow.area_size_x+2, 15, 0xFFFfff);
762
		if(!_not_draw) if (show_breadcrumb) DrawBreadCrumbs(); else DrawPathBar();
760
			PathShow_prepare stdcall(#PathShow);
-
 
761
			PathShow_draw stdcall(#PathShow);
-
 
762
		}
-
 
763
		history.add(#path);
763
		history.add(#path);
764
		SystemDiscs.Draw();
764
		SystemDiscs.Draw();
765
		files.visible = files.h / files.item_h;
765
		files.visible = files.h / files.item_h;
766
		if (files.count < files.visible) files.visible = files.count;
766
		if (files.count < files.visible) files.visible = files.count;
767
		if (redraw!=ONLY_SHOW) Sorting();
767
		if (redraw!=ONLY_SHOW) Sorting();