summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/mediummountgui.cpp26
-rw-r--r--core/launcher/mediummountgui.h5
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
@@ -54,8 +54,12 @@ void MediumMountGui::readConfig(){
54bool MediumMountGui::check() { 54bool MediumMountGui::check() {
55 return checkagain; 55 return checkagain;
56} 56}
57 57
58QStringList MediumMountGui::dirs() {
59 QStringList list = QStringList::split(",", limittodirs );
60 return list;
61}
58 62
59void MediumMountGui::writeConfig() { 63void MediumMountGui::writeConfig() {
60 64
61 OConfig cfg (mediumPath +"/.opiestorage.cf"); 65 OConfig cfg (mediumPath +"/.opiestorage.cf");
@@ -68,9 +72,24 @@ void MediumMountGui::writeConfig() {
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
75void MediumMountGui::startGui() { 94void MediumMountGui::startGui() {
76 95
@@ -156,8 +175,13 @@ void MediumMountGui::yesPressed() {
156 writeConfig(); 175 writeConfig();
157 // and do something 176 // and do something
158} 177}
159 178
179
180QStringList MediumMountGui::mimeTypes(){
181 return mimeTypeList;
182}
183
160void MediumMountGui::noPressed() { 184void MediumMountGui::noPressed() {
161 close(); 185 close();
162} 186}
163 187
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
@@ -37,9 +37,10 @@ protected:
37 QCheckBox* AskBox; 37 QCheckBox* AskBox;
38 38
39public: 39public:
40 bool check(); 40 bool check();
41 41 QStringList mimeTypes();
42 QStringList dirs();
42private: 43private:
43 void startGui(); 44 void startGui();
44 void readConfig(); 45 void readConfig();
45 void writeConfig(); 46 void writeConfig();
@@ -55,9 +56,9 @@ private:
55 bool checkmimeimage; 56 bool checkmimeimage;
56 bool checkmimetext; 57 bool checkmimetext;
57 bool checkmimevideo; 58 bool checkmimevideo;
58QString limittodirs; 59QString limittodirs;
59 60QStringList mimeTypeList;
60 61
61}; 62};
62 63
63#endif \ No newline at end of file 64#endif \ No newline at end of file