author | harlekin <harlekin> | 2002-03-22 15:34:21 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-03-22 15:34:21 (UTC) |
commit | 3e2720971a92079e56f61ad257ef6c2df2a2b0b4 (patch) (side-by-side diff) | |
tree | 4aba55be8c0c8b1fad2efd1bd362e1a1f68715a2 | |
parent | a25901e13435a44576229bbda344aedf138863b0 (diff) | |
download | opie-3e2720971a92079e56f61ad257ef6c2df2a2b0b4.zip opie-3e2720971a92079e56f61ad257ef6c2df2a2b0b4.tar.gz opie-3e2720971a92079e56f61ad257ef6c2df2a2b0b4.tar.bz2 |
more stuff
-rw-r--r-- | core/launcher/mediummountgui.cpp | 26 | ||||
-rw-r--r-- | core/launcher/mediummountgui.h | 5 |
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 @@ -50,31 +50,50 @@ void MediumMountGui::readConfig(){ cfg.setGroup("dirs"); limittodirs = cfg.readEntry("dirs", "/"); } 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() ); cfg.setGroup("mimetypes"); 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"); Text_2 = new QLabel( this ); Text_2->setGeometry( QRect( 10, 15, 40, 40 ) ); @@ -152,15 +171,20 @@ 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 @@ -33,17 +33,18 @@ protected: QCheckBox* CheckBoxAudio; QCheckBox* CheckBoxImage; QCheckBox* CheckBoxText; QCheckBox* CheckBoxVideo; QCheckBox* AskBox; public: bool check(); - + QStringList mimeTypes(); + QStringList dirs(); private: void startGui(); void readConfig(); void writeConfig(); private slots: void yesPressed(); void noPressed(); @@ -51,13 +52,13 @@ private: QString mediumPath; bool checkagain; bool checkmimeaudio; bool checkmimeimage; bool checkmimetext; bool checkmimevideo; QString limittodirs; - +QStringList mimeTypeList; }; #endif
\ No newline at end of file |