author | harlekin <harlekin> | 2002-03-22 15:34:21 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-03-22 15:34:21 (UTC) |
commit | 3e2720971a92079e56f61ad257ef6c2df2a2b0b4 (patch) (unidiff) | |
tree | 4aba55be8c0c8b1fad2efd1bd362e1a1f68715a2 | |
parent | a25901e13435a44576229bbda344aedf138863b0 (diff) | |
download | opie-3e2720971a92079e56f61ad257ef6c2df2a2b0b4.zip opie-3e2720971a92079e56f61ad257ef6c2df2a2b0b4.tar.gz opie-3e2720971a92079e56f61ad257ef6c2df2a2b0b4.tar.bz2 |
more stuff
-rw-r--r-- | core/launcher/mediummountgui.cpp | 26 | ||||
-rw-r--r-- | core/launcher/mediummountgui.h | 5 |
2 files changed, 28 insertions, 3 deletions
diff --git a/core/launcher/mediummountgui.cpp b/core/launcher/mediummountgui.cpp index 2454efa..8307eb6 100644 --- a/core/launcher/mediummountgui.cpp +++ b/core/launcher/mediummountgui.cpp | |||
@@ -50,31 +50,50 @@ void MediumMountGui::readConfig(){ | |||
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() { |
55 | return checkagain; | 55 | return checkagain; |
56 | } | 56 | } |
57 | 57 | ||
58 | QStringList MediumMountGui::dirs() { | ||
59 | QStringList list = QStringList::split(",", limittodirs ); | ||
60 | return list; | ||
61 | } | ||
58 | 62 | ||
59 | void MediumMountGui::writeConfig() { | 63 | void MediumMountGui::writeConfig() { |
60 | 64 | ||
61 | OConfig cfg (mediumPath +"/.opiestorage.cf"); | 65 | OConfig cfg (mediumPath +"/.opiestorage.cf"); |
62 | cfg.setGroup("main"); | 66 | cfg.setGroup("main"); |
63 | cfg.writeEntry("check", AskBox->isChecked() ); | 67 | cfg.writeEntry("check", AskBox->isChecked() ); |
64 | 68 | ||
65 | cfg.setGroup("mimetypes"); | 69 | cfg.setGroup("mimetypes"); |
66 | cfg.writeEntry("audio", CheckBoxAudio->isChecked() ); | 70 | cfg.writeEntry("audio", CheckBoxAudio->isChecked() ); |
67 | cfg.writeEntry("image",CheckBoxImage->isChecked() ); | 71 | cfg.writeEntry("image",CheckBoxImage->isChecked() ); |
68 | cfg.writeEntry("text",CheckBoxImage->isChecked() ); | 72 | cfg.writeEntry("text",CheckBoxImage->isChecked() ); |
69 | cfg.writeEntry("video",CheckBoxVideo->isChecked() ); | 73 | cfg.writeEntry("video",CheckBoxVideo->isChecked() ); |
70 | 74 | ||
71 | cfg.setGroup("dirs"); | 75 | cfg.setGroup("dirs"); |
72 | cfg.writeEntry("dirs", "/"); | 76 | cfg.writeEntry("dirs", "/"); |
77 | |||
78 | |||
79 | if (checkmimeaudio) { | ||
80 | mimeTypeList += ("audio//*"); | ||
81 | } | ||
82 | if (checkmimetext) { | ||
83 | mimeTypeList += ("text//*"); | ||
84 | } | ||
85 | if (checkmimeaudio) { | ||
86 | mimeTypeList += ("video//*"); | ||
87 | } | ||
88 | if (checkmimeaudio) { | ||
89 | mimeTypeList += ("image//*"); | ||
90 | } | ||
91 | |||
73 | } | 92 | } |
74 | 93 | ||
75 | void MediumMountGui::startGui() { | 94 | void MediumMountGui::startGui() { |
76 | 95 | ||
77 | QPixmap image = Resource::loadPixmap( "HelpBrowser"); | 96 | QPixmap image = Resource::loadPixmap( "HelpBrowser"); |
78 | 97 | ||
79 | Text_2 = new QLabel( this ); | 98 | Text_2 = new QLabel( this ); |
80 | Text_2->setGeometry( QRect( 10, 15, 40, 40 ) ); | 99 | Text_2->setGeometry( QRect( 10, 15, 40, 40 ) ); |
@@ -152,15 +171,20 @@ void MediumMountGui::startGui() { | |||
152 | 171 | ||
153 | } | 172 | } |
154 | 173 | ||
155 | void MediumMountGui::yesPressed() { | 174 | void MediumMountGui::yesPressed() { |
156 | writeConfig(); | 175 | writeConfig(); |
157 | // and do something | 176 | // and do something |
158 | } | 177 | } |
159 | 178 | ||
179 | |||
180 | QStringList MediumMountGui::mimeTypes(){ | ||
181 | return mimeTypeList; | ||
182 | } | ||
183 | |||
160 | void MediumMountGui::noPressed() { | 184 | void MediumMountGui::noPressed() { |
161 | close(); | 185 | close(); |
162 | } | 186 | } |
163 | 187 | ||
164 | MediumMountGui::~MediumMountGui(){ | 188 | MediumMountGui::~MediumMountGui(){ |
165 | } | 189 | } |
166 | 190 | ||
diff --git a/core/launcher/mediummountgui.h b/core/launcher/mediummountgui.h index 700a922..a7f3701 100644 --- a/core/launcher/mediummountgui.h +++ b/core/launcher/mediummountgui.h | |||
@@ -33,17 +33,18 @@ protected: | |||
33 | QCheckBox* CheckBoxAudio; | 33 | QCheckBox* CheckBoxAudio; |
34 | QCheckBox* CheckBoxImage; | 34 | QCheckBox* CheckBoxImage; |
35 | QCheckBox* CheckBoxText; | 35 | QCheckBox* CheckBoxText; |
36 | QCheckBox* CheckBoxVideo; | 36 | QCheckBox* CheckBoxVideo; |
37 | QCheckBox* AskBox; | 37 | QCheckBox* AskBox; |
38 | 38 | ||
39 | public: | 39 | public: |
40 | bool check(); | 40 | bool check(); |
41 | 41 | QStringList mimeTypes(); | |
42 | QStringList dirs(); | ||
42 | private: | 43 | private: |
43 | void startGui(); | 44 | void startGui(); |
44 | void readConfig(); | 45 | void readConfig(); |
45 | void writeConfig(); | 46 | void writeConfig(); |
46 | 47 | ||
47 | private slots: | 48 | private slots: |
48 | void yesPressed(); | 49 | void yesPressed(); |
49 | void noPressed(); | 50 | void noPressed(); |
@@ -51,13 +52,13 @@ private: | |||
51 | QString mediumPath; | 52 | QString mediumPath; |
52 | 53 | ||
53 | bool checkagain; | 54 | bool checkagain; |
54 | bool checkmimeaudio; | 55 | bool checkmimeaudio; |
55 | bool checkmimeimage; | 56 | bool checkmimeimage; |
56 | bool checkmimetext; | 57 | bool checkmimetext; |
57 | bool checkmimevideo; | 58 | bool checkmimevideo; |
58 | QString limittodirs; | 59 | QString limittodirs; |
59 | 60 | QStringList mimeTypeList; | |
60 | 61 | ||
61 | }; | 62 | }; |
62 | 63 | ||
63 | #endif \ No newline at end of file | 64 | #endif \ No newline at end of file |