-rw-r--r-- | core/apps/textedit/fileBrowser.cpp | 43 | ||||
-rw-r--r-- | core/apps/textedit/fileBrowser.h | 2 | ||||
-rw-r--r-- | noncore/net/opieftp/inputDialog.cpp | 4 | ||||
-rw-r--r-- | noncore/net/opieftp/inputDialog.h | 2 | ||||
-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 4 |
5 files changed, 35 insertions, 20 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 | |||
@@ -12,5 +12,5 @@ | |||
12 | ** | 12 | ** |
13 | ****************************************************************************/ | 13 | ****************************************************************************/ |
14 | #define QTOPIA_INTERNAL_MIMEEXT | 14 | //#define QTOPIA_INTERNAL_MIMEEXT |
15 | #include "fileBrowser.h" | 15 | #include "fileBrowser.h" |
16 | //#include "inputDialog.h" | 16 | //#include "inputDialog.h" |
@@ -51,10 +51,17 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags | |||
51 | setName( "fileBrowser" ); | 51 | setName( "fileBrowser" ); |
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()); |
60 | // qDebug( "id "+mt.id()); | 67 | // qDebug( "id "+mt.id()); |
@@ -69,5 +76,5 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags | |||
69 | layout->setMargin( 4 ); | 76 | layout->setMargin( 4 ); |
70 | 77 | ||
71 | dirPathCombo = new QComboBox( FALSE, this, "dorPathCombo" ); | 78 | dirPathCombo = new QComboBox( FALSE, this, "dirPathCombo" ); |
72 | dirPathCombo->setEditable(TRUE); | 79 | dirPathCombo->setEditable(TRUE); |
73 | 80 | ||
@@ -131,5 +138,6 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags | |||
131 | // connect( fileSelector, SIGNAL( closeMe() ), this, SLOT( showEditTools() ) ); | 138 | // connect( fileSelector, SIGNAL( closeMe() ), this, SLOT( showEditTools() ) ); |
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 ); |
135 | 143 | ||
@@ -217,5 +225,5 @@ void fileBrowser::populateList() | |||
217 | else { | 225 | else { |
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()) |
221 | pm = Resource::loadPixmap( "UnknownDocument-14" ); | 229 | pm = Resource::loadPixmap( "UnknownDocument-14" ); |
@@ -418,5 +426,5 @@ void fileBrowser::localRename() { | |||
418 | InputDialog *fileDlg; | 426 | InputDialog *fileDlg; |
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(); |
422 | if( fileDlg->result() == 1 ) { | 430 | if( fileDlg->result() == 1 ) { |
@@ -493,12 +501,12 @@ void fileBrowser::showType(const QString &t) { | |||
493 | mimeType =(*it); | 501 | mimeType =(*it); |
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() ); |
504 | } | 512 | } |
@@ -612,2 +620,5 @@ InputDialog::~InputDialog() | |||
612 | } | 620 | } |
613 | 621 | ||
622 | void InputDialog::setTextEdit(const QString &string) { | ||
623 | LineEdit1->setText(string); | ||
624 | } | ||
diff --git a/core/apps/textedit/fileBrowser.h b/core/apps/textedit/fileBrowser.h index e76c7df..3db6a27 100644 --- a/core/apps/textedit/fileBrowser.h +++ b/core/apps/textedit/fileBrowser.h | |||
@@ -114,5 +114,5 @@ public: | |||
114 | QString inputText; | 114 | QString inputText; |
115 | QLineEdit* LineEdit1; | 115 | QLineEdit* LineEdit1; |
116 | 116 | void setTextEdit(const QString &); | |
117 | }; | 117 | }; |
118 | 118 | ||
diff --git a/noncore/net/opieftp/inputDialog.cpp b/noncore/net/opieftp/inputDialog.cpp index 89b345e..373db3b 100644 --- a/noncore/net/opieftp/inputDialog.cpp +++ b/noncore/net/opieftp/inputDialog.cpp | |||
@@ -39,2 +39,6 @@ InputDialog::~InputDialog() | |||
39 | } | 39 | } |
40 | 40 | ||
41 | void InputDialog::setTextEdit(const QString &string) | ||
42 | { | ||
43 | LineEdit1->setText(string); | ||
44 | } | ||
diff --git a/noncore/net/opieftp/inputDialog.h b/noncore/net/opieftp/inputDialog.h index 2cd8285..dfe0e8a 100644 --- a/noncore/net/opieftp/inputDialog.h +++ b/noncore/net/opieftp/inputDialog.h | |||
@@ -29,5 +29,5 @@ public: | |||
29 | QString inputText; | 29 | QString inputText; |
30 | QLineEdit* LineEdit1; | 30 | QLineEdit* LineEdit1; |
31 | 31 | void setTextEdit(const QString &); | |
32 | }; | 32 | }; |
33 | 33 | ||
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index e64fd73..b451925 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp | |||
@@ -944,5 +944,5 @@ void OpieFtp::remoteRename() | |||
944 | InputDialog *fileDlg; | 944 | InputDialog *fileDlg; |
945 | fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0); | 945 | fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0); |
946 | fileDlg->inputText = curFile; | 946 | fileDlg->setTextEdit((const QString &)curFile); |
947 | fileDlg->exec(); | 947 | fileDlg->exec(); |
948 | if( fileDlg->result() == 1 ) { | 948 | if( fileDlg->result() == 1 ) { |
@@ -966,5 +966,5 @@ void OpieFtp::localRename() | |||
966 | InputDialog *fileDlg; | 966 | InputDialog *fileDlg; |
967 | fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0); | 967 | fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0); |
968 | fileDlg->inputText = curFile; | 968 | fileDlg->setTextEdit((const QString &)curFile); |
969 | fileDlg->exec(); | 969 | fileDlg->exec(); |
970 | if( fileDlg->result() == 1 ) { | 970 | if( fileDlg->result() == 1 ) { |