Diffstat (limited to 'core/apps/textedit/fileBrowser.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/apps/textedit/fileBrowser.cpp | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/core/apps/textedit/fileBrowser.cpp b/core/apps/textedit/fileBrowser.cpp index 8ea8067..652f830 100644 --- a/core/apps/textedit/fileBrowser.cpp +++ b/core/apps/textedit/fileBrowser.cpp | |||
@@ -13,3 +13,3 @@ | |||
13 | ****************************************************************************/ | 13 | ****************************************************************************/ |
14 | #define QTOPIA_INTERNAL_MIMEEXT | 14 | //#define QTOPIA_INTERNAL_MIMEEXT |
15 | #include "fileBrowser.h" | 15 | #include "fileBrowser.h" |
@@ -52,8 +52,15 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags | |||
52 | setCaption(tr( name ) ); | 52 | setCaption(tr( name ) ); |
53 | mimeType = mimeFilter; | 53 | // mimeType = mimeFilter; |
54 | MimeType mt( mimeType); | 54 | // MimeType mt( mimeType); |
55 | if( mt.extension().isEmpty()) | 55 | // if( mt.extension().isEmpty()) |
56 | filterStr = "*"; | 56 | QStringList filterList; |
57 | else | 57 | filterList=QStringList::split(";",mimeFilter,FALSE); |
58 | filterStr = "*."+ mt.extension(); | 58 | for ( QStringList::Iterator it = filterList.begin(); it != filterList.end(); ++it ) { |
59 | printf( "%s \n", (*it).latin1() ); | ||
60 | } | ||
61 | |||
62 | filterStr = mimeFilter.right(mimeFilter.length()- mimeFilter.find("/",0,TRUE) - 1);// "*"; | ||
63 | qDebug(filterStr); | ||
64 | // else | ||
65 | // filterStr = "*."+ mt.extension(); | ||
59 | // qDebug("description "+mt.description()); | 66 | // qDebug("description "+mt.description()); |
@@ -70,3 +77,3 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags | |||
70 | 77 | ||
71 | dirPathCombo = new QComboBox( FALSE, this, "dorPathCombo" ); | 78 | dirPathCombo = new QComboBox( FALSE, this, "dirPathCombo" ); |
72 | dirPathCombo->setEditable(TRUE); | 79 | dirPathCombo->setEditable(TRUE); |
@@ -132,3 +139,4 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags | |||
132 | // connect( fileSelector, SIGNAL( newSelected( const DocLnk &) ), this, SLOT( newFile( const DocLnk & ) ) ); | 139 | // connect( fileSelector, SIGNAL( newSelected( const DocLnk &) ), this, SLOT( newFile( const DocLnk & ) ) ); |
133 | connect( fileSelector, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( docOpen( const DocLnk & ) ) ); | 140 | connect( fileSelector, SIGNAL( fileSelected( const DocLnk &) ), |
141 | this, SLOT( docOpen( const DocLnk & ) ) ); | ||
134 | layout->addMultiCellWidget( FileStack, 1, 1, 0, 7 ); | 142 | layout->addMultiCellWidget( FileStack, 1, 1, 0, 7 ); |
@@ -218,3 +226,3 @@ void fileBrowser::populateList() | |||
218 | MimeType mt(fi->filePath()); | 226 | MimeType mt(fi->filePath()); |
219 | pm=mt.pixmap(); | 227 | pm=mt.pixmap();// sets the pixmap for the mimetype |
220 | if(pm.isNull()) | 228 | if(pm.isNull()) |
@@ -419,3 +427,3 @@ void fileBrowser::localRename() { | |||
419 | fileDlg = new InputDialog(this,"Rename",TRUE, 0); | 427 | fileDlg = new InputDialog(this,"Rename",TRUE, 0); |
420 | fileDlg->inputText = curFile; | 428 | fileDlg->setTextEdit((const QString &) curFile); |
421 | fileDlg->exec(); | 429 | fileDlg->exec(); |
@@ -494,10 +502,10 @@ void fileBrowser::showType(const QString &t) { | |||
494 | MimeType mt( mimeType); | 502 | MimeType mt( mimeType); |
495 | qDebug("mime "+mimeType); | 503 | // qDebug("mime "+mimeType); |
496 | // qDebug("description "+mt.description()); | 504 | // qDebug("description "+mt.description()); |
497 | // qDebug( "id "+mt.id()); | 505 | // qDebug( "id "+mt.id()); |
498 | qDebug("extension "+mt.extension()); | 506 | // qDebug("extension "+mt.extension()); |
499 | if( mt.extension().isEmpty()) | 507 | // if( mt.extension().isEmpty()) |
500 | filterStr = "*"; | 508 | filterStr = "*"; |
501 | else | 509 | // else |
502 | filterStr = "*."+ mt.extension()+" "; | 510 | // filterStr = "*."+ mt.extension()+" "; |
503 | // printf( "%s \n", (*it).latin1() ); | 511 | // printf( "%s \n", (*it).latin1() ); |
@@ -613 +621,4 @@ InputDialog::~InputDialog() | |||
613 | 621 | ||
622 | void InputDialog::setTextEdit(const QString &string) { | ||
623 | LineEdit1->setText(string); | ||
624 | } | ||