Exemplo n.º 1
0
 void fileAdded(File const &file, FileIndex const &)
 {
     GameStateFolder const &saveFolder = file.as<GameStateFolder>();
     if (shouldAddFolder(saveFolder))
     {
         mainCall.enqueue([this, &saveFolder] ()
         {
             // Needs to be added.
             self().append(new SaveItem(saveFolder));
         });
     }
 }
Exemplo n.º 2
0
 void fileRemoved(File const &, FileIndex const &)
 {
     // Remove obsolete entries.
     mainCall.enqueue([this] ()
     {
         for (ui::Data::Pos idx = self().size() - 1; idx < self().size(); --idx)
         {
             if (!self().at(idx).isValid())
             {
                 self().remove(idx);
             }
         }
     });
 }