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 /core/launcher/mediummountgui.cpp | |
parent | 3e2720971a92079e56f61ad257ef6c2df2a2b0b4 (diff) | |
download | opie-f6f0cd02ceec72a971616de253d736a94a730397.zip opie-f6f0cd02ceec72a971616de253d736a94a730397.tar.gz opie-f6f0cd02ceec72a971616de253d736a94a730397.tar.bz2 |
make something kewl possible
Diffstat (limited to 'core/launcher/mediummountgui.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/launcher/mediummountgui.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
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 | |||
@@ -42,13 +42,13 @@ void MediumMountGui::readConfig(){ | |||
42 | checkagain = cfg.readBoolEntry("check", false); | 42 | checkagain = cfg.readBoolEntry("check", false); |
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); |
48 | checkmimevideo = cfg.readBoolEntry("video", true); | 48 | checkmimevideo = cfg.readBoolEntry("video", true); |
49 | 49 | ||
50 | cfg.setGroup("dirs"); | 50 | cfg.setGroup("dirs"); |
51 | limittodirs = cfg.readEntry("dirs", "/"); | 51 | limittodirs = cfg.readEntry("dirs", ""); |
52 | } | 52 | } |
53 | 53 | ||
54 | bool MediumMountGui::check() { | 54 | bool MediumMountGui::check() { |
@@ -60,12 +60,13 @@ QStringList MediumMountGui::dirs() { | |||
60 | return list; | 60 | return list; |
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() ); |
71 | cfg.writeEntry("image",CheckBoxImage->isChecked() ); | 72 | cfg.writeEntry("image",CheckBoxImage->isChecked() ); |
@@ -73,7 +74,7 @@ void MediumMountGui::writeConfig() { | |||
73 | cfg.writeEntry("video",CheckBoxVideo->isChecked() ); | 74 | cfg.writeEntry("video",CheckBoxVideo->isChecked() ); |
74 | 75 | ||
75 | cfg.setGroup("dirs"); | 76 | cfg.setGroup("dirs"); |
76 | cfg.writeEntry("dirs", "/"); | 77 | cfg.writeEntry("dirs", ""); |
77 | 78 | ||
78 | 79 | ||
79 | if (checkmimeaudio) { | 80 | if (checkmimeaudio) { |
@@ -172,8 +173,9 @@ void MediumMountGui::startGui() { | |||
172 | } | 173 | } |
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 | ||
179 | 181 | ||
@@ -182,7 +184,8 @@ QStringList MediumMountGui::mimeTypes(){ | |||
182 | } | 184 | } |
183 | 185 | ||
184 | void MediumMountGui::noPressed() { | 186 | void MediumMountGui::noPressed() { |
185 | close(); | 187 | writeConfig(false); |
188 | reject(); | ||
186 | } | 189 | } |
187 | 190 | ||
188 | MediumMountGui::~MediumMountGui(){ | 191 | MediumMountGui::~MediumMountGui(){ |