summaryrefslogtreecommitdiff
authorzecke <zecke>2002-04-18 15:12:39 (UTC)
committer zecke <zecke>2002-04-18 15:12:39 (UTC)
commit800b7e7721bdb154abc5d8bf71297087224d04f1 (patch) (side-by-side diff)
tree973744c7c9ad9ab189c7f945afd554dcbd15f40e
parent3e39f0951c44769c00918faefffca77823eb2e8a (diff)
downloadopie-800b7e7721bdb154abc5d8bf71297087224d04f1.zip
opie-800b7e7721bdb154abc5d8bf71297087224d04f1.tar.gz
opie-800b7e7721bdb154abc5d8bf71297087224d04f1.tar.bz2
Harlekin does this fix the problems?
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/launcher.cpp8
-rw-r--r--core/launcher/mediummountgui.cpp12
2 files changed, 8 insertions, 12 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 979eee6..d1df4cc 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -59,77 +59,77 @@
#include "desktop.h"
#include <qpe/lnkproperties.h>
#include "mrulist.h"
#include "qrsync.h"
#include <stdlib.h>
#include <unistd.h>
#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
#include <stdio.h>
#include <sys/vfs.h>
#include <mntent.h>
#endif
#include <qpe/storage.h>
#include "mediummountgui.h"
//#define SHOW_ALL
// uidGen
// uidGen
namespace {
QStringList configToMime( Config *cfg ){
QStringList mimes;
bool tmpMime;
cfg->setGroup("mimetypes" );
tmpMime = cfg->readBoolEntry("all" ,false);
if( tmpMime ){
mimes << QString::null;
return mimes;
}else{
tmpMime = cfg->readBoolEntry("audio", true );
if(tmpMime )
- mimes.append("audio//*" );
+ mimes.append("audio/*" );
tmpMime = cfg->readBoolEntry("image", true );
if(tmpMime )
- mimes.append("image//*" );
+ mimes.append("image/*" );
tmpMime = cfg->readBoolEntry("text", true );
if(tmpMime )
- mimes.append("text//*");
+ mimes.append("text/*");
tmpMime = cfg->readBoolEntry("video", true );
if(tmpMime )
- mimes.append("video//*" );
+ mimes.append("video/*" );
}
return mimes;
}
}
CategoryTabWidget::CategoryTabWidget( QWidget* parent ) :
QVBox( parent )
{
categoryBar = 0;
stack = 0;
}
void CategoryTabWidget::prevTab()
{
if ( categoryBar ) {
int n = categoryBar->count();
int tab = categoryBar->currentTab();
if ( tab >= 0 )
categoryBar->setCurrentTab( (tab - 1 + n)%n );
}
}
void CategoryTabWidget::nextTab()
{
if ( categoryBar ) {
int n = categoryBar->count();
int tab = categoryBar->currentTab();
categoryBar->setCurrentTab( (tab + 1)%n );
}
}
diff --git a/core/launcher/mediummountgui.cpp b/core/launcher/mediummountgui.cpp
index f0de85b..e0acf4e 100644
--- a/core/launcher/mediummountgui.cpp
+++ b/core/launcher/mediummountgui.cpp
@@ -57,78 +57,74 @@ bool MediumMountGui::check() {
}
QStringList MediumMountGui::dirs() {
QStringList list = QStringList::split(",", limittodirs );
return list;
}
void MediumMountGui::writeConfig(bool autocheck) {
OConfig cfg (mediumPath +"/.opiestorage.cf");
cfg.setGroup("main");
cfg.writeEntry("check", AskBox->isChecked() );
cfg.writeEntry("autocheck", autocheck );
cfg.setGroup("mimetypes");
cfg.writeEntry("audio", CheckBoxAudio->isChecked() );
cfg.writeEntry("image",CheckBoxImage->isChecked() );
cfg.writeEntry("text",CheckBoxImage->isChecked() );
cfg.writeEntry("video",CheckBoxVideo->isChecked() );
cfg.writeEntry("all",CheckBoxAll->isChecked() );
cfg.setGroup("dirs");
cfg.writeEntry("dirs", "");
// if all is checked then add only "QString::null" to the list.
if (checkmimeall) {
mimeTypeList.clear();
mimeTypeList += QString::null;
} else {
if (checkmimeaudio) {
- mimeTypeList += ("audio//*");
+ mimeTypeList += ("audio/*");
}
if (checkmimetext) {
- mimeTypeList += ("text//*");
+ mimeTypeList += ("text/*");
}
if (checkmimevideo) {
- mimeTypeList += ("video//*");
+ mimeTypeList += ("video/*");
}
if (checkmimeimage) {
- mimeTypeList += ("image//*");
- }
- if (checkmimeall) {
- mimeTypeList.clear();
- mimeTypeList << QString::null;
+ mimeTypeList += ("image/*");
}
}
cfg.write(); // not really needed here but just to be sure
}
void MediumMountGui::startGui() {
QPixmap image = Resource::loadPixmap( "HelpBrowser");
Text_2 = new QLabel( this );
Text_2->setGeometry( QRect( 10, 15, 40, 40 ) );
Text_2->setPixmap( image );
Text = new QLabel( this, "Text" );
Text->setGeometry( QRect( 55, 11, this->width()-50, 50 ) );
Text->setText( tr( "A <b>storage medium</b> was inserted. Should it be scanned for media files?" ) );
// media box
GroupBox1 = new QGroupBox( this, "GroupBox1" );
GroupBox1->setGeometry( QRect( 10, 80, (this->width())-25, 80 ) );
GroupBox1->setTitle( tr( "Which media files" ) );
CheckBoxAudio = new QCheckBox( GroupBox1, "CheckBoxAudio" );
CheckBoxAudio->setGeometry( QRect( 10, 15, (GroupBox1->width()/2)-15 , 15 ) );
CheckBoxAudio->setText( tr( "Audio" ) );
CheckBoxImage = new QCheckBox( GroupBox1, "CheckBoxImage" );
CheckBoxImage->setGeometry( QRect( 10, 35,(GroupBox1->width()/2)-15, 15 ) );
CheckBoxImage->setText( tr( "Image" ) );
CheckBoxText = new QCheckBox( GroupBox1, "CheckBoxText" );
CheckBoxText->setGeometry( QRect((GroupBox1->width()/2) , 15, (GroupBox1->width()/2)-15, 15 ) );