summaryrefslogtreecommitdiff
path: root/core
authorzecke <zecke>2002-06-26 19:23:12 (UTC)
committer zecke <zecke>2002-06-26 19:23:12 (UTC)
commitc229565c40d478555a9ed0aa4910b9ab8181884c (patch) (side-by-side diff)
tree47fb5d00bf3c21ddd0e64dc4571f7dcba3516db9 /core
parent7b3b485aff7fc5f5cdef40a7d4989295d5c8ab4a (diff)
downloadopie-c229565c40d478555a9ed0aa4910b9ab8181884c.zip
opie-c229565c40d478555a9ed0aa4910b9ab8181884c.tar.gz
opie-c229565c40d478555a9ed0aa4910b9ab8181884c.tar.bz2
Adjust mimetype handling
LJP and Max look at it.
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/inputDialog.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/core/multimedia/opieplayer/inputDialog.cpp b/core/multimedia/opieplayer/inputDialog.cpp
index b46c154..da8e276 100644
--- a/core/multimedia/opieplayer/inputDialog.cpp
+++ b/core/multimedia/opieplayer/inputDialog.cpp
@@ -22,9 +22,9 @@ InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "InputDialog" );
- resize( 234, 115);
+ resize( 234, 115);
setMaximumSize( QSize( 240, 40));
setCaption( tr(name ) );
QPushButton *browserButton;
@@ -34,19 +34,34 @@ InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags
LineEdit1 = new QLineEdit( this, "LineEdit1" );
LineEdit1->setGeometry( QRect( 4, 10, 190, 22 ) );
}
-/*
+/*
* Destroys the object and frees any allocated resources
*/
InputDialog::~InputDialog()
{
inputText= LineEdit1->text();
-
+
}
void InputDialog::browse() {
- QString str = OFileDialog::getOpenFileName( 1,"/","", "audio/*;video/*;playlist/plain;audio/x-mpegurl", 0 );
+ MimeTypes types;
+ QStringList audio, video, all;
+ audio << "audio/*";
+ audio << "playlist/plain";
+ audio << "audio/x-mpegurl";
+
+ video << "video/*";
+ video << "playlist/plain";
+
+ all += audio;
+ all += video;
+ types.insert("All Media Files", all );
+ types.insert("Audio", audio );
+ types.insert("Video", video );
+
+ QString str = OFileDialog::getOpenFileName( 1,"/","", types, 0 );
LineEdit1->setText(str);
}