author | zecke <zecke> | 2002-03-22 23:09:26 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-03-22 23:09:26 (UTC) |
commit | 5c17e8b168cf27ac2922e7c118cb886b116eab42 (patch) (side-by-side diff) | |
tree | 5ba4ad0f08f9e93c62b95545d97a462f6924e45c | |
parent | 232a5bed633ba2aa96fcab73ff991ab3a796ad76 (diff) | |
download | opie-5c17e8b168cf27ac2922e7c118cb886b116eab42.zip opie-5c17e8b168cf27ac2922e7c118cb886b116eab42.tar.gz opie-5c17e8b168cf27ac2922e7c118cb886b116eab42.tar.bz2 |
make some people happy update
-rw-r--r-- | core/launcher/launcher.cpp | 1 | ||||
-rw-r--r-- | core/launcher/mediummountgui.cpp | 1 | ||||
-rw-r--r-- | libopie/oconfig.h | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index dcc3ba1..1c38a05 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp @@ -516,64 +516,65 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: // if the current timestamp doesn't match this is a new file system and // come up with our MediumMountGui :) let the hacking begin int stamp = uidgen.generate(); QString newStamp = QString::number( stamp ); qWarning("new time stamp is: %s", newStamp.latin1() ); StorageInfo storage; const QList<FileSystem> &fileSystems = storage.fileSystems(); qWarning("QList<FileSystem>" ); QListIterator<FileSystem> it ( fileSystems ); qWarning("iterator initiliazed" ); for ( ; it.current(); ++it ) { qWarning("inside for loop" ); qWarning("checking device %s", (*it)->path().latin1() ); if ( (*it)->isRemovable() ) { // let's find out if we should search on it qWarning("%s is removeable", (*it)->path().latin1() ); OConfig cfg( (*it)->path() + "/.opiestorage.cf"); cfg.setGroup("main"); QString stamp = cfg.readEntry("timestamp", QDateTime::currentDateTime().toString() ); if( stamp == m_timeStamp ){ // ok we know this card qWarning("time stamp match" ); cfg.writeEntry("timestamp", newStamp ); // we need to scan the list now. Hopefully the cache will be there }else{ // come up with the gui qWarning("time stamp doesn't match" ); MediumMountGui medium((*it)->path() ); qWarning("medium mount gui created" ); if( medium.check() ){ qWarning("need to check this device" ); if( medium.exec() ){ //ok // speicher qWarning("execed" ); + cfg.read(); cfg.writeEntry("timestamp", newStamp ); } }else{ qWarning("wrong :(" ); // do something different see what we need to do } } } } qWarning("findDocuments" ); Global::findDocuments(docsFolder); // get rid of this call later qWarning("done" ); m_timeStamp = newStamp; } void Launcher::updateTabs() { MimeType::updateApplications(); // ### reads all applnks twice delete rootFolder; rootFolder = new AppLnkSet( MimeType::appsFolderName() ); loadDocs(); tabs->initializeCategories(rootFolder, docsFolder, storage->fileSystems()); } void Launcher::updateDocs() { loadDocs(); tabs->updateDocs(docsFolder,storage->fileSystems()); } diff --git a/core/launcher/mediummountgui.cpp b/core/launcher/mediummountgui.cpp index 5225711..e3fa5bd 100644 --- a/core/launcher/mediummountgui.cpp +++ b/core/launcher/mediummountgui.cpp @@ -71,64 +71,65 @@ void MediumMountGui::writeConfig(bool autocheck) { cfg.setGroup("mimetypes"); cfg.writeEntry("audio", CheckBoxAudio->isChecked() ); cfg.writeEntry("image",CheckBoxImage->isChecked() ); cfg.writeEntry("text",CheckBoxImage->isChecked() ); cfg.writeEntry("video",CheckBoxVideo->isChecked() ); cfg.writeEntry("all",CheckBoxAll->isChecked() ); cfg.setGroup("dirs"); cfg.writeEntry("dirs", ""); // if all is checked then add only "null" to the list. if (checkmimeall) { mimeTypeList += ("null"); } else { if (checkmimeaudio) { mimeTypeList += ("audio//*"); } if (checkmimetext) { mimeTypeList += ("text//*"); } if (checkmimevideo) { mimeTypeList += ("video//*"); } if (checkmimeimage) { mimeTypeList += ("image//*"); } if (checkmimeall) { mimeTypeList << ("null"); } } + cfg.write(); } void MediumMountGui::startGui() { QPixmap image = Resource::loadPixmap( "HelpBrowser"); Text_2 = new QLabel( this ); Text_2->setGeometry( QRect( 10, 15, 40, 40 ) ); Text_2->setPixmap( image ); Text = new QLabel( this, "Text" ); Text->setGeometry( QRect( 55, 11, this->width()-50, 50 ) ); Text->setText( tr( "A <b>storage medium</b> was inserted. Should it be scanned for media files?" ) ); // media box GroupBox1 = new QGroupBox( this, "GroupBox1" ); GroupBox1->setGeometry( QRect( 10, 80, (this->width())-25, 80 ) ); GroupBox1->setTitle( tr( "Which media files" ) ); CheckBoxAudio = new QCheckBox( GroupBox1, "CheckBoxAudio" ); CheckBoxAudio->setGeometry( QRect( 10, 15, (GroupBox1->width()/2)-15 , 15 ) ); CheckBoxAudio->setText( tr( "Audio" ) ); CheckBoxImage = new QCheckBox( GroupBox1, "CheckBoxImage" ); CheckBoxImage->setGeometry( QRect( 10, 35,(GroupBox1->width()/2)-15, 15 ) ); CheckBoxImage->setText( tr( "Image" ) ); CheckBoxText = new QCheckBox( GroupBox1, "CheckBoxText" ); CheckBoxText->setGeometry( QRect((GroupBox1->width()/2) , 15, (GroupBox1->width()/2)-15, 15 ) ); CheckBoxText->setText( tr( "Text" ) ); CheckBoxVideo = new QCheckBox( GroupBox1, "CheckBoxVideo" ); diff --git a/libopie/oconfig.h b/libopie/oconfig.h index c97fb6a..f6227d1 100644 --- a/libopie/oconfig.h +++ b/libopie/oconfig.h @@ -12,37 +12,37 @@ .i_,=:_. -<s. This library is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <qpe/config.h> #ifndef opieconfig_h #define opieconfig_h /** It supports all Config items + it lets you decide * which file to use. */ class OConfig : public Config { public: OConfig( const QString &filename ); ~OConfig(); QString fileName() const; - + void read( ) { Config::read(); }; }; #endif |