author | zecke <zecke> | 2002-03-22 16:14:18 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-03-22 16:14:18 (UTC) |
commit | f6f0cd02ceec72a971616de253d736a94a730397 (patch) (unidiff) | |
tree | c89241377d61bd568b5381b0880ac9c04a55d1a8 | |
parent | 3e2720971a92079e56f61ad257ef6c2df2a2b0b4 (diff) | |
download | opie-f6f0cd02ceec72a971616de253d736a94a730397.zip opie-f6f0cd02ceec72a971616de253d736a94a730397.tar.gz opie-f6f0cd02ceec72a971616de253d736a94a730397.tar.bz2 |
make something kewl possible
-rw-r--r-- | core/launcher/launcher.pro | 4 | ||||
-rw-r--r-- | core/launcher/mediummountgui.cpp | 17 | ||||
-rw-r--r-- | core/launcher/mediummountgui.h | 15 |
3 files changed, 21 insertions, 15 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 \ | |||
8 | desktop.h \ | 8 | desktop.h \ |
9 | qprocess.h \ | 9 | qprocess.h \ |
10 | mediummountgui.h \ | ||
10 | info.h \ | 11 | info.h \ |
11 | appicons.h \ | 12 | appicons.h \ |
@@ -48,4 +49,5 @@ HEADERS = background.h \ | |||
48 | SOURCES = background.cpp \ | 49 | SOURCES = background.cpp \ |
49 | desktop.cpp \ | 50 | desktop.cpp \ |
51 | mediummountgui.cpp \ | ||
50 | qprocess.cpp qprocess_unix.cpp \ | 52 | qprocess.cpp qprocess_unix.cpp \ |
51 | info.cpp \ | 53 | info.cpp \ |
@@ -108,5 +110,5 @@ DEPENDPATH += $(OPIEDIR)/rsync | |||
108 | TARGET = qpe | 110 | TARGET = qpe |
109 | 111 | ||
110 | LIBS += -lqpe -lcrypt | 112 | LIBS += -lqpe -lcrypt -lopie |
111 | 113 | ||
112 | TRANSLATIONS = ../i18n/de/qpe.ts | 114 | 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(){ | |||
43 | 43 | ||
44 | cfg.setGroup("mimetypes"); | 44 | cfg.setGroup("mimetypes"); |
45 | checkmimeaudio = cfg.readBoolEntry("audio", false); | 45 | checkmimeaudio = cfg.readBoolEntry("audio", true); |
46 | checkmimeimage = cfg.readBoolEntry("image", true); | 46 | checkmimeimage = cfg.readBoolEntry("image", true); |
47 | checkmimetext = cfg.readBoolEntry("text", true); | 47 | checkmimetext = cfg.readBoolEntry("text", true); |
@@ -49,5 +49,5 @@ void MediumMountGui::readConfig(){ | |||
49 | 49 | ||
50 | cfg.setGroup("dirs"); | 50 | cfg.setGroup("dirs"); |
51 | limittodirs = cfg.readEntry("dirs", "/"); | 51 | limittodirs = cfg.readEntry("dirs", ""); |
52 | } | 52 | } |
53 | 53 | ||
@@ -61,10 +61,11 @@ QStringList MediumMountGui::dirs() { | |||
61 | } | 61 | } |
62 | 62 | ||
63 | void MediumMountGui::writeConfig() { | 63 | void MediumMountGui::writeConfig(bool autocheck) { |
64 | 64 | ||
65 | OConfig cfg (mediumPath +"/.opiestorage.cf"); | 65 | OConfig cfg (mediumPath +"/.opiestorage.cf"); |
66 | cfg.setGroup("main"); | 66 | cfg.setGroup("main"); |
67 | cfg.writeEntry("check", AskBox->isChecked() ); | 67 | cfg.writeEntry("check", AskBox->isChecked() ); |
68 | 68 | cfg.writeEntry("autocheck", autocheck ); | |
69 | |||
69 | cfg.setGroup("mimetypes"); | 70 | cfg.setGroup("mimetypes"); |
70 | cfg.writeEntry("audio", CheckBoxAudio->isChecked() ); | 71 | cfg.writeEntry("audio", CheckBoxAudio->isChecked() ); |
@@ -74,5 +75,5 @@ void MediumMountGui::writeConfig() { | |||
74 | 75 | ||
75 | cfg.setGroup("dirs"); | 76 | cfg.setGroup("dirs"); |
76 | cfg.writeEntry("dirs", "/"); | 77 | cfg.writeEntry("dirs", ""); |
77 | 78 | ||
78 | 79 | ||
@@ -173,6 +174,7 @@ void MediumMountGui::startGui() { | |||
173 | 174 | ||
174 | void MediumMountGui::yesPressed() { | 175 | void MediumMountGui::yesPressed() { |
175 | writeConfig(); | 176 | writeConfig(true); |
176 | // and do something | 177 | // and do something |
178 | accept(); | ||
177 | } | 179 | } |
178 | 180 | ||
@@ -183,5 +185,6 @@ QStringList MediumMountGui::mimeTypes(){ | |||
183 | 185 | ||
184 | void MediumMountGui::noPressed() { | 186 | void MediumMountGui::noPressed() { |
185 | close(); | 187 | writeConfig(false); |
188 | reject(); | ||
186 | } | 189 | } |
187 | 190 | ||
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 | |||
18 | 18 | ||
19 | public: | 19 | public: |
20 | MediumMountGui( const QString &path = "/tmp/", QWidget* parent = 0, const char* name = 0, bool modal = FALSE ,WFlags fl = 0 ); | 20 | MediumMountGui( const QString &path = "tmp/", QWidget* parent = 0, const char* name = 0, bool modal = FALSE ,WFlags fl = 0 ); |
21 | ~MediumMountGui(); | 21 | ~MediumMountGui(); |
22 | 22 | ||
@@ -44,9 +44,10 @@ private: | |||
44 | void startGui(); | 44 | void startGui(); |
45 | void readConfig(); | 45 | void readConfig(); |
46 | void writeConfig(); | 46 | void writeConfig(bool checkagain); |
47 | 47 | ||
48 | private slots: | 48 | private slots: |
49 | void yesPressed(); | 49 | void yesPressed(); |
50 | void noPressed(); | 50 | void noPressed(); |
51 | |||
51 | private: | 52 | private: |
52 | QString mediumPath; | 53 | QString mediumPath; |
@@ -57,8 +58,8 @@ private: | |||
57 | bool checkmimetext; | 58 | bool checkmimetext; |
58 | bool checkmimevideo; | 59 | bool checkmimevideo; |
59 | QString limittodirs; | 60 | QString limittodirs; |
60 | QStringList mimeTypeList; | 61 | QStringList mimeTypeList; |
61 | 62 | ||
62 | }; | 63 | }; |
63 | 64 | ||
64 | #endif \ No newline at end of file | 65 | #endif |