| 435 |
435 |
| 436 // ============================================================================= |
436 // ============================================================================= |
| 437 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
437 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
| 438 // ============================================================================= |
438 // ============================================================================= |
| 439 void addRecentFile (str path) { |
439 void addRecentFile (str path) { |
| 440 size_t pos = io_recentfiles.value.first (path); |
440 long pos = io_recentfiles.value.first (path); |
| 441 |
441 |
| 442 // If this file already is in the list, pop it out. |
442 // If this file already is in the list, pop it out. |
| 443 if (pos != npos) { |
443 if (pos != -1) { |
| 444 if (~io_recentfiles.value == ~path) |
444 if (~io_recentfiles.value == ~path) |
| 445 return; // only recent file - do nothing |
445 return; // only recent file - do nothing |
| 446 |
446 |
| 447 // Pop it out. |
447 // Pop it out. |
| 448 str front = io_recentfiles.value.substr (0, pos); |
448 str front = io_recentfiles.value.substr (0, pos); |