author | zecke <zecke> | 2002-03-22 16:59:27 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-03-22 16:59:27 (UTC) |
commit | da1430c6bd5fee39a19b294017848b95198217af (patch) (unidiff) | |
tree | 5151db04f91339abffac1fbb69ca56673f8c3918 | |
parent | 966b7c4d3a691c59b428ffba34e6e3a0149e4698 (diff) | |
download | opie-da1430c6bd5fee39a19b294017848b95198217af.zip opie-da1430c6bd5fee39a19b294017848b95198217af.tar.gz opie-da1430c6bd5fee39a19b294017848b95198217af.tar.bz2 |
make something kewl possible
-rw-r--r-- | core/launcher/launcher.cpp | 1 | ||||
-rw-r--r-- | core/launcher/launcher.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 222592b..b26bd8b 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp | |||
@@ -502,48 +502,49 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: | |||
502 | { | 502 | { |
503 | delete docsFolder; | 503 | delete docsFolder; |
504 | docsFolder = new DocLnkSet; | 504 | docsFolder = new DocLnkSet; |
505 | // find out wich filesystems are new in this round | 505 | // find out wich filesystems are new in this round |
506 | // We will do this by having a timestamp inside each mountpoint | 506 | // We will do this by having a timestamp inside each mountpoint |
507 | // if the current timestamp doesn't match this is a new file system and | 507 | // if the current timestamp doesn't match this is a new file system and |
508 | // come up with our MediumMountGui :) let the hacking begin | 508 | // come up with our MediumMountGui :) let the hacking begin |
509 | QString newStamp = QDateTime::currentDateTime().toString(); | 509 | QString newStamp = QDateTime::currentDateTime().toString(); |
510 | StorageInfo storage; | 510 | StorageInfo storage; |
511 | const QList<FileSystem> &fileSystems = storage.fileSystems(); | 511 | const QList<FileSystem> &fileSystems = storage.fileSystems(); |
512 | QListIterator<FileSystem> it ( fileSystems ); | 512 | QListIterator<FileSystem> it ( fileSystems ); |
513 | for ( ; it.current(); ++it ) { | 513 | for ( ; it.current(); ++it ) { |
514 | if ( (*it)->isRemovable() ) { // let's find out if we should search on it | 514 | if ( (*it)->isRemovable() ) { // let's find out if we should search on it |
515 | OConfig cfg( (*it)->path() + "/.opiestorage.cf"); | 515 | OConfig cfg( (*it)->path() + "/.opiestorage.cf"); |
516 | cfg.setGroup("main"); | 516 | cfg.setGroup("main"); |
517 | QString stamp = cfg.readEntry("timestamp", QDateTime::currentDateTime().toString() ); | 517 | QString stamp = cfg.readEntry("timestamp", QDateTime::currentDateTime().toString() ); |
518 | if( stamp == m_timeStamp ){ // ok we know this card | 518 | if( stamp == m_timeStamp ){ // ok we know this card |
519 | cfg.writeEntry("timestamp", newStamp ); | 519 | cfg.writeEntry("timestamp", newStamp ); |
520 | // we need to scan the list now. Hopefully the cache will be there | 520 | // we need to scan the list now. Hopefully the cache will be there |
521 | }else{ // come up with the gui | 521 | }else{ // come up with the gui |
522 | MediumMountGui medium((*it)->path() + "/.opiestorage.cf" ); | 522 | MediumMountGui medium((*it)->path() + "/.opiestorage.cf" ); |
523 | if( medium.check() ){ | 523 | if( medium.check() ){ |
524 | if( medium.exec() ){ //ok | 524 | if( medium.exec() ){ //ok |
525 | // speicher | 525 | // speicher |
526 | cfg.writeEntry("timestamp", newStamp ); | ||
526 | } | 527 | } |
527 | }else{ | 528 | }else{ |
528 | // do something different see what we need to do | 529 | // do something different see what we need to do |
529 | } | 530 | } |
530 | } | 531 | } |
531 | } | 532 | } |
532 | } | 533 | } |
533 | Global::findDocuments(docsFolder); // get rid of this call later | 534 | Global::findDocuments(docsFolder); // get rid of this call later |
534 | m_timeStamp = newStamp; | 535 | m_timeStamp = newStamp; |
535 | } | 536 | } |
536 | 537 | ||
537 | void Launcher::updateTabs() | 538 | void Launcher::updateTabs() |
538 | { | 539 | { |
539 | MimeType::updateApplications(); // ### reads all applnks twice | 540 | MimeType::updateApplications(); // ### reads all applnks twice |
540 | 541 | ||
541 | delete rootFolder; | 542 | delete rootFolder; |
542 | rootFolder = new AppLnkSet( MimeType::appsFolderName() ); | 543 | rootFolder = new AppLnkSet( MimeType::appsFolderName() ); |
543 | 544 | ||
544 | loadDocs(); | 545 | loadDocs(); |
545 | 546 | ||
546 | tabs->initializeCategories(rootFolder, docsFolder, storage->fileSystems()); | 547 | tabs->initializeCategories(rootFolder, docsFolder, storage->fileSystems()); |
547 | } | 548 | } |
548 | 549 | ||
549 | void Launcher::updateDocs() | 550 | void Launcher::updateDocs() |
diff --git a/core/launcher/launcher.h b/core/launcher/launcher.h index 00ae980..197bd19 100644 --- a/core/launcher/launcher.h +++ b/core/launcher/launcher.h | |||
@@ -110,27 +110,29 @@ signals: | |||
110 | private slots: | 110 | private slots: |
111 | void doMaximize(); | 111 | void doMaximize(); |
112 | void systemMessage( const QCString &, const QByteArray &); | 112 | void systemMessage( const QCString &, const QByteArray &); |
113 | void storageChanged(); | 113 | void storageChanged(); |
114 | void cancelSync(); | 114 | void cancelSync(); |
115 | 115 | ||
116 | private: | 116 | private: |
117 | void updateApps(); | 117 | void updateApps(); |
118 | void loadDocs(); | 118 | void loadDocs(); |
119 | void updateDocs(); | 119 | void updateDocs(); |
120 | void updateTabs(); | 120 | void updateTabs(); |
121 | void updateMimeTypes(); | 121 | void updateMimeTypes(); |
122 | void updateMimeTypes(AppLnkSet*); | 122 | void updateMimeTypes(AppLnkSet*); |
123 | void preloadApps(); | 123 | void preloadApps(); |
124 | AppLnkSet *rootFolder; | 124 | AppLnkSet *rootFolder; |
125 | DocLnkSet *docsFolder; | 125 | DocLnkSet *docsFolder; |
126 | CategoryTabWidget *tabs; | 126 | CategoryTabWidget *tabs; |
127 | StorageInfo *storage; | 127 | StorageInfo *storage; |
128 | SyncDialog *syncDialog; | 128 | SyncDialog *syncDialog; |
129 | 129 | ||
130 | void updateLink(const QString& link); | 130 | void updateLink(const QString& link); |
131 | bool in_lnk_props; | 131 | bool in_lnk_props; |
132 | bool got_lnk_change; | 132 | bool got_lnk_change; |
133 | QString lnk_change; | 133 | QString lnk_change; |
134 | QString m_timeStamp; | ||
134 | }; | 135 | }; |
135 | 136 | ||
136 | #endif // LAUNCHERVIEW_H | 137 | #endif // LAUNCHERVIEW_H |
138 | |||