summaryrefslogtreecommitdiff
path: root/noncore/unsupported
authorllornkcor <llornkcor>2002-02-24 17:05:29 (UTC)
committer llornkcor <llornkcor>2002-02-24 17:05:29 (UTC)
commitf39b6cfe0cccca9dac39b4b15cfe076426d5a4c5 (patch) (side-by-side diff)
treee0cd32c7d9d5673ca0ef317a52f1ce9cae1957c4 /noncore/unsupported
parent3008905fb88af28835417f722642d93bd1417f69 (diff)
downloadopie-f39b6cfe0cccca9dac39b4b15cfe076426d5a4c5.zip
opie-f39b6cfe0cccca9dac39b4b15cfe076426d5a4c5.tar.gz
opie-f39b6cfe0cccca9dac39b4b15cfe076426d5a4c5.tar.bz2
changed how view as text was being executed
Diffstat (limited to 'noncore/unsupported') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/filebrowser/filebrowser.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/noncore/unsupported/filebrowser/filebrowser.cpp b/noncore/unsupported/filebrowser/filebrowser.cpp
index eaf5eeb..10dff07 100644
--- a/noncore/unsupported/filebrowser/filebrowser.cpp
+++ b/noncore/unsupported/filebrowser/filebrowser.cpp
@@ -6,48 +6,50 @@
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "inlineedit.h"
#include "filebrowser.h"
#include "filePermissions.h"
#include <qpe/resource.h>
#include <qpe/global.h>
#include <qpe/mimetype.h>
#include <qpe/applnk.h>
#include <qcopchannel_qws.h>
+#include <qcopenvelope_qws.h>
+
#include <qmessagebox.h>
#include <qdir.h>
#include <qregexp.h>
#include <qheader.h>
#include <qpe/qpetoolbar.h>
#include <qpopupmenu.h>
#include <qpe/qpemenubar.h>
#include <qaction.h>
#include <qstringlist.h>
#include <qcursor.h>
#include <qmultilineedit.h>
#include <qfont.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/stat.h>
//
// FileItem
//
FileItem::FileItem( QListView * parent, const QFileInfo & fi )
: QListViewItem( parent ),
fileInfo( fi )
{
@@ -525,49 +527,51 @@ void FileView::newFolder()
if( mkdir( (const char *) nd, 0777 ) != 0){
QMessageBox::warning( this, tr( "New folder" ),
tr( "Folder creation failed!" ),
tr( "Ok" ) );
return;
}
updateDir();
if((i = (FileItem *) firstChild()) == 0) return;
while( i ){
if( i->isDir() && ( i->getFilePath() == nd ) ){
setCurrentItem( i );
rename();
break;
}
i = (FileItem *) i->nextSibling();
}
}
void FileView::viewAsText()
{
FileItem * i = (FileItem *) currentItem();
- Global::execute( "textedit -f ", i->getFilePath() );
+ QCopEnvelope e("QPE/Application/textedit","setDocument(QString)");
+ e << i->getFilePath();
+// Global::execute( "textedit -f ", i->getFilePath() );
}
void FileView::itemClicked( QListViewItem * i)
{
FileItem * t = (FileItem *) i;
if( t == NULL ) return;
if( t->isDir() ){
setDir( t->getFilePath() );
}
}
void FileView::itemDblClicked( QListViewItem * i)
{
FileItem * t = (FileItem *) i;
if(t == NULL) return;
if(t->launch() == -1){
QMessageBox::warning( this, tr( "Launch Application" ),
tr( "Launch failed!" ), tr( "Ok" ) );
}
}
void FileView::parentDir()