-rw-r--r-- | core/launcher/mediummountgui.cpp | 47 | ||||
-rw-r--r-- | core/launcher/mediummountgui.h | 5 |
2 files changed, 47 insertions, 5 deletions
diff --git a/core/launcher/mediummountgui.cpp b/core/launcher/mediummountgui.cpp index 82c2d66..f193024 100644 --- a/core/launcher/mediummountgui.cpp +++ b/core/launcher/mediummountgui.cpp | |||
@@ -48,2 +48,3 @@ void MediumMountGui::readConfig(){ | |||
48 | checkmimevideo = cfg.readBoolEntry("video", true); | 48 | checkmimevideo = cfg.readBoolEntry("video", true); |
49 | checkmimeall = cfg.readBoolEntry("all", true); | ||
49 | 50 | ||
@@ -70,2 +71,3 @@ void MediumMountGui::writeConfig(bool autocheck) { | |||
70 | cfg.setGroup("mimetypes"); | 71 | cfg.setGroup("mimetypes"); |
72 | |||
71 | cfg.writeEntry("audio", CheckBoxAudio->isChecked() ); | 73 | cfg.writeEntry("audio", CheckBoxAudio->isChecked() ); |
@@ -74,2 +76,3 @@ void MediumMountGui::writeConfig(bool autocheck) { | |||
74 | cfg.writeEntry("video",CheckBoxVideo->isChecked() ); | 76 | cfg.writeEntry("video",CheckBoxVideo->isChecked() ); |
77 | cfg.writeEntry("all",CheckBoxAll->isChecked() ); | ||
75 | 78 | ||
@@ -79,2 +82,6 @@ void MediumMountGui::writeConfig(bool autocheck) { | |||
79 | 82 | ||
83 | // if all is checked then add only "null" to the list. | ||
84 | if (checkmimeall) { | ||
85 | mimeTypeList += ("null"); | ||
86 | } else { | ||
80 | if (checkmimeaudio) { | 87 | if (checkmimeaudio) { |
@@ -85,9 +92,12 @@ void MediumMountGui::writeConfig(bool autocheck) { | |||
85 | } | 92 | } |
86 | if (checkmimeaudio) { | 93 | if (checkmimevideo) { |
87 | mimeTypeList += ("video//*"); | 94 | mimeTypeList += ("video//*"); |
88 | } | 95 | } |
89 | if (checkmimeaudio) { | 96 | if (checkmimeimage) { |
90 | mimeTypeList += ("image//*"); | 97 | mimeTypeList += ("image//*"); |
91 | } | 98 | } |
92 | 99 | if (checkmimeall) { | |
100 | mimeTypeList << ("null"); | ||
101 | } | ||
102 | } | ||
93 | } | 103 | } |
@@ -108,3 +118,3 @@ void MediumMountGui::startGui() { | |||
108 | GroupBox1 = new QGroupBox( this, "GroupBox1" ); | 118 | GroupBox1 = new QGroupBox( this, "GroupBox1" ); |
109 | GroupBox1->setGeometry( QRect( 10, 80, (this->width())-25, 60 ) ); | 119 | GroupBox1->setGeometry( QRect( 10, 80, (this->width())-25, 80 ) ); |
110 | GroupBox1->setTitle( tr( "Which media files" ) ); | 120 | GroupBox1->setTitle( tr( "Which media files" ) ); |
@@ -127,2 +137,16 @@ void MediumMountGui::startGui() { | |||
127 | 137 | ||
138 | CheckBoxAll = new QCheckBox ( GroupBox1); | ||
139 | CheckBoxAll->setGeometry( QRect( 10, 55, (GroupBox1->width()/2)-15, 15 ) ); | ||
140 | CheckBoxAll->setText( tr( "All" ) ); | ||
141 | QObject::connect( (QObject*)CheckBoxAll, SIGNAL( clicked() ), this, SLOT( deactivateOthers()) ); | ||
142 | |||
143 | |||
144 | |||
145 | CheckBoxLink = new QCheckBox ( GroupBox1); | ||
146 | CheckBoxLink->setGeometry( QRect( (GroupBox1->width()/2), 55, (GroupBox1->width()/2)-15, 15 ) ); | ||
147 | CheckBoxLink->setText( tr( "Link apps" ) ); | ||
148 | // as long as the feature is not supported | ||
149 | CheckBoxLink->setEnabled(false); | ||
150 | |||
151 | |||
128 | // select dirs | 152 | // select dirs |
@@ -174,2 +198,17 @@ void MediumMountGui::startGui() { | |||
174 | 198 | ||
199 | |||
200 | void MediumMountGui::deactivateOthers() { | ||
201 | bool mod = !(CheckBoxAll->isChecked()); | ||
202 | |||
203 | //if (!CheckBoxVideo->isChecked()){ | ||
204 | // mod = false; | ||
205 | //} else { | ||
206 | // mod = true; | ||
207 | //} | ||
208 | CheckBoxVideo->setEnabled(mod); | ||
209 | CheckBoxAudio->setEnabled(mod); | ||
210 | CheckBoxText->setEnabled(mod); | ||
211 | CheckBoxImage->setEnabled(mod); | ||
212 | } | ||
213 | |||
175 | void MediumMountGui::yesPressed() { | 214 | void MediumMountGui::yesPressed() { |
diff --git a/core/launcher/mediummountgui.h b/core/launcher/mediummountgui.h index 9802b29..2e04f94 100644 --- a/core/launcher/mediummountgui.h +++ b/core/launcher/mediummountgui.h | |||
@@ -36,2 +36,4 @@ protected: | |||
36 | QCheckBox* CheckBoxVideo; | 36 | QCheckBox* CheckBoxVideo; |
37 | QCheckBox* CheckBoxAll; | ||
38 | QCheckBox* CheckBoxLink; | ||
37 | QCheckBox* AskBox; | 39 | QCheckBox* AskBox; |
@@ -50,3 +52,3 @@ private slots: | |||
50 | void noPressed(); | 52 | void noPressed(); |
51 | 53 | void deactivateOthers(); | |
52 | private: | 54 | private: |
@@ -59,2 +61,3 @@ private: | |||
59 | bool checkmimevideo; | 61 | bool checkmimevideo; |
62 | bool checkmimeall; | ||
60 | QString limittodirs; | 63 | QString limittodirs; |