-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 @@ -6,8 +6,9 @@ DESTDIR = $(OPIEDIR)/bin HEADERS = background.h \ desktop.h \ qprocess.h \ + mediummountgui.h \ info.h \ appicons.h \ taskbar.h \ sidething.h \ @@ -46,8 +47,9 @@ HEADERS = background.h \ # quicklauncher.h \ SOURCES = background.cpp \ desktop.cpp \ + mediummountgui.cpp \ qprocess.cpp qprocess_unix.cpp \ info.cpp \ appicons.cpp \ taskbar.cpp \ @@ -106,8 +108,8 @@ INCLUDEPATH += $(OPIEDIR)/rsync DEPENDPATH += $(OPIEDIR)/rsync TARGET = qpe -LIBS += -lqpe -lcrypt +LIBS += -lqpe -lcrypt -lopie TRANSLATIONS = ../i18n/de/qpe.ts TRANSLATIONS += ../i18n/pt_BR/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 @@ -41,15 +41,15 @@ void MediumMountGui::readConfig(){ cfg.setGroup("main"); checkagain = cfg.readBoolEntry("check", false); cfg.setGroup("mimetypes"); - checkmimeaudio = cfg.readBoolEntry("audio", false); + checkmimeaudio = cfg.readBoolEntry("audio", true); checkmimeimage = cfg.readBoolEntry("image", true); checkmimetext = cfg.readBoolEntry("text", true); checkmimevideo = cfg.readBoolEntry("video", true); cfg.setGroup("dirs"); - limittodirs = cfg.readEntry("dirs", "/"); + limittodirs = cfg.readEntry("dirs", ""); } bool MediumMountGui::check() { return checkagain; @@ -59,22 +59,23 @@ QStringList MediumMountGui::dirs() { QStringList list = QStringList::split(",", limittodirs ); return list; } -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"); cfg.writeEntry("audio", CheckBoxAudio->isChecked() ); cfg.writeEntry("image",CheckBoxImage->isChecked() ); cfg.writeEntry("text",CheckBoxImage->isChecked() ); cfg.writeEntry("video",CheckBoxVideo->isChecked() ); cfg.setGroup("dirs"); - cfg.writeEntry("dirs", "/"); + cfg.writeEntry("dirs", ""); if (checkmimeaudio) { mimeTypeList += ("audio//*"); @@ -171,19 +172,21 @@ void MediumMountGui::startGui() { } void MediumMountGui::yesPressed() { - writeConfig(); + writeConfig(true); // and do something + accept(); } QStringList MediumMountGui::mimeTypes(){ return mimeTypeList; } void MediumMountGui::noPressed() { - close(); + writeConfig(false); + reject(); } MediumMountGui::~MediumMountGui(){ } 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 @@ -16,9 +16,9 @@ class MediumMountGui : public QDialog { Q_OBJECT 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(); protected: QPushButton* quit; @@ -42,13 +42,14 @@ public: QStringList dirs(); private: void startGui(); void readConfig(); - void writeConfig(); + void writeConfig(bool checkagain); private slots: void yesPressed(); void noPressed(); + private: QString mediumPath; bool checkagain; |