summaryrefslogtreecommitdiff
authorzecke <zecke>2002-03-22 23:03:44 (UTC)
committer zecke <zecke>2002-03-22 23:03:44 (UTC)
commit232a5bed633ba2aa96fcab73ff991ab3a796ad76 (patch) (unidiff)
tree91bf3f7eec1ff69f62b3e7f700c9b2c4a968f24b
parentf0add730524cb63fd3bcce741da2e1fba83acb9f (diff)
downloadopie-232a5bed633ba2aa96fcab73ff991ab3a796ad76.zip
opie-232a5bed633ba2aa96fcab73ff991ab3a796ad76.tar.gz
opie-232a5bed633ba2aa96fcab73ff991ab3a796ad76.tar.bz2
make some people happy
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/mediummountgui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/launcher/mediummountgui.cpp b/core/launcher/mediummountgui.cpp
index 6ad97e1..5225711 100644
--- a/core/launcher/mediummountgui.cpp
+++ b/core/launcher/mediummountgui.cpp
@@ -1,104 +1,104 @@
1 1
2#include "mediummountgui.h" 2#include "mediummountgui.h"
3 3
4#include <qvariant.h> 4#include <qvariant.h>
5#include <qcheckbox.h> 5#include <qcheckbox.h>
6#include <qgroupbox.h> 6#include <qgroupbox.h>
7#include <qlabel.h> 7#include <qlabel.h>
8#include <qlineedit.h> 8#include <qlineedit.h>
9#include <qpushbutton.h> 9#include <qpushbutton.h>
10#include <qlayout.h> 10#include <qlayout.h>
11#include <qtooltip.h> 11#include <qtooltip.h>
12#include <qwhatsthis.h> 12#include <qwhatsthis.h>
13#include <qimage.h> 13#include <qimage.h>
14#include <qpixmap.h> 14#include <qpixmap.h>
15 15
16#include <qpe/resource.h> 16#include <qpe/resource.h>
17#include <opie/oconfig.h> 17#include <opie/oconfig.h>
18 18
19 19
20#include <qapplication.h> 20#include <qapplication.h>
21 21
22 22
23MediumMountGui::MediumMountGui( const QString &path ,QWidget* parent, const char* name, bool modal, WFlags fl ) 23MediumMountGui::MediumMountGui( const QString &path ,QWidget* parent, const char* name, bool modal, WFlags fl )
24 : QDialog( parent, name, true ) { 24 : QDialog( parent, name, true ) {
25 25
26 26
27 QWidget *d = QApplication::desktop(); 27 QWidget *d = QApplication::desktop();
28 int w=d->width(); 28 int w=d->width();
29 int h=d->height(); 29 int h=d->height();
30 resize( w , h ); 30 resize( w , h );
31 setCaption( tr( "Medium inserted" ) ); 31 setCaption( tr( "Medium inserted" ) );
32 32
33 mediumPath = path; 33 mediumPath = path;
34 readConfig(); 34 readConfig();
35 startGui(); 35 startGui();
36} 36}
37 37
38void MediumMountGui::readConfig(){ 38void MediumMountGui::readConfig(){
39 39
40 OConfig cfg (mediumPath +"/.opiestorage.cf"); 40 OConfig cfg (mediumPath +"/.opiestorage.cf");
41 cfg.setGroup("main"); 41 cfg.setGroup("main");
42 checkagain = cfg.readBoolEntry("check", true); 42 checkagain = cfg.readBoolEntry("check", false);
43 43
44 cfg.setGroup("mimetypes"); 44 cfg.setGroup("mimetypes");
45 checkmimeaudio = cfg.readBoolEntry("audio", true); 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 checkmimeall = cfg.readBoolEntry("all", true); 49 checkmimeall = cfg.readBoolEntry("all", true);
50 50
51 cfg.setGroup("dirs"); 51 cfg.setGroup("dirs");
52 limittodirs = cfg.readEntry("dirs", ""); 52 limittodirs = cfg.readEntry("dirs", "");
53} 53}
54 54
55bool MediumMountGui::check() { 55bool MediumMountGui::check() {
56 return checkagain; 56 return !checkagain;
57} 57}
58 58
59QStringList MediumMountGui::dirs() { 59QStringList MediumMountGui::dirs() {
60 QStringList list = QStringList::split(",", limittodirs ); 60 QStringList list = QStringList::split(",", limittodirs );
61 return list; 61 return list;
62} 62}
63 63
64void MediumMountGui::writeConfig(bool autocheck) { 64void MediumMountGui::writeConfig(bool autocheck) {
65 65
66 OConfig cfg (mediumPath +"/.opiestorage.cf"); 66 OConfig cfg (mediumPath +"/.opiestorage.cf");
67 cfg.setGroup("main"); 67 cfg.setGroup("main");
68 cfg.writeEntry("check", AskBox->isChecked() ); 68 cfg.writeEntry("check", AskBox->isChecked() );
69 cfg.writeEntry("autocheck", autocheck ); 69 cfg.writeEntry("autocheck", autocheck );
70 70
71 cfg.setGroup("mimetypes"); 71 cfg.setGroup("mimetypes");
72 72
73 cfg.writeEntry("audio", CheckBoxAudio->isChecked() ); 73 cfg.writeEntry("audio", CheckBoxAudio->isChecked() );
74 cfg.writeEntry("image",CheckBoxImage->isChecked() ); 74 cfg.writeEntry("image",CheckBoxImage->isChecked() );
75 cfg.writeEntry("text",CheckBoxImage->isChecked() ); 75 cfg.writeEntry("text",CheckBoxImage->isChecked() );
76 cfg.writeEntry("video",CheckBoxVideo->isChecked() ); 76 cfg.writeEntry("video",CheckBoxVideo->isChecked() );
77 cfg.writeEntry("all",CheckBoxAll->isChecked() ); 77 cfg.writeEntry("all",CheckBoxAll->isChecked() );
78 78
79 cfg.setGroup("dirs"); 79 cfg.setGroup("dirs");
80 cfg.writeEntry("dirs", ""); 80 cfg.writeEntry("dirs", "");
81 81
82 82
83 // if all is checked then add only "null" to the list. 83 // if all is checked then add only "null" to the list.
84 if (checkmimeall) { 84 if (checkmimeall) {
85 mimeTypeList += ("null"); 85 mimeTypeList += ("null");
86 } else { 86 } else {
87 if (checkmimeaudio) { 87 if (checkmimeaudio) {
88 mimeTypeList += ("audio//*"); 88 mimeTypeList += ("audio//*");
89 } 89 }
90 if (checkmimetext) { 90 if (checkmimetext) {
91 mimeTypeList += ("text//*"); 91 mimeTypeList += ("text//*");
92 } 92 }
93 if (checkmimevideo) { 93 if (checkmimevideo) {
94 mimeTypeList += ("video//*"); 94 mimeTypeList += ("video//*");
95 } 95 }
96 if (checkmimeimage) { 96 if (checkmimeimage) {
97 mimeTypeList += ("image//*"); 97 mimeTypeList += ("image//*");
98 } 98 }
99 if (checkmimeall) { 99 if (checkmimeall) {
100 mimeTypeList << ("null"); 100 mimeTypeList << ("null");
101 } 101 }
102 } 102 }
103} 103}
104 104