author | llornkcor <llornkcor> | 2002-02-24 17:05:29 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-02-24 17:05:29 (UTC) |
commit | f39b6cfe0cccca9dac39b4b15cfe076426d5a4c5 (patch) (unidiff) | |
tree | e0cd32c7d9d5673ca0ef317a52f1ce9cae1957c4 | |
parent | 3008905fb88af28835417f722642d93bd1417f69 (diff) | |
download | opie-f39b6cfe0cccca9dac39b4b15cfe076426d5a4c5.zip opie-f39b6cfe0cccca9dac39b4b15cfe076426d5a4c5.tar.gz opie-f39b6cfe0cccca9dac39b4b15cfe076426d5a4c5.tar.bz2 |
changed how view as text was being executed
-rw-r--r-- | noncore/unsupported/filebrowser/filebrowser.cpp | 6 |
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 | |||
@@ -14,32 +14,34 @@ | |||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "inlineedit.h" | 21 | #include "inlineedit.h" |
22 | #include "filebrowser.h" | 22 | #include "filebrowser.h" |
23 | #include "filePermissions.h" | 23 | #include "filePermissions.h" |
24 | #include <qpe/resource.h> | 24 | #include <qpe/resource.h> |
25 | #include <qpe/global.h> | 25 | #include <qpe/global.h> |
26 | #include <qpe/mimetype.h> | 26 | #include <qpe/mimetype.h> |
27 | #include <qpe/applnk.h> | 27 | #include <qpe/applnk.h> |
28 | 28 | ||
29 | #include <qcopchannel_qws.h> | 29 | #include <qcopchannel_qws.h> |
30 | #include <qcopenvelope_qws.h> | ||
31 | |||
30 | #include <qmessagebox.h> | 32 | #include <qmessagebox.h> |
31 | #include <qdir.h> | 33 | #include <qdir.h> |
32 | #include <qregexp.h> | 34 | #include <qregexp.h> |
33 | #include <qheader.h> | 35 | #include <qheader.h> |
34 | #include <qpe/qpetoolbar.h> | 36 | #include <qpe/qpetoolbar.h> |
35 | #include <qpopupmenu.h> | 37 | #include <qpopupmenu.h> |
36 | #include <qpe/qpemenubar.h> | 38 | #include <qpe/qpemenubar.h> |
37 | #include <qaction.h> | 39 | #include <qaction.h> |
38 | #include <qstringlist.h> | 40 | #include <qstringlist.h> |
39 | #include <qcursor.h> | 41 | #include <qcursor.h> |
40 | #include <qmultilineedit.h> | 42 | #include <qmultilineedit.h> |
41 | #include <qfont.h> | 43 | #include <qfont.h> |
42 | 44 | ||
43 | #include <unistd.h> | 45 | #include <unistd.h> |
44 | #include <stdlib.h> | 46 | #include <stdlib.h> |
45 | #include <sys/stat.h> | 47 | #include <sys/stat.h> |
@@ -533,33 +535,35 @@ void FileView::newFolder() | |||
533 | 535 | ||
534 | if((i = (FileItem *) firstChild()) == 0) return; | 536 | if((i = (FileItem *) firstChild()) == 0) return; |
535 | 537 | ||
536 | while( i ){ | 538 | while( i ){ |
537 | if( i->isDir() && ( i->getFilePath() == nd ) ){ | 539 | if( i->isDir() && ( i->getFilePath() == nd ) ){ |
538 | setCurrentItem( i ); | 540 | setCurrentItem( i ); |
539 | rename(); | 541 | rename(); |
540 | break; | 542 | break; |
541 | } | 543 | } |
542 | i = (FileItem *) i->nextSibling(); | 544 | i = (FileItem *) i->nextSibling(); |
543 | } | 545 | } |
544 | } | 546 | } |
545 | 547 | ||
546 | void FileView::viewAsText() | 548 | void FileView::viewAsText() |
547 | { | 549 | { |
548 | FileItem * i = (FileItem *) currentItem(); | 550 | FileItem * i = (FileItem *) currentItem(); |
549 | Global::execute( "textedit -f ", i->getFilePath() ); | 551 | QCopEnvelope e("QPE/Application/textedit","setDocument(QString)"); |
552 | e << i->getFilePath(); | ||
553 | // Global::execute( "textedit -f ", i->getFilePath() ); | ||
550 | } | 554 | } |
551 | 555 | ||
552 | void FileView::itemClicked( QListViewItem * i) | 556 | void FileView::itemClicked( QListViewItem * i) |
553 | { | 557 | { |
554 | FileItem * t = (FileItem *) i; | 558 | FileItem * t = (FileItem *) i; |
555 | 559 | ||
556 | if( t == NULL ) return; | 560 | if( t == NULL ) return; |
557 | if( t->isDir() ){ | 561 | if( t->isDir() ){ |
558 | setDir( t->getFilePath() ); | 562 | setDir( t->getFilePath() ); |
559 | } | 563 | } |
560 | } | 564 | } |
561 | 565 | ||
562 | void FileView::itemDblClicked( QListViewItem * i) | 566 | void FileView::itemDblClicked( QListViewItem * i) |
563 | { | 567 | { |
564 | FileItem * t = (FileItem *) i; | 568 | FileItem * t = (FileItem *) i; |
565 | 569 | ||