-rw-r--r-- | core/launcher/launcher.pro | 4 | ||||
-rw-r--r-- | core/launcher/mediummountgui.cpp | 15 | ||||
-rw-r--r-- | core/launcher/mediummountgui.h | 5 |
3 files changed, 15 insertions, 9 deletions
diff --git a/core/launcher/launcher.pro b/core/launcher/launcher.pro index 29eaea7..146fffd 100644 --- a/core/launcher/launcher.pro +++ b/core/launcher/launcher.pro @@ -8,4 +8,5 @@ HEADERS = background.h \ desktop.h \ qprocess.h \ + mediummountgui.h \ info.h \ appicons.h \ @@ -48,4 +49,5 @@ HEADERS = background.h \ SOURCES = background.cpp \ desktop.cpp \ + mediummountgui.cpp \ qprocess.cpp qprocess_unix.cpp \ info.cpp \ @@ -108,5 +110,5 @@ DEPENDPATH += $(OPIEDIR)/rsync TARGET = qpe -LIBS += -lqpe -lcrypt +LIBS += -lqpe -lcrypt -lopie TRANSLATIONS = ../i18n/de/qpe.ts diff --git a/core/launcher/mediummountgui.cpp b/core/launcher/mediummountgui.cpp index 8307eb6..82c2d66 100644 --- a/core/launcher/mediummountgui.cpp +++ b/core/launcher/mediummountgui.cpp @@ -43,5 +43,5 @@ void MediumMountGui::readConfig(){ cfg.setGroup("mimetypes"); - checkmimeaudio = cfg.readBoolEntry("audio", false); + checkmimeaudio = cfg.readBoolEntry("audio", true); checkmimeimage = cfg.readBoolEntry("image", true); checkmimetext = cfg.readBoolEntry("text", true); @@ -49,5 +49,5 @@ void MediumMountGui::readConfig(){ cfg.setGroup("dirs"); - limittodirs = cfg.readEntry("dirs", "/"); + limittodirs = cfg.readEntry("dirs", ""); } @@ -61,9 +61,10 @@ QStringList MediumMountGui::dirs() { } -void MediumMountGui::writeConfig() { +void MediumMountGui::writeConfig(bool autocheck) { OConfig cfg (mediumPath +"/.opiestorage.cf"); cfg.setGroup("main"); cfg.writeEntry("check", AskBox->isChecked() ); + cfg.writeEntry("autocheck", autocheck ); cfg.setGroup("mimetypes"); @@ -74,5 +75,5 @@ void MediumMountGui::writeConfig() { cfg.setGroup("dirs"); - cfg.writeEntry("dirs", "/"); + cfg.writeEntry("dirs", ""); @@ -173,6 +174,7 @@ void MediumMountGui::startGui() { void MediumMountGui::yesPressed() { - writeConfig(); + writeConfig(true); // and do something + accept(); } @@ -183,5 +185,6 @@ QStringList MediumMountGui::mimeTypes(){ void MediumMountGui::noPressed() { - close(); + writeConfig(false); + reject(); } diff --git a/core/launcher/mediummountgui.h b/core/launcher/mediummountgui.h index a7f3701..9802b29 100644 --- a/core/launcher/mediummountgui.h +++ b/core/launcher/mediummountgui.h @@ -18,5 +18,5 @@ class MediumMountGui : public QDialog public: - MediumMountGui( const QString &path = "/tmp/", QWidget* parent = 0, const char* name = 0, bool modal = FALSE ,WFlags fl = 0 ); + MediumMountGui( const QString &path = "tmp/", QWidget* parent = 0, const char* name = 0, bool modal = FALSE ,WFlags fl = 0 ); ~MediumMountGui(); @@ -44,9 +44,10 @@ private: void startGui(); void readConfig(); - void writeConfig(); + void writeConfig(bool checkagain); private slots: void yesPressed(); void noPressed(); + private: QString mediumPath; |