Subversion Repositories Kolibri OS

Rev

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

Rev 2596 Rev 2833
Line 1... Line 1...
1
//06.04.2012
1
//06.04.2012
Line 2... Line -...
2
 
-
 
3
#define MAX_HISTORY_NUM 40
2
 
4
path_string history_list[MAX_HISTORY_NUM];
3
path_string history_list[40];
5
int history_num;
4
int history_num;
Line 6... Line 5...
6
int history_current;
5
int history_current;
7
 
6
 
8
#define add_new_path 1
7
#define ADD_NEW_PATH 1
Line 9... Line 8...
9
#define go_back 2
8
#define GO_BACK      2
10
#define go_forward 3
9
#define GO_FORWARD   3
11
 
10
 
12
dword GetCurrentFolder()
11
dword GetCurrentFolder()
Line 18... Line 17...
18
	return #cur_fol;
17
	return #cur_fol;
19
}
18
}
Line 20... Line 19...
20
 
19
 
21
void HistoryPath(byte action)
20
void HistoryPath(byte action)
-
 
21
{
-
 
22
	int MAX_HISTORY_NUM;
22
{
23
	
23
	if (action==add_new_path)
24
	if (action==ADD_NEW_PATH)
24
	{
25
	{
Line -... Line 26...
-
 
26
		if (history_num>0) && (!strcmp(#path,#history_list[history_current].Item)) return;
25
		if (history_num>0) && (strcmp(#path,#history_list[history_current].Item)==0) return;
27
		
26
			
28
		MAX_HISTORY_NUM = sizeof(history_list)/sizeof(path_string);
27
		if (history_current>=MAX_HISTORY_NUM-1)
29
		if (history_current>=MAX_HISTORY_NUM-1)
28
		{
30
		{
29
			history_current/=2;
31
			history_current/=2;
Line 35... Line 37...
35
		history_current++;
37
		history_current++;
36
		copystr(#path,#history_list[history_current].Item);
38
		copystr(#path,#history_list[history_current].Item);
37
		history_num=history_current;
39
		history_num=history_current;
38
	}
40
	}
Line 39... Line 41...
39
	
41
	
40
	if (action==go_back)
42
	if (action==GO_BACK)
41
	{
43
	{
42
		if (history_current<=2) return;
44
		if (history_current<=2) return;
43
		history_current--;
45
		history_current--;
44
		copystr(#history_list[history_current].Item,#path);
46
		copystr(#history_list[history_current].Item,#path);
Line 45... Line 47...
45
	}
47
	}
46
 
48
 
47
	if (action==go_forward)
49
	if (action==GO_FORWARD)
48
	{
50
	{
49
		if (history_current==history_num) return;
51
		if (history_current==history_num) return;
50
		history_current++;
-
 
51
		copystr(#history_list[history_current].Item,#path);
52
		history_current++;
52
		SelectFile("");
53
		copystr(#history_list[history_current].Item,#path);
53
	}	
54
	}