summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/launcher.cpp10
-rw-r--r--core/launcher/mediummountgui.cpp54
-rw-r--r--core/launcher/mediummountgui.h17
3 files changed, 46 insertions, 35 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index d1df4cc..f9c6c02 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -559,2 +559,4 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global::
559 QListIterator<FileSystem> it ( fileSystems ); 559 QListIterator<FileSystem> it ( fileSystems );
560
561
560 for ( ; it.current(); ++it ) { 562 for ( ; it.current(); ++it ) {
@@ -575,3 +577,3 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global::
575 }else{ // come up with the gui cause this a new card 577 }else{ // come up with the gui cause this a new card
576 MediumMountGui medium((*it)->path() ); 578 MediumMountGui medium(&cfg, (*it)->path() );
577 if( medium.check() ){ // we did not ask before or ask again is off 579 if( medium.check() ){ // we did not ask before or ask again is off
@@ -579,4 +581,8 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global::
579 // speicher 581 // speicher
580 cfg.read(); // cause of a race we need to reread 582 //cfg.read(); // cause of a race we need to reread - fixed
581 cfg.writeEntry("timestamp", newStamp ); 583 cfg.writeEntry("timestamp", newStamp );
584 cfg.write();
585 tmp = new DocLnkSet( (*it)->path(), medium.mimeTypes().join(";" ) );
586 docsFolder->appendFrom( *tmp );
587 delete tmp;
582 }// no else 588 }// no else
diff --git a/core/launcher/mediummountgui.cpp b/core/launcher/mediummountgui.cpp
index e0acf4e..8cc2411 100644
--- a/core/launcher/mediummountgui.cpp
+++ b/core/launcher/mediummountgui.cpp
@@ -16,2 +16,4 @@
16#include <qpe/resource.h> 16#include <qpe/resource.h>
17#include <qpe/config.h>
18
17#include <opie/oconfig.h> 19#include <opie/oconfig.h>
@@ -22,6 +24,6 @@
22 24
23MediumMountGui::MediumMountGui( const QString &path ,QWidget* parent, const char* name, bool modal, WFlags fl ) 25MediumMountGui::MediumMountGui( Config *cfg, const QString &path ,QWidget* parent, const char* name, bool , WFlags )
24 : QDialog( parent, name, true ) { 26 : QDialog( parent, name, true ) {
25 27
26 28 m_cfg = cfg;
27 QWidget *d = QApplication::desktop(); 29 QWidget *d = QApplication::desktop();
@@ -39,15 +41,15 @@ void MediumMountGui::readConfig(){
39 41
40 OConfig cfg (mediumPath +"/.opiestorage.cf"); 42 //OConfig cfg (mediumPath +"/.opiestorage.cf");
41 cfg.setGroup("main"); 43 m_cfg->setGroup("main");
42 checkagain = cfg.readBoolEntry("check", false); 44 checkagain = m_cfg->readBoolEntry("check", false);
43 45
44 cfg.setGroup("mimetypes"); 46 m_cfg->setGroup("mimetypes");
45 checkmimeaudio = cfg.readBoolEntry("audio", true); 47 checkmimeaudio = m_cfg->readBoolEntry("audio", true);
46 checkmimeimage = cfg.readBoolEntry("image", true); 48 checkmimeimage = m_cfg->readBoolEntry("image", true);
47 checkmimetext = cfg.readBoolEntry("text", true); 49 checkmimetext = m_cfg->readBoolEntry("text", true);
48 checkmimevideo = cfg.readBoolEntry("video", true); 50 checkmimevideo = m_cfg->readBoolEntry("video", true);
49 checkmimeall = cfg.readBoolEntry("all", true); 51 checkmimeall = m_cfg->readBoolEntry("all", true);
50 52
51 cfg.setGroup("dirs"); 53 m_cfg->setGroup("dirs");
52 limittodirs = cfg.readEntry("dirs", ""); 54 limittodirs = m_cfg->readEntry("dirs", "");
53} 55}
@@ -65,17 +67,17 @@ void MediumMountGui::writeConfig(bool autocheck) {
65 67
66 OConfig cfg (mediumPath +"/.opiestorage.cf"); 68 //OConfig cfg (mediumPath +"/.opiestorage.cf");
67 cfg.setGroup("main"); 69 m_cfg->setGroup("main");
68 cfg.writeEntry("check", AskBox->isChecked() ); 70 m_cfg->writeEntry("check", AskBox->isChecked() );
69 cfg.writeEntry("autocheck", autocheck ); 71 m_cfg->writeEntry("autocheck", autocheck );
70 72
71 cfg.setGroup("mimetypes"); 73 m_cfg->setGroup("mimetypes");
72 74
73 cfg.writeEntry("audio", CheckBoxAudio->isChecked() ); 75 m_cfg->writeEntry("audio", CheckBoxAudio->isChecked() );
74 cfg.writeEntry("image",CheckBoxImage->isChecked() ); 76 m_cfg->writeEntry("image",CheckBoxImage->isChecked() );
75 cfg.writeEntry("text",CheckBoxImage->isChecked() ); 77 m_cfg->writeEntry("text",CheckBoxImage->isChecked() );
76 cfg.writeEntry("video",CheckBoxVideo->isChecked() ); 78 m_cfg->writeEntry("video",CheckBoxVideo->isChecked() );
77 cfg.writeEntry("all",CheckBoxAll->isChecked() ); 79 m_cfg->writeEntry("all",CheckBoxAll->isChecked() );
78 80
79 cfg.setGroup("dirs"); 81 m_cfg->setGroup("dirs");
80 cfg.writeEntry("dirs", ""); 82 m_cfg->writeEntry("dirs", "");
81 83
@@ -100,3 +102,3 @@ void MediumMountGui::writeConfig(bool autocheck) {
100 } 102 }
101 cfg.write(); // not really needed here but just to be sure 103 m_cfg->write(); // not really needed here but just to be sure
102} 104}
diff --git a/core/launcher/mediummountgui.h b/core/launcher/mediummountgui.h
index 2e04f94..8292c3a 100644
--- a/core/launcher/mediummountgui.h
+++ b/core/launcher/mediummountgui.h
@@ -13,2 +13,3 @@ class QLineEdit;
13class QPushButton; 13class QPushButton;
14class Config;
14 15
@@ -19,3 +20,3 @@ class MediumMountGui : public QDialog
19public: 20public:
20 MediumMountGui( const QString &path = "tmp/", QWidget* parent = 0, const char* name = 0, bool modal = FALSE ,WFlags fl = 0 ); 21 MediumMountGui( Config *cfg, const QString &path = "tmp/", QWidget* parent = 0, const char* name = 0, bool modal = FALSE ,WFlags fl = 0 );
21 ~MediumMountGui(); 22 ~MediumMountGui();
@@ -40,2 +41,3 @@ protected:
40 41
42
41public: 43public:
@@ -56,10 +58,11 @@ private slots:
56 58
57 bool checkagain; 59 bool checkagain:1;
58 bool checkmimeaudio; 60 bool checkmimeaudio:1;
59 bool checkmimeimage; 61 bool checkmimeimage:1;
60 bool checkmimetext; 62 bool checkmimetext:1;
61 bool checkmimevideo; 63 bool checkmimevideo:1;
62 bool checkmimeall; 64 bool checkmimeall:1;
63 QString limittodirs; 65 QString limittodirs;
64 QStringList mimeTypeList; 66 QStringList mimeTypeList;
67 Config *m_cfg;
65 68