Boolean DateiManager::treeExpanded (IContainerObject *o, IContainerControl *c) { disableUpdate (); Links.deleteTree (o); HDIR h = HDIR_CREATE; FILEFINDBUF3 b; ULONG Attribute = MUST_HAVE_DIRECTORY; ULONG n = 1; APIRET e; Verzeichnis *v = (Verzeichnis *)o; e = DosFindFirst (v->path () + "\\*.*", &h, Attribute, &b, sizeof (b), &n, FIL_STANDARD); while ( e == 0 ) { if ( IString (b.achName) != "." && IString (b.achName) != ".." ) { Verzeichnis *neu = new Verzeichnis (v->path () + "\\" + b.achName); c->addObject (neu, o); c->addObject (new Verzeichnis ("dummy"), neu); } e = DosFindNext (h, &b, sizeof (b), &n); } DosFindClose (h); enableUpdate (); return true; }
Boolean DateiManager::treeCollapsed (IContainerObject *o, IContainerControl *c) { disableUpdate (); Links.deleteTree (o); Links.addObject (new Verzeichnis ("dummy"), o); enableUpdate (); return true; }
void Detail::zeige (IString const &d) { disableUpdate (); deleteAllObjects (); HDIR h = HDIR_CREATE; FILEFINDBUF3 b; ULONG Attribute = FILE_DIRECTORY|FILE_SYSTEM|FILE_HIDDEN|FILE_READONLY; ULONG n = 1; APIRET e; e = DosFindFirst (d + "\\*.*", &h, Attribute, &b, sizeof (b), &n, FIL_STANDARD); while ( e == 0 ) { addObject (new Datei (d + "\\" + b.achName)); e = DosFindNext (h, &b, sizeof (b), &n); } DosFindClose (h); sortByIconText (); enableUpdate (); }
bool Notifier::disableAll() { return disableUpdate() && disableCommit() && disableRollback(); }