Subversion Repositories Kolibri OS

Rev

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

Rev 8872 Rev 8881
Line 1... Line 1...
1
//Leency, Veliant, Punk_Joker, PavelYakov & KolibriOS Team 2008-2021
1
//Leency, Veliant, Punk_Joker, PavelYakov & KolibriOS Team 2008-2021
2
//GNU GPL license.
2
//GNU GPL license.
Line 3... Line 3...
3
 
3
 
Line 4... Line 4...
4
// 70.5 - get volume info and label
4
// 70.5 - get volume info and label
5
 
5
 
6
#define ABOUT_TITLE "EOLITE 5 Beta5"
6
#define ABOUT_TITLE "EOLITE 5 Beta6"
7
#define TITLE_EOLITE "Eolite File Manager 5 Beta5"
-
 
8
#define TITLE_KFM "Kolibri File Manager 2 Beta5";
-
 
9
 
-
 
10
#ifndef AUTOBUILD
-
 
Line 11... Line -...
11
#include "lang.h--"
-
 
12
#endif
7
#define TITLE_EOLITE "Eolite File Manager 5 Beta6"
13
 
8
#define TITLE_KFM "Kolibri File Manager 2 Beta6";
14
//libraries
9
 
15
#define MEMSIZE 1024 * 250
10
#define MEMSIZE 1024 * 250
16
#include "../lib/clipboard.h"
11
#include "../lib/clipboard.h"
Line 45... Line 40...
45
	BACK_BTN = 400,
40
	BACK_BTN = 400,
46
	FWRD_BTN,
41
	FWRD_BTN,
47
	GOUP_BTN,
42
	GOUP_BTN,
48
	COPY_BTN,
43
	COPY_BTN,
49
	CUT_BTN,
44
	CUT_BTN,
50
	PASTE_BTN
45
	PASTE_BTN,
-
 
46
	KFM_FUNC_ID = 450
51
};
47
};
Line 52... Line 48...
52
 
48
 
53
//NewElement options
49
//NewElement options
54
enum {
50
enum {
Line 139... Line 135...
139
libimg_image icons16_selected;
135
libimg_image icons16_selected;
Line 140... Line 136...
140
 
136
 
141
libimg_image icons32_default;
137
libimg_image icons32_default;
Line 142... Line -...
142
libimg_image icons32_selected;
-
 
143
 
138
libimg_image icons32_selected;
Line 144... Line 139...
144
#define STATUS_BAR_H 16;
139
 
Line 145... Line 140...
145
int status_bar_h = 0;
140
int status_bar_h;
146
 
141
 
Line 405... Line 400...
405
					EventDriveClick(id);
400
					EventDriveClick(id);
406
					break;
401
					break;
407
				case BREADCRUMB_ID...360:
402
				case BREADCRUMB_ID...360:
408
					ClickOnBreadCrumb(id-BREADCRUMB_ID);
403
					ClickOnBreadCrumb(id-BREADCRUMB_ID);
409
					break;
404
					break;
-
 
405
				case KFM_FUNC_ID...KFM_FUNC_ID+10:
-
 
406
					FnProcess(id-KFM_FUNC_ID);
-
 
407
					break;
410
			}
408
			}
411
			break;
409
			break;
Line 412... Line 410...
412
			
410
			
413
//Key pressed-----------------------------------------------------------------------------
411
//Key pressed-----------------------------------------------------------------------------
Line 574... Line 572...
574
{
572
{
575
	dword i=0;
573
	dword i=0;
576
	incn x;
574
	incn x;
577
	dword title;
575
	dword title;
578
	if (show_status_bar.checked) {
576
	if (show_status_bar.checked) {
-
 
577
		#define STBAR_EOLITE_H 16;
-
 
578
		#define STBAR_KFM_H 21;
-
 
579
		if (efm) status_bar_h = STBAR_KFM_H;
579
		status_bar_h = STATUS_BAR_H; 
580
		else status_bar_h = STBAR_EOLITE_H;
580
	} else {
581
	} else {
581
		status_bar_h = 0;
582
		status_bar_h = 0;
582
	}
583
	}
583
	if (efm) title = TITLE_KFM; else title = TITLE_EOLITE;
584
	if (efm) title = TITLE_KFM; else title = TITLE_EOLITE;
584
	DefineAndDrawWindow(Form.left+rand_n,Form.top+rand_n,Form.width,Form.height,0x73,NULL,title,0);
585
	DefineAndDrawWindow(Form.left+rand_n,Form.top+rand_n,Form.width,Form.height,0x73,NULL,title,0);
Line 648... Line 649...
648
	WriteText(sorting_arrow_x,files.y-12,0x80, sc.work_text, sorting_arrow_t);
649
	WriteText(sorting_arrow_x,files.y-12,0x80, sc.work_text, sorting_arrow_t);
649
	DrawBar(files.x+files.w,files.y,1,files.h,sc.work_graph);
650
	DrawBar(files.x+files.w,files.y,1,files.h,sc.work_graph);
650
	if (efm) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,sc.work_graph);	
651
	if (efm) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,sc.work_graph);	
651
}
652
}
Line -... Line 653...
-
 
653
 
-
 
654
void DrawFuncButtonsInKfm()
-
 
655
{
-
 
656
	int i, x=0, len, min_w=0, padding;
-
 
657
	for (i=0; i<10; i++) min_w += strlen(kfm_func[i])*6 + 2;
-
 
658
	padding = Form.cwidth - min_w + 4 / 10;
-
 
659
	for (i=0; i<10; i++) {
-
 
660
		len = strlen(kfm_func[i])*6 + padding;
-
 
661
		if (i==9) len = Form.cwidth - x - 3;
-
 
662
		DrawFlatButtonSmall(x+1, Form.cheight - 19, len, 16, i+KFM_FUNC_ID+1, kfm_func[i]);
-
 
663
		x += len + 2;
-
 
664
	}
-
 
665
}
652
 
666
 
653
void DrawStatusBar()
667
void DrawStatusBar()
654
{
668
{
655
	char status_bar_str[80];
669
	char status_bar_str[80];
Line 656... Line 670...
656
	int go_up_folder_exists=0;
670
	int go_up_folder_exists=0;
657
 
671
 
658
	if (efm) { 
672
	if (efm) { 
659
		DrawBar(0, Form.cheight - status_bar_h, Form.cwidth,  status_bar_h, sc.work);
673
		DrawBar(0, Form.cheight - status_bar_h, Form.cwidth,  status_bar_h, sc.work);
660
		WriteTextCenter(0,Form.cheight - 12, Form.cwidth,sc.work_text,T_KFM_FUNC);
674
		DrawFuncButtonsInKfm();
Line 661... Line 675...
661
		return;
675
		return;
662
	}
676
	}