summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/fileBrowser.cpp43
-rw-r--r--core/apps/textedit/fileBrowser.h2
-rw-r--r--noncore/net/opieftp/inputDialog.cpp4
-rw-r--r--noncore/net/opieftp/inputDialog.h2
-rw-r--r--noncore/net/opieftp/opieftp.cpp4
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
@@ -13,3 +13,3 @@
****************************************************************************/
-#define QTOPIA_INTERNAL_MIMEEXT
+//#define QTOPIA_INTERNAL_MIMEEXT
#include "fileBrowser.h"
@@ -52,8 +52,15 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags
setCaption(tr( name ) );
- mimeType = mimeFilter;
- MimeType mt( mimeType);
- if( mt.extension().isEmpty())
- filterStr = "*";
- else
- filterStr = "*."+ mt.extension();
+// mimeType = mimeFilter;
+// MimeType mt( mimeType);
+// if( mt.extension().isEmpty())
+ QStringList filterList;
+ filterList=QStringList::split(";",mimeFilter,FALSE);
+ for ( QStringList::Iterator it = filterList.begin(); it != filterList.end(); ++it ) {
+ printf( "%s \n", (*it).latin1() );
+ }
+
+ filterStr = mimeFilter.right(mimeFilter.length()- mimeFilter.find("/",0,TRUE) - 1);// "*";
+ qDebug(filterStr);
+// else
+// filterStr = "*."+ mt.extension();
// qDebug("description "+mt.description());
@@ -70,3 +77,3 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags
- dirPathCombo = new QComboBox( FALSE, this, "dorPathCombo" );
+ dirPathCombo = new QComboBox( FALSE, this, "dirPathCombo" );
dirPathCombo->setEditable(TRUE);
@@ -132,3 +139,4 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags
// connect( fileSelector, SIGNAL( newSelected( const DocLnk &) ), this, SLOT( newFile( const DocLnk & ) ) );
- connect( fileSelector, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( docOpen( const DocLnk & ) ) );
+ connect( fileSelector, SIGNAL( fileSelected( const DocLnk &) ),
+ this, SLOT( docOpen( const DocLnk & ) ) );
layout->addMultiCellWidget( FileStack, 1, 1, 0, 7 );
@@ -218,3 +226,3 @@ void fileBrowser::populateList()
MimeType mt(fi->filePath());
- pm=mt.pixmap();
+ pm=mt.pixmap();// sets the pixmap for the mimetype
if(pm.isNull())
@@ -419,3 +427,3 @@ void fileBrowser::localRename() {
fileDlg = new InputDialog(this,"Rename",TRUE, 0);
- fileDlg->inputText = curFile;
+ fileDlg->setTextEdit((const QString &) curFile);
fileDlg->exec();
@@ -494,10 +502,10 @@ void fileBrowser::showType(const QString &t) {
MimeType mt( mimeType);
- qDebug("mime "+mimeType);
+// qDebug("mime "+mimeType);
// qDebug("description "+mt.description());
// qDebug( "id "+mt.id());
- qDebug("extension "+mt.extension());
- if( mt.extension().isEmpty())
+// qDebug("extension "+mt.extension());
+// if( mt.extension().isEmpty())
filterStr = "*";
- else
- filterStr = "*."+ mt.extension()+" ";
+// else
+// filterStr = "*."+ mt.extension()+" ";
// printf( "%s \n", (*it).latin1() );
@@ -613 +621,4 @@ InputDialog::~InputDialog()
+void InputDialog::setTextEdit(const QString &string) {
+ LineEdit1->setText(string);
+}
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
@@ -115,3 +115,3 @@ public:
QLineEdit* LineEdit1;
-
+ void setTextEdit(const QString &);
};
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
@@ -40 +40,5 @@ InputDialog::~InputDialog()
+void InputDialog::setTextEdit(const QString &string)
+{
+ LineEdit1->setText(string);
+}
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
@@ -30,3 +30,3 @@ public:
QLineEdit* LineEdit1;
-
+ void setTextEdit(const QString &);
};
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
@@ -945,3 +945,3 @@ void OpieFtp::remoteRename()
fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0);
- fileDlg->inputText = curFile;
+ fileDlg->setTextEdit((const QString &)curFile);
fileDlg->exec();
@@ -967,3 +967,3 @@ void OpieFtp::localRename()
fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0);
- fileDlg->inputText = curFile;
+ fileDlg->setTextEdit((const QString &)curFile);
fileDlg->exec();