Subversion Repositories Kolibri OS

Rev

Rev 3363 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1.  
  2. struct _FoldersHistory {
  3.         collection history;
  4.         int history_current;   
  5.         int add();
  6.         int back();
  7.         int forward();
  8. } FoldersHistory;
  9.  
  10. int _FoldersHistory::add()
  11. {
  12.         if (!strcmp(#path, history.get(history_current-1))) return 0;
  13.         history.count = history_current;
  14.         history.add(#path);
  15.         history_current++;
  16.         return 1;
  17. }
  18.        
  19. int _FoldersHistory::back()
  20. {
  21.         if (history_current==1) return 0;
  22.         history_current--;
  23.         strcpy(#path, history.get(history_current-1));
  24.         debugln(#path);
  25.         return 1;
  26. }
  27.  
  28. int _FoldersHistory::forward()
  29. {
  30.         if (history_current==history.count) return 0;
  31.         history_current++;
  32.         strcpy(#path, history.get(history_current-1));
  33.         debugln(#path);
  34.         return 1;
  35. }