-rw-r--r-- | noncore/net/opieftp/opie-ftp.control | 2 | ||||
-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 71 |
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 | |||
@@ -6,3 +6,3 @@ Maintainer: L.J. Potter <ljp@llornkcor.com> | |||
6 | Architecture: arm | 6 | Architecture: arm |
7 | Depends: task-opie-minimal, ftplib | 7 | Depends: task-opie-minimal, ftplib, libopiecore2 |
8 | Replaces: opieftp | 8 | Replaces: opieftp |
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 | |||
@@ -25,20 +25,23 @@ extern "C" { | |||
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 | ||
@@ -92,6 +95,3 @@ void OpieFtp::initializeGui() { | |||
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 | ||
@@ -135,10 +135,9 @@ void OpieFtp::initializeGui() { | |||
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()) ); |
@@ -147,11 +146,6 @@ void OpieFtp::initializeGui() { | |||
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()) ); |
@@ -163,4 +157,2 @@ void OpieFtp::initializeGui() { | |||
163 | 157 | ||
164 | // TabWidget->setTabShape(QTabWidget::Triangular); | ||
165 | |||
166 | tab = new QWidget( TabWidget, "tab" ); | 158 | tab = new QWidget( TabWidget, "tab" ); |
@@ -343,3 +335,3 @@ void OpieFtp::initializeGui() { | |||
343 | TabWidget->setCurrentPage(2); | 335 | TabWidget->setCurrentPage(2); |
344 | qDebug("XXXXXXXXXXXX Constructor done"); | 336 | // qDebug("XXXXXXXXXXXX Constructor done"); |
345 | 337 | ||
@@ -701,5 +693,5 @@ void OpieFtp::populateLocalView() | |||
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 ); |
@@ -707,3 +699,3 @@ void OpieFtp::populateLocalView() | |||
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 { |
@@ -717,9 +709,8 @@ void OpieFtp::populateLocalView() | |||
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 | } |
@@ -765,3 +756,3 @@ bool OpieFtp::populateRemoteView( ) | |||
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) |
@@ -771,3 +762,3 @@ bool OpieFtp::populateRemoteView( ) | |||
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) |
@@ -779,3 +770,3 @@ bool OpieFtp::populateRemoteView( ) | |||
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(); |