summaryrefslogtreecommitdiff
authordrw <drw>2005-05-04 23:07:10 (UTC)
committer drw <drw>2005-05-04 23:07:10 (UTC)
commitd89cbf4ba511beaf228ce87d4e21a2a6a49767f2 (patch) (unidiff)
treed7c1518bfa0550b99d73fe85630cebe351155a37
parent5db2256e7e342f290e17096cf70b8b318bfcd987 (diff)
downloadopie-d89cbf4ba511beaf228ce87d4e21a2a6a49767f2.zip
opie-d89cbf4ba511beaf228ce87d4e21a2a6a49767f2.tar.gz
opie-d89cbf4ba511beaf228ce87d4e21a2a6a49767f2.tar.bz2
Resource -> OResource
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieftp/opie-ftp.control2
-rw-r--r--noncore/net/opieftp/opieftp.cpp71
2 files changed, 32 insertions, 41 deletions
diff --git a/noncore/net/opieftp/opie-ftp.control b/noncore/net/opieftp/opie-ftp.control
index 32cc7a6..82f774f 100644
--- a/noncore/net/opieftp/opie-ftp.control
+++ b/noncore/net/opieftp/opie-ftp.control
@@ -1,11 +1,11 @@
1Package: opie-ftp 1Package: opie-ftp
2Files: plugins/application/libopieftp.so* bin/opieftp pics/opieftp apps/Applications/opieftp.desktop 2Files: plugins/application/libopieftp.so* bin/opieftp pics/opieftp apps/Applications/opieftp.desktop
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: L.J. Potter <ljp@llornkcor.com> 5Maintainer: L.J. Potter <ljp@llornkcor.com>
6Architecture: arm 6Architecture: arm
7Depends: task-opie-minimal, ftplib 7Depends: task-opie-minimal, ftplib, libopiecore2
8Replaces: opieftp 8Replaces: opieftp
9Description: Opie-Ftp 9Description: Opie-Ftp
10 The ftp client for the Opie environment. 10 The ftp client for the Opie environment.
11Version: $QPE_VERSION$EXTRAVERSION 11Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index 4f0ca29..14fd859 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -10,50 +10,53 @@
10 * (at your option) any later version. * 10 * (at your option) any later version. *
11 ***************************************************************************/ 11 ***************************************************************************/
12//#define DEVELOPERS_VERSION 12//#define DEVELOPERS_VERSION
13 13
14#include "opieftp.h" 14#include "opieftp.h"
15 15
16extern "C" { 16extern "C" {
17#include <ftplib.h> 17#include <ftplib.h>
18} 18}
19 19
20#include "inputDialog.h" 20#include "inputDialog.h"
21 21
22/* OPIE */ 22/* OPIE */
23//#include <opie2/odebug.h> 23//#include <opie2/odebug.h>
24//using namespace Opie::Core; 24//using namespace Opie::Core;
25 25
26#include <qpe/qpeapplication.h> 26#include <opie2/oresource.h>
27#include <qpe/resource.h> 27
28#include <qpe/applnk.h>
28#include <qpe/config.h> 29#include <qpe/config.h>
29#include <qpe/mimetype.h> 30#include <qpe/mimetype.h>
31#include <qpe/qpeapplication.h>
32#include <qpe/qpemenubar.h>
30 33
31#include <qtextstream.h> 34#include <qbitmap.h>
32#include <qpushbutton.h>
33#include <qtoolbutton.h>
34#include <qcombobox.h> 35#include <qcombobox.h>
35#include <qlistview.h>
36#include <qlabel.h> 36#include <qlabel.h>
37#include <qlayout.h>
38#include <qlistview.h>
39#include <qmenubar.h>
40#include <qmessagebox.h>
37#include <qprogressbar.h> 41#include <qprogressbar.h>
42#include <qpushbutton.h>
38#include <qspinbox.h> 43#include <qspinbox.h>
39#include <qtabwidget.h> 44#include <qtabwidget.h>
40#include <qlayout.h> 45#include <qtextstream.h>
41#include <qmessagebox.h> 46#include <qtoolbutton.h>
42#include <qmenubar.h>
43#include <qpe/qpemenubar.h>
44 47
45#include <qlineedit.h> 48#include <qlineedit.h>
46#include <qlistbox.h> 49#include <qlistbox.h>
47#include <qvbox.h> 50#include <qvbox.h>
48/* STD */ 51/* STD */
49#include <unistd.h> 52#include <unistd.h>
50#include <stdlib.h> 53#include <stdlib.h>
51 54
52QProgressBar *ProgressBar; 55QProgressBar *ProgressBar;
53static netbuf *conn = NULL; 56static netbuf *conn = NULL;
54 57
55static int log_progress(netbuf *, int xfered, void *) 58static int log_progress(netbuf *, int xfered, void *)
56{ 59{
57// int fsz = *(int *)arg; 60// int fsz = *(int *)arg;
58// int pct = (xfered * 100) / fsz; 61// int pct = (xfered * 100) / fsz;
59// printf("%3d%%\r", pct); 62// printf("%3d%%\r", pct);
@@ -77,36 +80,33 @@ void OpieFtp::initializeGui() {
77 80
78 QVBox* wrapperBox = new QVBox( this ); 81 QVBox* wrapperBox = new QVBox( this );
79 setCentralWidget( wrapperBox ); 82 setCentralWidget( wrapperBox );
80 83
81 QWidget *view = new QWidget( wrapperBox ); 84 QWidget *view = new QWidget( wrapperBox );
82 85
83 QGridLayout *layout = new QGridLayout( view ); 86 QGridLayout *layout = new QGridLayout( view );
84 layout->setSpacing( 1); 87 layout->setSpacing( 1);
85 layout->setMargin( 1); 88 layout->setMargin( 1);
86 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 89 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
87 90
88 QPEMenuBar *menuBar = new QPEMenuBar(view); 91 QPEMenuBar *menuBar = new QPEMenuBar(view);
89// QMenuBar *menuBar = new QMenuBar(this); 92// QMenuBar *menuBar = new QMenuBar(this);
90// QPEToolBar *menuBar = new QPEToolBar(this); 93// QPEToolBar *menuBar = new QPEToolBar(this);
91// menuBar->setHorizontalStretchable( TRUE ); 94// menuBar->setHorizontalStretchable( TRUE );
92 95
93 QWMatrix matrix; 96 unknownXpm = Opie::Core::OResource::loadPixmap( "UnknownDocument", Opie::Core::OResource::SmallIcon );
94 QPixmap pix(Resource::loadPixmap( "UnknownDocument" ));
95 matrix.scale( .4, .4);
96 unknownXpm = pix.xForm(matrix);
97 97
98 connectionMenu = new QPopupMenu( this ); 98 connectionMenu = new QPopupMenu( this );
99 localMenu = new QPopupMenu( this ); 99 localMenu = new QPopupMenu( this );
100 remoteMenu = new QPopupMenu( this ); 100 remoteMenu = new QPopupMenu( this );
101 tabMenu = new QPopupMenu( this ); 101 tabMenu = new QPopupMenu( this );
102 102
103 layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 ); 103 layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 );
104 104
105 menuBar->insertItem( tr( "Connection" ), connectionMenu); 105 menuBar->insertItem( tr( "Connection" ), connectionMenu);
106// menuBar->insertItem( tr( "Local" ), localMenu); 106// menuBar->insertItem( tr( "Local" ), localMenu);
107// menuBar->insertItem( tr( "Remote" ), remoteMenu); 107// menuBar->insertItem( tr( "Remote" ), remoteMenu);
108 menuBar->insertItem( tr( "View" ), tabMenu); 108 menuBar->insertItem( tr( "View" ), tabMenu);
109 109
110 tabMenu->insertItem( tr( "Local" ), localMenu); 110 tabMenu->insertItem( tr( "Local" ), localMenu);
111 tabMenu->insertItem( tr( "Remote" ), remoteMenu); 111 tabMenu->insertItem( tr( "Remote" ), remoteMenu);
112 112
@@ -120,62 +120,54 @@ void OpieFtp::initializeGui() {
120 localMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); 120 localMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() ));
121 localMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() )); 121 localMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() ));
122 localMenu->insertSeparator(); 122 localMenu->insertSeparator();
123 localMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); 123 localMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() ));
124 localMenu->setCheckable(TRUE); 124 localMenu->setCheckable(TRUE);
125 125
126 remoteMenu->insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); 126 remoteMenu->insertItem( tr( "Download" ), this, SLOT( remoteDownload() ));
127 remoteMenu->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); 127 remoteMenu->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() ));
128 remoteMenu->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); 128 remoteMenu->insertItem( tr( "Rename" ), this, SLOT( remoteRename() ));
129 remoteMenu->insertSeparator(); 129 remoteMenu->insertSeparator();
130 remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); 130 remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() ));
131 131
132 tabMenu->insertSeparator(); 132 tabMenu->insertSeparator();
133 tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); 133 tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() ));
134 tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); 134 tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() ));
135 tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() )); 135 tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() ));
136 tabMenu->insertSeparator();
137// tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() ));
138 tabMenu->setCheckable(TRUE); 136 tabMenu->setCheckable(TRUE);
139 137
140 138 bool useBigPix = qApp->desktop()->size().width() > 330;
141 cdUpButton = new QToolButton( view,"cdUpButton"); 139 cdUpButton = new QToolButton( view,"cdUpButton");
142 cdUpButton->setPixmap(Resource::loadPixmap("up")); 140 cdUpButton->setUsesBigPixmap( useBigPix );
143 cdUpButton ->setFixedSize( QSize( 20, 20 ) ); 141 cdUpButton->setPixmap( Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ) );
142 cdUpButton->setFixedSize( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
144 connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); 143 connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) );
145 layout->addMultiCellWidget( cdUpButton, 0, 0, 4, 4 ); 144 layout->addMultiCellWidget( cdUpButton, 0, 0, 4, 4 );
146 cdUpButton->hide(); 145 cdUpButton->hide();
147 146
148// docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",view,"docsButton");
149// docButton->setFixedSize( QSize( 20, 20 ) );
150// connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) );
151// docButton->setFlat(TRUE);
152// layout->addMultiCellWidget( docButton, 0, 0, 6, 6 );
153
154 homeButton = new QToolButton( view,"homeButton"); 147 homeButton = new QToolButton( view,"homeButton");
155 homeButton->setPixmap( Resource::loadPixmap("home")); 148 homeButton->setUsesBigPixmap( useBigPix );
156 homeButton->setFixedSize( QSize( 20, 20 ) ); 149 homeButton->setPixmap( Opie::Core::OResource::loadPixmap( "home", Opie::Core::OResource::SmallIcon ) );
150 homeButton->setFixedSize( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
157 connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); 151 connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) );
158 layout->addMultiCellWidget( homeButton, 0, 0, 3, 3); 152 layout->addMultiCellWidget( homeButton, 0, 0, 3, 3);
159 homeButton->hide(); 153 homeButton->hide();
160 154
161 TabWidget = new QTabWidget( view, "TabWidget" ); 155 TabWidget = new QTabWidget( view, "TabWidget" );
162 layout->addMultiCellWidget( TabWidget, 1, 1, 0, 4 ); 156 layout->addMultiCellWidget( TabWidget, 1, 1, 0, 4 );
163 157
164// TabWidget->setTabShape(QTabWidget::Triangular);
165
166 tab = new QWidget( TabWidget, "tab" ); 158 tab = new QWidget( TabWidget, "tab" );
167 tabLayout = new QGridLayout( tab ); 159 tabLayout = new QGridLayout( tab );
168 tabLayout->setSpacing( 2); 160 tabLayout->setSpacing( 2);
169 tabLayout->setMargin( 2); 161 tabLayout->setMargin( 2);
170 162
171 Local_View = new QListView( tab, "Local_View" ); 163 Local_View = new QListView( tab, "Local_View" );
172// Local_View->setResizePolicy( QListView::AutoOneFit ); 164// Local_View->setResizePolicy( QListView::AutoOneFit );
173 Local_View->addColumn( tr("File"),150); 165 Local_View->addColumn( tr("File"),150);
174 Local_View->addColumn( tr("Date"),-1); 166 Local_View->addColumn( tr("Date"),-1);
175 Local_View->setColumnAlignment(1,QListView::AlignRight); 167 Local_View->setColumnAlignment(1,QListView::AlignRight);
176 Local_View->addColumn( tr("Size"),-1); 168 Local_View->addColumn( tr("Size"),-1);
177 Local_View->setColumnAlignment(2,QListView::AlignRight); 169 Local_View->setColumnAlignment(2,QListView::AlignRight);
178 Local_View->setAllColumnsShowFocus(TRUE); 170 Local_View->setAllColumnsShowFocus(TRUE);
179 171
180 Local_View->setMultiSelection( TRUE); 172 Local_View->setMultiSelection( TRUE);
181 Local_View->setSelectionMode(QListView::Extended); 173 Local_View->setSelectionMode(QListView::Extended);
@@ -328,33 +320,33 @@ void OpieFtp::initializeGui() {
328 connect( currentPathCombo, SIGNAL( activated(const QString&) ), 320 connect( currentPathCombo, SIGNAL( activated(const QString&) ),
329 this, SLOT( currentPathComboActivated(const QString&) ) ); 321 this, SLOT( currentPathComboActivated(const QString&) ) );
330 322
331 connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), 323 connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()),
332 this,SLOT(currentPathComboChanged())); 324 this,SLOT(currentPathComboChanged()));
333 ProgressBar = new QProgressBar( view, "ProgressBar" ); 325 ProgressBar = new QProgressBar( view, "ProgressBar" );
334 layout->addMultiCellWidget( ProgressBar, 4, 4, 0, 4); 326 layout->addMultiCellWidget( ProgressBar, 4, 4, 0, 4);
335 ProgressBar->setMaximumHeight(10); 327 ProgressBar->setMaximumHeight(10);
336 filterStr="*"; 328 filterStr="*";
337 b=FALSE; 329 b=FALSE;
338 populateLocalView(); 330 populateLocalView();
339 readConfig(); 331 readConfig();
340 332
341// ServerComboBox->setCurrentItem(currentServerConfig); 333// ServerComboBox->setCurrentItem(currentServerConfig);
342 334
343 TabWidget->setCurrentPage(2); 335 TabWidget->setCurrentPage(2);
344 qDebug("XXXXXXXXXXXX Constructor done"); 336 // qDebug("XXXXXXXXXXXX Constructor done");
345 337
346} 338}
347 339
348OpieFtp::~OpieFtp() 340OpieFtp::~OpieFtp()
349{ 341{
350} 342}
351 343
352void OpieFtp::cleanUp() 344void OpieFtp::cleanUp()
353{ 345{
354 if(conn) 346 if(conn)
355 FtpQuit(conn); 347 FtpQuit(conn);
356 QString sfile=QDir::homeDirPath(); 348 QString sfile=QDir::homeDirPath();
357 if(sfile.right(1) != "/") 349 if(sfile.right(1) != "/")
358 sfile+="/._temp"; 350 sfile+="/._temp";
359 else 351 else
360 sfile+="._temp"; 352 sfile+="._temp";
@@ -686,55 +678,54 @@ void OpieFtp::populateLocalView()
686 fileL.sprintf( "%s",fi->fileName().data() ); 678 fileL.sprintf( "%s",fi->fileName().data() );
687 fileDate= fi->lastModified().toString(); 679 fileDate= fi->lastModified().toString();
688 if( QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+fileL)).exists() ) { 680 if( QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+fileL)).exists() ) {
689 fileL+="/"; 681 fileL+="/";
690 isDir=TRUE; 682 isDir=TRUE;
691// odebug << fileL << oendl; 683// odebug << fileL << oendl;
692 } 684 }
693 } 685 }
694 686
695 687
696 if(fileL !="./" && fi->exists()) { 688 if(fileL !="./" && fi->exists()) {
697 item = new QListViewItem( Local_View,fileL, fileDate, fileS ); 689 item = new QListViewItem( Local_View,fileL, fileDate, fileS );
698 QPixmap pm; 690 QPixmap pm;
699 691
700 if(isDir || fileL.find("/",0,TRUE) != -1) { 692 if(isDir || fileL.find("/",0,TRUE) != -1) {
701 if( !QDir( fi->filePath() ).isReadable()) 693 if( !QDir( fi->filePath() ).isReadable())
702 pm = Resource::loadPixmap( "lockedfolder" ); 694 pm = Opie::Core::OResource::loadPixmap( "lockedfolder", Opie::Core::OResource::SmallIcon );
703 else 695 else
704 pm= Resource::loadPixmap( "folder" ); 696 pm = Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon );
705 item->setPixmap( 0,pm ); 697 item->setPixmap( 0,pm );
706 } else { 698 } else {
707 if( !fi->isReadable() ) 699 if( !fi->isReadable() )
708 pm = Resource::loadPixmap( "locked" ); 700 pm = Opie::Core::OResource::loadPixmap( "locked", Opie::Core::OResource::SmallIcon );
709 else { 701 else {
710 MimeType mt(fi->filePath()); 702 MimeType mt(fi->filePath());
711 pm=mt.pixmap(); //sets the correct pixmap for mimetype 703 pm=mt.pixmap(); //sets the correct pixmap for mimetype
712 if(pm.isNull()) 704 if(pm.isNull())
713 pm = unknownXpm; 705 pm = unknownXpm;
714 } 706 }
715 } 707 }
716 if( fileL.find("->",0,TRUE) != -1) { 708 if( fileL.find("->",0,TRUE) != -1) {
717 // overlay link image 709 // overlay link image
718 pm= Resource::loadPixmap( "folder" ); 710 pm = Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon );
719 QPixmap lnk = Resource::loadPixmap( "opie/symlink" ); 711 QPixmap lnk = Opie::Core::OResource::loadPixmap( "opie/symlink" );
720 QPainter painter( &pm ); 712 QPainter painter( &pm );
721 painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk ); 713 painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk );
722 pm.setMask( pm.createHeuristicMask( FALSE ) );
723 } 714 }
724 item->setPixmap( 0,pm); 715 item->setPixmap( 0,pm);
725 } 716 }
726 isDir=FALSE; 717 isDir=FALSE;
727 ++it; 718 ++it;
728 } 719 }
729 Local_View->setSorting( 3,FALSE); 720 Local_View->setSorting( 3,FALSE);
730 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath() ); 721 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath() );
731 fillCombo( (const QString &)currentDir.canonicalPath()); 722 fillCombo( (const QString &)currentDir.canonicalPath());
732} 723}
733 724
734bool OpieFtp::populateRemoteView( ) 725bool OpieFtp::populateRemoteView( )
735{ 726{
736// odebug << "populate remoteview" << oendl; 727// odebug << "populate remoteview" << oendl;
737 QString sfile=QDir::homeDirPath(); 728 QString sfile=QDir::homeDirPath();
738 if(sfile.right(1) != "/") 729 if(sfile.right(1) != "/")
739 sfile+="/._temp"; 730 sfile+="/._temp";
740 else 731 else
@@ -750,47 +741,47 @@ bool OpieFtp::populateRemoteView( )
750 while ( !t.eof()) { 741 while ( !t.eof()) {
751 s = t.readLine(); 742 s = t.readLine();
752 743
753 if(s.find("total",0,TRUE) == 0) 744 if(s.find("total",0,TRUE) == 0)
754 continue; 745 continue;
755 746
756 int len, month = monthRe.match(s, 0, &len); 747 int len, month = monthRe.match(s, 0, &len);
757 fileDate = s.mid(month + 1, len - 2); // minus spaces 748 fileDate = s.mid(month + 1, len - 2); // minus spaces
758 fileL = s.right(s.length() - month - len); 749 fileL = s.right(s.length() - month - len);
759 if(s.left(1) == "d") 750 if(s.left(1) == "d")
760 fileL = fileL+"/"; 751 fileL = fileL+"/";
761 fileS = s.mid(month - 8, 8); // FIXME 752 fileS = s.mid(month - 8, 8); // FIXME
762 fileS = fileS.stripWhiteSpace(); 753 fileS = fileS.stripWhiteSpace();
763 754
764 if(s.left(1) == "d" || fileL.find("/",0,TRUE) != -1) { 755 if(s.left(1) == "d" || fileL.find("/",0,TRUE) != -1) {
765 QListViewItem * item = new QListViewItem( Remote_View, fileL, fileDate, fileS,"d"); 756 QListViewItem * item = new QListViewItem( Remote_View, fileL, fileDate, fileS,"d");
766 item->setPixmap( 0, Resource::loadPixmap( "folder" )); 757 item->setPixmap( 0, Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon ));
767// if(itemDir) 758// if(itemDir)
768 item->moveItem(itemDir); 759 item->moveItem(itemDir);
769 itemDir=item; 760 itemDir=item;
770 } else { 761 } else {
771 QListViewItem * item = new QListViewItem( Remote_View, fileL, fileDate, fileS,"f"); 762 QListViewItem * item = new QListViewItem( Remote_View, fileL, fileDate, fileS,"f");
772 item->setPixmap( 0, Resource::loadPixmap( "fileopen" )); 763 item->setPixmap( 0, Opie::Core::OResource::loadPixmap( "fileopen", Opie::Core::OResource::SmallIcon ));
773// if(itemFile) 764// if(itemFile)
774 item->moveItem(itemDir); 765 item->moveItem(itemDir);
775 item->moveItem(itemFile); 766 item->moveItem(itemFile);
776 itemFile=item; 767 itemFile=item;
777 } 768 }
778 } 769 }
779 QListViewItem * item1 = new QListViewItem( Remote_View, "../"); 770 QListViewItem * item1 = new QListViewItem( Remote_View, "../");
780 item1->setPixmap( 0, Resource::loadPixmap( "folder" )); 771 item1->setPixmap( 0, Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon ));
781 file.close(); 772 file.close();
782 if( file.exists()) 773 if( file.exists())
783 file. remove(); 774 file. remove();
784 } 775 }
785// odebug << "temp file not opened successfully "+sfile << oendl; 776// odebug << "temp file not opened successfully "+sfile << oendl;
786 Remote_View->setSorting( 4,TRUE); 777 Remote_View->setSorting( 4,TRUE);
787 return true; 778 return true;
788} 779}
789 780
790void OpieFtp::remoteListClicked(QListViewItem *selectedItem) 781void OpieFtp::remoteListClicked(QListViewItem *selectedItem)
791{ 782{
792 if( selectedItem) { 783 if( selectedItem) {
793 // if(selectedItem!= NULL) { 784 // if(selectedItem!= NULL) {
794// QCopEnvelope ( "QPE/System", "busy()" ); 785// QCopEnvelope ( "QPE/System", "busy()" );
795 QString oldRemoteCurrentDir = currentRemoteDir; 786 QString oldRemoteCurrentDir = currentRemoteDir;
796 QString strItem=selectedItem->text(0); 787 QString strItem=selectedItem->text(0);