Diffstat (limited to 'core/launcher/mediummountgui.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/launcher/mediummountgui.cpp | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/core/launcher/mediummountgui.cpp b/core/launcher/mediummountgui.cpp index e0acf4e..8cc2411 100644 --- a/core/launcher/mediummountgui.cpp +++ b/core/launcher/mediummountgui.cpp | |||
@@ -14,16 +14,18 @@ | |||
14 | #include <qpixmap.h> | 14 | #include <qpixmap.h> |
15 | 15 | ||
16 | #include <qpe/resource.h> | 16 | #include <qpe/resource.h> |
17 | #include <qpe/config.h> | ||
18 | |||
17 | #include <opie/oconfig.h> | 19 | #include <opie/oconfig.h> |
18 | 20 | ||
19 | 21 | ||
20 | #include <qapplication.h> | 22 | #include <qapplication.h> |
21 | 23 | ||
22 | 24 | ||
23 | MediumMountGui::MediumMountGui( const QString &path ,QWidget* parent, const char* name, bool modal, WFlags fl ) | 25 | MediumMountGui::MediumMountGui( Config *cfg, const QString &path ,QWidget* parent, const char* name, bool , WFlags ) |
24 | : QDialog( parent, name, true ) { | 26 | : QDialog( parent, name, true ) { |
25 | 27 | ||
26 | 28 | m_cfg = cfg; | |
27 | QWidget *d = QApplication::desktop(); | 29 | QWidget *d = QApplication::desktop(); |
28 | int w=d->width(); | 30 | int w=d->width(); |
29 | int h=d->height(); | 31 | int h=d->height(); |
@@ -37,19 +39,19 @@ MediumMountGui::MediumMountGui( const QString &path ,QWidget* parent, const cha | |||
37 | 39 | ||
38 | void MediumMountGui::readConfig(){ | 40 | void MediumMountGui::readConfig(){ |
39 | 41 | ||
40 | OConfig cfg (mediumPath +"/.opiestorage.cf"); | 42 | //OConfig cfg (mediumPath +"/.opiestorage.cf"); |
41 | cfg.setGroup("main"); | 43 | m_cfg->setGroup("main"); |
42 | checkagain = cfg.readBoolEntry("check", false); | 44 | checkagain = m_cfg->readBoolEntry("check", false); |
43 | 45 | ||
44 | cfg.setGroup("mimetypes"); | 46 | m_cfg->setGroup("mimetypes"); |
45 | checkmimeaudio = cfg.readBoolEntry("audio", true); | 47 | checkmimeaudio = m_cfg->readBoolEntry("audio", true); |
46 | checkmimeimage = cfg.readBoolEntry("image", true); | 48 | checkmimeimage = m_cfg->readBoolEntry("image", true); |
47 | checkmimetext = cfg.readBoolEntry("text", true); | 49 | checkmimetext = m_cfg->readBoolEntry("text", true); |
48 | checkmimevideo = cfg.readBoolEntry("video", true); | 50 | checkmimevideo = m_cfg->readBoolEntry("video", true); |
49 | checkmimeall = cfg.readBoolEntry("all", true); | 51 | checkmimeall = m_cfg->readBoolEntry("all", true); |
50 | 52 | ||
51 | cfg.setGroup("dirs"); | 53 | m_cfg->setGroup("dirs"); |
52 | limittodirs = cfg.readEntry("dirs", ""); | 54 | limittodirs = m_cfg->readEntry("dirs", ""); |
53 | } | 55 | } |
54 | 56 | ||
55 | bool MediumMountGui::check() { | 57 | bool MediumMountGui::check() { |
@@ -63,21 +65,21 @@ QStringList MediumMountGui::dirs() { | |||
63 | 65 | ||
64 | void MediumMountGui::writeConfig(bool autocheck) { | 66 | void MediumMountGui::writeConfig(bool autocheck) { |
65 | 67 | ||
66 | OConfig cfg (mediumPath +"/.opiestorage.cf"); | 68 | //OConfig cfg (mediumPath +"/.opiestorage.cf"); |
67 | cfg.setGroup("main"); | 69 | m_cfg->setGroup("main"); |
68 | cfg.writeEntry("check", AskBox->isChecked() ); | 70 | m_cfg->writeEntry("check", AskBox->isChecked() ); |
69 | cfg.writeEntry("autocheck", autocheck ); | 71 | m_cfg->writeEntry("autocheck", autocheck ); |
70 | 72 | ||
71 | cfg.setGroup("mimetypes"); | 73 | m_cfg->setGroup("mimetypes"); |
72 | 74 | ||
73 | cfg.writeEntry("audio", CheckBoxAudio->isChecked() ); | 75 | m_cfg->writeEntry("audio", CheckBoxAudio->isChecked() ); |
74 | cfg.writeEntry("image",CheckBoxImage->isChecked() ); | 76 | m_cfg->writeEntry("image",CheckBoxImage->isChecked() ); |
75 | cfg.writeEntry("text",CheckBoxImage->isChecked() ); | 77 | m_cfg->writeEntry("text",CheckBoxImage->isChecked() ); |
76 | cfg.writeEntry("video",CheckBoxVideo->isChecked() ); | 78 | m_cfg->writeEntry("video",CheckBoxVideo->isChecked() ); |
77 | cfg.writeEntry("all",CheckBoxAll->isChecked() ); | 79 | m_cfg->writeEntry("all",CheckBoxAll->isChecked() ); |
78 | 80 | ||
79 | cfg.setGroup("dirs"); | 81 | m_cfg->setGroup("dirs"); |
80 | cfg.writeEntry("dirs", ""); | 82 | m_cfg->writeEntry("dirs", ""); |
81 | 83 | ||
82 | 84 | ||
83 | // if all is checked then add only "QString::null" to the list. | 85 | // if all is checked then add only "QString::null" to the list. |
@@ -98,7 +100,7 @@ void MediumMountGui::writeConfig(bool autocheck) { | |||
98 | mimeTypeList += ("image/*"); | 100 | mimeTypeList += ("image/*"); |
99 | } | 101 | } |
100 | } | 102 | } |
101 | cfg.write(); // not really needed here but just to be sure | 103 | m_cfg->write(); // not really needed here but just to be sure |
102 | } | 104 | } |
103 | 105 | ||
104 | void MediumMountGui::startGui() { | 106 | void MediumMountGui::startGui() { |