author | zecke <zecke> | 2002-04-26 21:10:41 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-04-26 21:10:41 (UTC) |
commit | 890372105af575d9c13c8ce5c450f4fa061ecffe (patch) (unidiff) | |
tree | 3f22a157f7fd4dce4105cc2095b9074c9e358e57 /core | |
parent | b59a0401cf09669e05d3e68dd289ed0bb25ced6e (diff) | |
download | opie-890372105af575d9c13c8ce5c450f4fa061ecffe.zip opie-890372105af575d9c13c8ce5c450f4fa061ecffe.tar.gz opie-890372105af575d9c13c8ce5c450f4fa061ecffe.tar.bz2 |
Remember to check ChechBoxAll so we can remember even the state of that
-rw-r--r-- | core/launcher/mediummountgui.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/launcher/mediummountgui.cpp b/core/launcher/mediummountgui.cpp index 8cc2411..f16a37d 100644 --- a/core/launcher/mediummountgui.cpp +++ b/core/launcher/mediummountgui.cpp | |||
@@ -23,53 +23,53 @@ | |||
23 | 23 | ||
24 | 24 | ||
25 | MediumMountGui::MediumMountGui( Config *cfg, const QString &path ,QWidget* parent, const char* name, bool , WFlags ) | 25 | MediumMountGui::MediumMountGui( Config *cfg, const QString &path ,QWidget* parent, const char* name, bool , WFlags ) |
26 | : QDialog( parent, name, true ) { | 26 | : QDialog( parent, name, true ) { |
27 | 27 | ||
28 | m_cfg = cfg; | 28 | m_cfg = cfg; |
29 | QWidget *d = QApplication::desktop(); | 29 | QWidget *d = QApplication::desktop(); |
30 | int w=d->width(); | 30 | int w=d->width(); |
31 | int h=d->height(); | 31 | int h=d->height(); |
32 | resize( w , h ); | 32 | resize( w , h ); |
33 | setCaption( tr( "Medium inserted" ) ); | 33 | setCaption( tr( "Medium inserted" ) ); |
34 | 34 | ||
35 | mediumPath = path; | 35 | mediumPath = path; |
36 | readConfig(); | 36 | readConfig(); |
37 | startGui(); | 37 | startGui(); |
38 | } | 38 | } |
39 | 39 | ||
40 | void MediumMountGui::readConfig(){ | 40 | void MediumMountGui::readConfig(){ |
41 | 41 | ||
42 | //OConfig cfg (mediumPath +"/.opiestorage.cf"); | 42 | //OConfig cfg (mediumPath +"/.opiestorage.cf"); |
43 | m_cfg->setGroup("main"); | 43 | m_cfg->setGroup("main"); |
44 | checkagain = m_cfg->readBoolEntry("check", false); | 44 | checkagain = m_cfg->readBoolEntry("check", false); |
45 | 45 | ||
46 | m_cfg->setGroup("mimetypes"); | 46 | m_cfg->setGroup("mimetypes"); |
47 | checkmimeaudio = m_cfg->readBoolEntry("audio", true); | 47 | checkmimeaudio = m_cfg->readBoolEntry("audio", true ); |
48 | checkmimeimage = m_cfg->readBoolEntry("image", true); | 48 | checkmimeimage = m_cfg->readBoolEntry("image", true ); |
49 | checkmimetext = m_cfg->readBoolEntry("text", true); | 49 | checkmimetext = m_cfg->readBoolEntry("text" , true ); |
50 | checkmimevideo = m_cfg->readBoolEntry("video", true); | 50 | checkmimevideo = m_cfg->readBoolEntry("video", true ); |
51 | checkmimeall = m_cfg->readBoolEntry("all", true); | 51 | checkmimeall = m_cfg->readBoolEntry("all" , false); |
52 | 52 | ||
53 | m_cfg->setGroup("dirs"); | 53 | m_cfg->setGroup("dirs"); |
54 | limittodirs = m_cfg->readEntry("dirs", ""); | 54 | limittodirs = m_cfg->readEntry("dirs", ""); |
55 | } | 55 | } |
56 | 56 | ||
57 | bool MediumMountGui::check() { | 57 | bool MediumMountGui::check() { |
58 | return !checkagain; | 58 | return !checkagain; |
59 | } | 59 | } |
60 | 60 | ||
61 | QStringList MediumMountGui::dirs() { | 61 | QStringList MediumMountGui::dirs() { |
62 | QStringList list = QStringList::split(",", limittodirs ); | 62 | QStringList list = QStringList::split(",", limittodirs ); |
63 | return list; | 63 | return list; |
64 | } | 64 | } |
65 | 65 | ||
66 | void MediumMountGui::writeConfig(bool autocheck) { | 66 | void MediumMountGui::writeConfig(bool autocheck) { |
67 | 67 | ||
68 | //OConfig cfg (mediumPath +"/.opiestorage.cf"); | 68 | //OConfig cfg (mediumPath +"/.opiestorage.cf"); |
69 | m_cfg->setGroup("main"); | 69 | m_cfg->setGroup("main"); |
70 | m_cfg->writeEntry("check", AskBox->isChecked() ); | 70 | m_cfg->writeEntry("check", AskBox->isChecked() ); |
71 | m_cfg->writeEntry("autocheck", autocheck ); | 71 | m_cfg->writeEntry("autocheck", autocheck ); |
72 | 72 | ||
73 | m_cfg->setGroup("mimetypes"); | 73 | m_cfg->setGroup("mimetypes"); |
74 | 74 | ||
75 | m_cfg->writeEntry("audio", CheckBoxAudio->isChecked() ); | 75 | m_cfg->writeEntry("audio", CheckBoxAudio->isChecked() ); |
@@ -159,49 +159,49 @@ void MediumMountGui::startGui() { | |||
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 | 183 | CheckBoxAll->setChecked( checkmimeall ); | |
184 | // buttons | 184 | // buttons |
185 | quit = new QPushButton( this ); | 185 | quit = new QPushButton( this ); |
186 | quit->setGeometry( QRect( (this->width()/2)- 90 , 260, 80, 22 ) ); | 186 | quit->setGeometry( QRect( (this->width()/2)- 90 , 260, 80, 22 ) ); |
187 | quit->setFocus(); | 187 | quit->setFocus(); |
188 | quit->setText( tr( "Yes" ) ); | 188 | quit->setText( tr( "Yes" ) ); |
189 | 189 | ||
190 | quit_2 = new QPushButton( this ); | 190 | quit_2 = new QPushButton( this ); |
191 | quit_2->setGeometry( QRect((this->width()/2) , 260, 80, 22 ) ); | 191 | quit_2->setGeometry( QRect((this->width()/2) , 260, 80, 22 ) ); |
192 | quit_2->setText( tr( "No" ) ); | 192 | quit_2->setText( tr( "No" ) ); |
193 | 193 | ||
194 | QObject::connect( (QObject*)quit, SIGNAL( clicked() ), this, SLOT(yesPressed() ) ); | 194 | QObject::connect( (QObject*)quit, SIGNAL( clicked() ), this, SLOT(yesPressed() ) ); |
195 | QObject::connect( (QObject*)quit_2, SIGNAL( clicked() ), this, SLOT(noPressed() ) ); | 195 | QObject::connect( (QObject*)quit_2, SIGNAL( clicked() ), this, SLOT(noPressed() ) ); |
196 | 196 | ||
197 | 197 | ||
198 | } | 198 | } |
199 | 199 | ||
200 | 200 | ||
201 | void MediumMountGui::deactivateOthers() { | 201 | void MediumMountGui::deactivateOthers() { |
202 | bool mod = !(CheckBoxAll->isChecked()); | 202 | bool mod = !(CheckBoxAll->isChecked()); |
203 | 203 | ||
204 | //if (!CheckBoxVideo->isChecked()){ | 204 | //if (!CheckBoxVideo->isChecked()){ |
205 | // mod = false; | 205 | // mod = false; |
206 | //} else { | 206 | //} else { |
207 | // mod = true; | 207 | // mod = true; |