2012-04-08 00:09:46 +02:00
|
|
|
|
//06.04.2012
|
|
|
|
|
|
|
|
|
|
path_string history_list[40];
|
|
|
|
|
int history_num;
|
|
|
|
|
int history_current;
|
|
|
|
|
|
|
|
|
|
#define add_new_path 1
|
|
|
|
|
#define go_back 2
|
2012-04-09 00:01:35 +02:00
|
|
|
|
#define go_forward 3
|
2012-04-08 00:09:46 +02:00
|
|
|
|
|
|
|
|
|
dword GetCurrentFolder()
|
|
|
|
|
{
|
|
|
|
|
char cur_fol[4096];
|
|
|
|
|
copystr(#path,#cur_fol);
|
|
|
|
|
cur_fol[strlen(#cur_fol)-1]=0x00; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> /
|
|
|
|
|
copystr(#cur_fol+find_symbol(#cur_fol,'/'),#cur_fol);
|
|
|
|
|
return #cur_fol;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void HistoryPath(byte action)
|
|
|
|
|
{
|
2012-04-09 00:01:35 +02:00
|
|
|
|
/*WriteDebug("");
|
|
|
|
|
WriteDebug(IntToStr(history_current));
|
|
|
|
|
for (i=0; i<history_num; i++;)
|
|
|
|
|
{
|
|
|
|
|
WriteDebug(#history_list[i].Item);
|
|
|
|
|
WriteDebug(IntToStr(history_num));
|
|
|
|
|
}*/
|
|
|
|
|
|
2012-04-08 00:09:46 +02:00
|
|
|
|
if (action==add_new_path)
|
|
|
|
|
{
|
2012-04-09 00:01:35 +02:00
|
|
|
|
if (history_num>0) && (strcmp(#path,#history_list[history_current].Item)==0) return;
|
|
|
|
|
history_current++;
|
|
|
|
|
copystr(#path,#history_list[history_current].Item);
|
|
|
|
|
history_num=history_current;
|
2012-04-08 00:09:46 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (action==go_back)
|
|
|
|
|
{
|
2012-04-09 00:01:35 +02:00
|
|
|
|
if (history_current<=2) return;
|
|
|
|
|
WriteDebug("");
|
|
|
|
|
WriteDebug("Fuck!");
|
|
|
|
|
history_current--;
|
|
|
|
|
copystr(#history_list[history_current].Item,#path);
|
2012-04-08 00:09:46 +02:00
|
|
|
|
}
|
|
|
|
|
|
2012-04-09 00:01:35 +02:00
|
|
|
|
if (action==go_forward)
|
2012-04-08 00:09:46 +02:00
|
|
|
|
{
|
2012-04-09 00:01:35 +02:00
|
|
|
|
if (history_current==history_num) return;
|
|
|
|
|
history_current++;
|
|
|
|
|
copystr(#history_list[history_current].Item,#path);
|
2012-04-08 00:09:46 +02:00
|
|
|
|
SelectFile("");
|
|
|
|
|
}
|
|
|
|
|
}
|