Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5976 → Rev 5977

/programs/cmm/eolite/Eolite.c
19,6 → 19,8
//obj
#include "..\lib\obj\libini.h"
#include "..\lib\obj\box_lib.h"
//patterns
#include "..\lib\patterns\history.h"
 
byte CMD_ENABLE_SAVE_IMG = false;
 
104,7 → 106,6
#include "include\sorting.h"
#include "include\icons.h"
#include "include\left_panel.h"
#include "include\history.h"
#include "include\menu.h"
#include "include\about.h"
#include "include\properties.h"
170,8 → 171,9
{
if (dif_x > 150)
{
if (FoldersHistory.forward())
if (History.forward())
{
strcpy(#path, History.current());
files.KeyHome();
Open_Dir(#path,WITH_REDRAW);
}
323,8 → 325,9
GoBack();
break;
case 22: //Forward
if (FoldersHistory.forward())
if (History.forward())
{
strcpy(#path, History.current());
files.KeyHome();
Open_Dir(#path,WITH_REDRAW);
}
735,7 → 738,7
if (ESBYTE[dir_path+1]!='\0') chrcat(dir_path, '/');
if (errornum)
{
FoldersHistory.add();
History.add(#path);
GoBack();
Write_Error(errornum);
return;
753,7 → 756,7
PathShow_prepare stdcall(#PathShow);
PathShow_draw stdcall(#PathShow);
}
FoldersHistory.add();
History.add(#path);
files.visible = files.h / files.item_h;
if (files.count < files.visible) files.visible = files.count;
if (redraw!=ONLY_SHOW) Sorting();
1001,8 → 1004,11
char cur_folder[4096];
strcpy(#cur_folder, #path);
cur_folder[strlen(#cur_folder)-1]=0x00; //delete last '/'
if (FoldersHistory.back()) SelectFileByName(#cur_folder+strrchr(#cur_folder,'/'));
if (History.back()) {
strcpy(#path, History.current());
SelectFileByName(#cur_folder+strrchr(#cur_folder,'/'));
}
}
 
void ShowOpenWithDialog()
{
/programs/cmm/eolite/include/history.h
File deleted
\ No newline at end of file
/programs/cmm/lib/collection.h
12,7 → 12,6
dword get();
void drop();
void increase_data_size();
 
};
 
void collection::increase_data_size() {
/programs/cmm/lib/patterns/history.h
0,0 → 1,38
#include "..\lib\collection.h"
 
struct _History {
collection items;
int active;
dword add();
dword back();
dword forward();
dword current();
} History;
 
dword _History::add(dword in)
{
if (!strcmp(in, items.get(active-1))) return 0;
items.count = active;
items.add(in);
active++;
return 1;
}
dword _History::back()
{
if (active==1) return 0;
active--;
return items.get(active-1);
}
 
dword _History::forward()
{
if (active==items.count) return 0;
active++;
return items.get(active-1);
}
 
dword _History::current()
{
return items.get(active-1);
}