author | drw <drw> | 2005-05-04 23:07:10 (UTC) |
---|---|---|
committer | drw <drw> | 2005-05-04 23:07:10 (UTC) |
commit | d89cbf4ba511beaf228ce87d4e21a2a6a49767f2 (patch) (unidiff) | |
tree | d7c1518bfa0550b99d73fe85630cebe351155a37 /noncore/net | |
parent | 5db2256e7e342f290e17096cf70b8b318bfcd987 (diff) | |
download | opie-d89cbf4ba511beaf228ce87d4e21a2a6a49767f2.zip opie-d89cbf4ba511beaf228ce87d4e21a2a6a49767f2.tar.gz opie-d89cbf4ba511beaf228ce87d4e21a2a6a49767f2.tar.bz2 |
Resource -> OResource
-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 | |||
@@ -5,5 +5,5 @@ Section: opie/applications | |||
5 | Maintainer: L.J. Potter <ljp@llornkcor.com> | 5 | 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 |
9 | Description: Opie-Ftp | 9 | Description: Opie-Ftp |
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 | |||
@@ -24,22 +24,25 @@ extern "C" { | |||
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> |
@@ -91,8 +94,5 @@ void OpieFtp::initializeGui() { | |||
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 ); |
@@ -134,25 +134,19 @@ void OpieFtp::initializeGui() { | |||
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); |
@@ -162,6 +156,4 @@ void OpieFtp::initializeGui() { | |||
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 ); |
@@ -342,5 +334,5 @@ void OpieFtp::initializeGui() { | |||
342 | 334 | ||
343 | TabWidget->setCurrentPage(2); | 335 | TabWidget->setCurrentPage(2); |
344 | qDebug("XXXXXXXXXXXX Constructor done"); | 336 | // qDebug("XXXXXXXXXXXX Constructor done"); |
345 | 337 | ||
346 | } | 338 | } |
@@ -700,11 +692,11 @@ void OpieFtp::populateLocalView() | |||
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()); |
@@ -716,11 +708,10 @@ void OpieFtp::populateLocalView() | |||
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; |
@@ -764,5 +755,5 @@ bool OpieFtp::populateRemoteView( ) | |||
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); |
@@ -770,5 +761,5 @@ bool OpieFtp::populateRemoteView( ) | |||
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); |
@@ -778,5 +769,5 @@ bool OpieFtp::populateRemoteView( ) | |||
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()) |