summaryrefslogtreecommitdiff
path: root/core
Unidiff
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/mediummountgui.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/launcher/mediummountgui.cpp b/core/launcher/mediummountgui.cpp
index f16a37d..f375236 100644
--- a/core/launcher/mediummountgui.cpp
+++ b/core/launcher/mediummountgui.cpp
@@ -88,146 +88,147 @@ void MediumMountGui::writeConfig(bool autocheck) {
88 mimeTypeList += QString::null; 88 mimeTypeList += QString::null;
89 } else { 89 } else {
90 if (checkmimeaudio) { 90 if (checkmimeaudio) {
91 mimeTypeList += ("audio/*"); 91 mimeTypeList += ("audio/*");
92 } 92 }
93 if (checkmimetext) { 93 if (checkmimetext) {
94 mimeTypeList += ("text/*"); 94 mimeTypeList += ("text/*");
95 } 95 }
96 if (checkmimevideo) { 96 if (checkmimevideo) {
97 mimeTypeList += ("video/*"); 97 mimeTypeList += ("video/*");
98 } 98 }
99 if (checkmimeimage) { 99 if (checkmimeimage) {
100 mimeTypeList += ("image/*"); 100 mimeTypeList += ("image/*");
101 } 101 }
102 } 102 }
103 m_cfg->write(); // not really needed here but just to be sure 103 m_cfg->write(); // not really needed here but just to be sure
104} 104}
105 105
106void MediumMountGui::startGui() { 106void MediumMountGui::startGui() {
107 107
108 QPixmap image = Resource::loadPixmap( "HelpBrowser"); 108 QPixmap image = Resource::loadPixmap( "HelpBrowser");
109 109
110 Text_2 = new QLabel( this ); 110 Text_2 = new QLabel( this );
111 Text_2->setGeometry( QRect( 10, 15, 40, 40 ) ); 111 Text_2->setGeometry( QRect( 10, 15, 40, 40 ) );
112 Text_2->setPixmap( image ); 112 Text_2->setPixmap( image );
113 113
114 Text = new QLabel( this, "Text" ); 114 Text = new QLabel( this, "Text" );
115 Text->setGeometry( QRect( 55, 11, this->width()-50, 50 ) ); 115 Text->setGeometry( QRect( 55, 11, this->width()-50, 50 ) );
116 Text->setText( tr( "A <b>storage medium</b> was inserted. Should it be scanned for media files?" ) ); 116 Text->setText( tr( "A <b>storage medium</b> was inserted. Should it be scanned for media files?" ) );
117 117
118 // media box 118 // media box
119 GroupBox1 = new QGroupBox( this, "GroupBox1" ); 119 GroupBox1 = new QGroupBox( this, "GroupBox1" );
120 GroupBox1->setGeometry( QRect( 10, 80, (this->width())-25, 80 ) ); 120 GroupBox1->setGeometry( QRect( 10, 80, (this->width())-25, 80 ) );
121 GroupBox1->setTitle( tr( "Which media files" ) ); 121 GroupBox1->setTitle( tr( "Which media files" ) );
122 122
123 CheckBoxAudio = new QCheckBox( GroupBox1, "CheckBoxAudio" ); 123 CheckBoxAudio = new QCheckBox( GroupBox1, "CheckBoxAudio" );
124 CheckBoxAudio->setGeometry( QRect( 10, 15, (GroupBox1->width()/2)-15 , 15 ) ); 124 CheckBoxAudio->setGeometry( QRect( 10, 15, (GroupBox1->width()/2)-15 , 15 ) );
125 CheckBoxAudio->setText( tr( "Audio" ) ); 125 CheckBoxAudio->setText( tr( "Audio" ) );
126 126
127 CheckBoxImage = new QCheckBox( GroupBox1, "CheckBoxImage" ); 127 CheckBoxImage = new QCheckBox( GroupBox1, "CheckBoxImage" );
128 CheckBoxImage->setGeometry( QRect( 10, 35,(GroupBox1->width()/2)-15, 15 ) ); 128 CheckBoxImage->setGeometry( QRect( 10, 35,(GroupBox1->width()/2)-15, 15 ) );
129 CheckBoxImage->setText( tr( "Image" ) ); 129 CheckBoxImage->setText( tr( "Image" ) );
130 130
131 CheckBoxText = new QCheckBox( GroupBox1, "CheckBoxText" ); 131 CheckBoxText = new QCheckBox( GroupBox1, "CheckBoxText" );
132 CheckBoxText->setGeometry( QRect((GroupBox1->width()/2) , 15, (GroupBox1->width()/2)-15, 15 ) ); 132 CheckBoxText->setGeometry( QRect((GroupBox1->width()/2) , 15, (GroupBox1->width()/2)-15, 15 ) );
133 CheckBoxText->setText( tr( "Text" ) ); 133 CheckBoxText->setText( tr( "Text" ) );
134 134
135 CheckBoxVideo = new QCheckBox( GroupBox1, "CheckBoxVideo" ); 135 CheckBoxVideo = new QCheckBox( GroupBox1, "CheckBoxVideo" );
136 CheckBoxVideo->setGeometry( QRect( (GroupBox1->width()/2), 35, (GroupBox1->width()/2)-15, 15 ) ); 136 CheckBoxVideo->setGeometry( QRect( (GroupBox1->width()/2), 35, (GroupBox1->width()/2)-15, 15 ) );
137 CheckBoxVideo->setText( tr( "Video" ) ); 137 CheckBoxVideo->setText( tr( "Video" ) );
138 138
139 CheckBoxAll = new QCheckBox ( GroupBox1); 139 CheckBoxAll = new QCheckBox ( GroupBox1);
140 CheckBoxAll->setGeometry( QRect( 10, 55, (GroupBox1->width()/2)-15, 15 ) ); 140 CheckBoxAll->setGeometry( QRect( 10, 55, (GroupBox1->width()/2)-15, 15 ) );
141 CheckBoxAll->setText( tr( "All" ) ); 141 CheckBoxAll->setText( tr( "All" ) );
142 QObject::connect( (QObject*)CheckBoxAll, SIGNAL( clicked() ), this, SLOT( deactivateOthers()) ); 142 QObject::connect( (QObject*)CheckBoxAll, SIGNAL( clicked() ), this, SLOT( deactivateOthers()) );
143 143
144 144
145 145
146 CheckBoxLink = new QCheckBox ( GroupBox1); 146 CheckBoxLink = new QCheckBox ( GroupBox1);
147 CheckBoxLink->setGeometry( QRect( (GroupBox1->width()/2), 55, (GroupBox1->width()/2)-15, 15 ) ); 147 CheckBoxLink->setGeometry( QRect( (GroupBox1->width()/2), 55, (GroupBox1->width()/2)-15, 15 ) );
148 CheckBoxLink->setText( tr( "Link apps" ) ); 148 CheckBoxLink->setText( tr( "Link apps" ) );
149 // as long as the feature is not supported 149 // as long as the feature is not supported
150 CheckBoxLink->setEnabled(false); 150 CheckBoxLink->setEnabled(false);
151 151
152 152
153 // select dirs 153 // select dirs
154 154
155 DirSelectText = new QLabel( this, "DirSelectText" ); 155 DirSelectText = new QLabel( this, "DirSelectText" );
156 DirSelectText->setGeometry( QRect( 10, 160,this->width() , 20 ) ); 156 DirSelectText->setGeometry( QRect( 10, 160,this->width() , 20 ) );
157 DirSelectText->setText( tr( "Limit search to dir: (not used yet)" ) ); 157 DirSelectText->setText( tr( "Limit search to dir: (not used yet)" ) );
158 158
159 LineEdit1 = new QLineEdit( this ); 159 LineEdit1 = new QLineEdit( this );
160 LineEdit1->setGeometry( QRect( 10, 180, (this->width())-60, 20 ) ); 160 LineEdit1->setGeometry( QRect( 10, 180, (this->width())-60, 20 ) );
161 161
162 PushButton3 = new QPushButton( this ); 162 PushButton3 = new QPushButton( this );
163 PushButton3->setGeometry( QRect( (this->width())-40, 180, 30, 20 ) ); 163 PushButton3->setGeometry( QRect( (this->width())-40, 180, 30, 20 ) );
164 PushButton3->setText( tr( "Add" ) ); 164 PushButton3->setText( tr( "Add" ) );
165 165
166 166
167 // decision 167 // decision
168 DirSelectText_2 = new QLabel( this ); 168 DirSelectText_2 = new QLabel( this );
169 DirSelectText_2->setGeometry( QRect( 10,240,this->width(), 15 ) ); 169 DirSelectText_2->setGeometry( QRect( 10,240,this->width(), 15 ) );
170 DirSelectText_2->setText( tr( "Your decision will be stored on the medium." ) ); 170 DirSelectText_2->setText( tr( "Your decision will be stored on the medium." ) );
171 171
172 // ask again 172 // ask again
173 AskBox = new QCheckBox( this ); 173 AskBox = new QCheckBox( this );
174 AskBox->setGeometry( QRect( 10, 215, (this->width())-15 , 15 ) ); 174 AskBox->setGeometry( QRect( 10, 215, (this->width())-15 , 15 ) );
175 AskBox->setText( tr( "Do not ask again for this medium" ) ); 175 AskBox->setText( tr( "Do not ask again for this medium" ) );
176 176
177 177
178 AskBox->setChecked(checkagain); 178 AskBox->setChecked(checkagain);
179 CheckBoxAudio->setChecked(checkmimeaudio); 179 CheckBoxAudio->setChecked(checkmimeaudio);
180 CheckBoxImage->setChecked(checkmimeimage); 180 CheckBoxImage->setChecked(checkmimeimage);
181 CheckBoxText->setChecked(checkmimetext); 181 CheckBoxText->setChecked(checkmimetext);
182 CheckBoxVideo->setChecked(checkmimevideo); 182 CheckBoxVideo->setChecked(checkmimevideo);
183 CheckBoxAll->setChecked( checkmimeall ); 183 CheckBoxAll->setChecked( checkmimeall );
184 deactivateOthers();
184 // buttons 185 // buttons
185 quit = new QPushButton( this ); 186 quit = new QPushButton( this );
186 quit->setGeometry( QRect( (this->width()/2)- 90 , 260, 80, 22 ) ); 187 quit->setGeometry( QRect( (this->width()/2)- 90 , 260, 80, 22 ) );
187 quit->setFocus(); 188 quit->setFocus();
188 quit->setText( tr( "Yes" ) ); 189 quit->setText( tr( "Yes" ) );
189 190
190 quit_2 = new QPushButton( this ); 191 quit_2 = new QPushButton( this );
191 quit_2->setGeometry( QRect((this->width()/2) , 260, 80, 22 ) ); 192 quit_2->setGeometry( QRect((this->width()/2) , 260, 80, 22 ) );
192 quit_2->setText( tr( "No" ) ); 193 quit_2->setText( tr( "No" ) );
193 194
194 QObject::connect( (QObject*)quit, SIGNAL( clicked() ), this, SLOT(yesPressed() ) ); 195 QObject::connect( (QObject*)quit, SIGNAL( clicked() ), this, SLOT(yesPressed() ) );
195 QObject::connect( (QObject*)quit_2, SIGNAL( clicked() ), this, SLOT(noPressed() ) ); 196 QObject::connect( (QObject*)quit_2, SIGNAL( clicked() ), this, SLOT(noPressed() ) );
196 197
197 198
198} 199}
199 200
200 201
201void MediumMountGui::deactivateOthers() { 202void MediumMountGui::deactivateOthers() {
202 bool mod = !(CheckBoxAll->isChecked()); 203 bool mod = !(CheckBoxAll->isChecked());
203 204
204 //if (!CheckBoxVideo->isChecked()){ 205 //if (!CheckBoxVideo->isChecked()){
205 // mod = false; 206 // mod = false;
206 //} else { 207 //} else {
207 // mod = true; 208 // mod = true;
208 //} 209 //}
209 CheckBoxVideo->setEnabled(mod); 210 CheckBoxVideo->setEnabled(mod);
210 CheckBoxAudio->setEnabled(mod); 211 CheckBoxAudio->setEnabled(mod);
211 CheckBoxText->setEnabled(mod); 212 CheckBoxText->setEnabled(mod);
212 CheckBoxImage->setEnabled(mod); 213 CheckBoxImage->setEnabled(mod);
213} 214}
214 215
215void MediumMountGui::yesPressed() { 216void MediumMountGui::yesPressed() {
216 writeConfig(true); 217 writeConfig(true);
217 // and do something 218 // and do something
218 accept(); 219 accept();
219} 220}
220 221
221 222
222QStringList MediumMountGui::mimeTypes(){ 223QStringList MediumMountGui::mimeTypes(){
223 return mimeTypeList; 224 return mimeTypeList;
224} 225}
225 226
226void MediumMountGui::noPressed() { 227void MediumMountGui::noPressed() {
227 writeConfig(false); 228 writeConfig(false);
228 reject(); 229 reject();
229} 230}
230 231
231MediumMountGui::~MediumMountGui(){ 232MediumMountGui::~MediumMountGui(){
232} 233}
233 234