summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -52,12 +52,16 @@ void MediumMountGui::readConfig(){
}
bool MediumMountGui::check() {
return checkagain;
}
+QStringList MediumMountGui::dirs() {
+ QStringList list = QStringList::split(",", limittodirs );
+ return list;
+}
void MediumMountGui::writeConfig() {
OConfig cfg (mediumPath +"/.opiestorage.cf");
cfg.setGroup("main");
cfg.writeEntry("check", AskBox->isChecked() );
@@ -66,13 +70,28 @@ void MediumMountGui::writeConfig() {
cfg.writeEntry("audio", CheckBoxAudio->isChecked() );
cfg.writeEntry("image",CheckBoxImage->isChecked() );
cfg.writeEntry("text",CheckBoxImage->isChecked() );
cfg.writeEntry("video",CheckBoxVideo->isChecked() );
cfg.setGroup("dirs");
- cfg.writeEntry("dirs", "/");
+ cfg.writeEntry("dirs", "/");
+
+
+ if (checkmimeaudio) {
+ mimeTypeList += ("audio//*");
+ }
+ if (checkmimetext) {
+ mimeTypeList += ("text//*");
+ }
+ if (checkmimeaudio) {
+ mimeTypeList += ("video//*");
+ }
+ if (checkmimeaudio) {
+ mimeTypeList += ("image//*");
+ }
+
}
void MediumMountGui::startGui() {
QPixmap image = Resource::loadPixmap( "HelpBrowser");
@@ -154,12 +173,17 @@ void MediumMountGui::startGui() {
void MediumMountGui::yesPressed() {
writeConfig();
// and do something
}
+
+QStringList MediumMountGui::mimeTypes(){
+ return mimeTypeList;
+}
+
void MediumMountGui::noPressed() {
close();
}
MediumMountGui::~MediumMountGui(){
}
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
@@ -35,13 +35,14 @@ protected:
QCheckBox* CheckBoxText;
QCheckBox* CheckBoxVideo;
QCheckBox* AskBox;
public:
bool check();
-
+ QStringList mimeTypes();
+ QStringList dirs();
private:
void startGui();
void readConfig();
void writeConfig();
private slots:
@@ -53,11 +54,11 @@ private:
bool checkagain;
bool checkmimeaudio;
bool checkmimeimage;
bool checkmimetext;
bool checkmimevideo;
QString limittodirs;
-
+QStringList mimeTypeList;
};
#endif \ No newline at end of file