summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp39
-rw-r--r--noncore/apps/advancedfm/advancedfm.h5
-rw-r--r--noncore/apps/advancedfm/advancedfmData.cpp82
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp4
4 files changed, 47 insertions, 83 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index 41e83c7..66353bb 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -14,3 +14,3 @@
14 14
15#include <opie/otabwidget.h> 15
16// #include <opie/ofileselector.h> 16// #include <opie/ofileselector.h>
@@ -18,9 +18,7 @@
18 18
19#include <qpe/config.h> 19#include <opie/otabwidget.h>
20
20#include <qpe/filemanager.h> 21#include <qpe/filemanager.h>
21#include <qpe/qcopenvelope_qws.h> 22#include <qpe/qcopenvelope_qws.h>
22#include <qpe/qpemenubar.h>
23#include <qpe/qpetoolbar.h>
24#include <qpe/qpeapplication.h> 23#include <qpe/qpeapplication.h>
25#include <qpe/qcopenvelope_qws.h>
26#include <qpe/config.h> 24#include <qpe/config.h>
@@ -32,12 +30,4 @@
32 30
33
34#include <qwmatrix.h>
35#include <qregexp.h>
36#include <qtabwidget.h>
37#include <qtextstream.h>
38#include <qpushbutton.h>
39#include <qdatetime.h> 31#include <qdatetime.h>
40#include <qdir.h>
41#include <qfile.h> 32#include <qfile.h>
42#include <qstring.h>
43#include <qcombobox.h> 33#include <qcombobox.h>
@@ -45,6 +35,3 @@
45#include <qlistview.h> 35#include <qlistview.h>
46#include <qmainwindow.h>
47#include <qlabel.h> 36#include <qlabel.h>
48#include <qprogressbar.h>
49#include <qspinbox.h>
50#include <qwidget.h> 37#include <qwidget.h>
@@ -52,20 +39,11 @@
52#include <qimage.h> 39#include <qimage.h>
53#include <qpixmap.h>
54#include <qmessagebox.h> 40#include <qmessagebox.h>
55#include <qlineedit.h> 41#include <qlineedit.h>
56#include <qregexp.h>
57 42
58#include <unistd.h>
59#include <stdlib.h>
60#include <sys/stat.h> 43#include <sys/stat.h>
61#include <dirent.h>
62#include <stdio.h>
63#include <time.h> 44#include <time.h>
45#include <dirent.h>
64#include <fcntl.h> 46#include <fcntl.h>
65#include <mntent.h>
66#include <string.h>
67#include <errno.h>
68#include <sys/vfs.h> 47#include <sys/vfs.h>
69#include <mntent.h> 48#include <mntent.h>
70#include <sys/utsname.h>
71 49
@@ -76,7 +54,4 @@ AdvancedFm::AdvancedFm( )
76 54
77 QWMatrix matrix; 55 unknownXpm = Resource::loadImage( "UnknownDocument" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
78 QPixmap pix(Resource::loadPixmap( "UnknownDocument" )); 56
79 matrix.scale( .4, .4);
80 unknownXpm = pix.xForm(matrix);
81
82 initConnections(); 57 initConnections();
@@ -212,3 +187,3 @@ void AdvancedFm::populateView()
212 item->setPixmap( 0,pm); 187 item->setPixmap( 0,pm);
213 188
214 } 189 }
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h
index c30d8e0..4480051 100644
--- a/noncore/apps/advancedfm/advancedfm.h
+++ b/noncore/apps/advancedfm/advancedfm.h
@@ -42,4 +42,2 @@ class QTabWidget;
42class QWidget; 42class QWidget;
43class QPEToolBar;
44class QPEMenuBar;
45class QPopupMenu; 43class QPopupMenu;
@@ -50,3 +48,2 @@ class MenuButton;
50 48
51//class QPushButton;
52class QToolButton; 49class QToolButton;
@@ -56,3 +53,3 @@ class AdvancedFm : public QMainWindow
56{ 53{
57 Q_OBJECT 54 Q_OBJECT
58public: 55public:
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp
index 1a7a6d7..eb2bcd8 100644
--- a/noncore/apps/advancedfm/advancedfmData.cpp
+++ b/noncore/apps/advancedfm/advancedfmData.cpp
@@ -15,13 +15,9 @@
15#include <qpe/qpeapplication.h> 15#include <qpe/qpeapplication.h>
16#include <qpe/qpemenubar.h>
17#include <qpe/qpetoolbar.h>
18#include <qpe/resource.h> 16#include <qpe/resource.h>
19#include <qpe/menubutton.h> 17#include <qpe/menubutton.h>
20#include <qpe/config.h>
21 18
22#include <qlayout.h> 19#include <qlayout.h>
23#include <qpixmap.h> 20#include <qhbox.h>
21#include <qmenubar.h>
24#include <qcombobox.h> 22#include <qcombobox.h>
25#include <qpopupmenu.h>
26#include <qtabwidget.h>
27#include <qtoolbutton.h> 23#include <qtoolbutton.h>
@@ -39,8 +35,8 @@ void AdvancedFm::init() {
39 35
40 QGridLayout *layout = new QGridLayout( this ); 36 QVBoxLayout *layout = new QVBoxLayout( this );
41 layout->setSpacing( 2); 37 layout->setSpacing( 2);
42 layout->setMargin( 2); 38 layout->setMargin( 2);
43 39
44 40
45 QPEMenuBar *menuBar = new QPEMenuBar(this); 41 QMenuBar *menuBar = new QMenuBar(this);
46 fileMenu = new QPopupMenu( this ); 42 fileMenu = new QPopupMenu( this );
@@ -49,3 +45,3 @@ void AdvancedFm::init() {
49 45
50 layout->addMultiCellWidget( menuBar, 0, 0, 0, 1 ); 46 layout->addWidget( menuBar );
51 47
@@ -53,38 +49,35 @@ void AdvancedFm::init() {
53 menuBar->insertItem( tr( "View" ), viewMenu); 49 menuBar->insertItem( tr( "View" ), viewMenu);
54// menuBar->insertItem( tr( "^" ), customDirMenu);
55 50
56 cdUpButton = new QToolButton( this,"cdUpButton"); 51 cdUpButton = new QToolButton( 0,"cdUpButton");
57 cdUpButton->setPixmap(Resource::loadPixmap("up")); 52 cdUpButton->setPixmap(Resource::loadPixmap("up"));
58 cdUpButton->setFixedSize( QSize( 20, 20 ) ); 53 cdUpButton->setAutoRaise( true );
59 layout->addMultiCellWidget( cdUpButton , 0, 0, 2, 2); 54 menuBar->insertItem( cdUpButton );
60 55
61 menuButton = new MenuButton(this);
62 menuButton->setFixedSize( QSize( 20, 20 ) );
63 layout->addMultiCellWidget( menuButton , 0, 0, 3, 3);
64 56
65 qpeDirButton= new QToolButton(this,"QPEButton"); 57 QHBox *lineBox = new QHBox( this );
58
59 qpeDirButton= new QToolButton( 0,"QPEButton");
66 qpeDirButton->setPixmap( Resource::loadPixmap("launcher/opielogo16x16"));//,"",this,"QPEButton"); 60 qpeDirButton->setPixmap( Resource::loadPixmap("launcher/opielogo16x16"));//,"",this,"QPEButton");
67 qpeDirButton ->setFixedSize( QSize( 20, 20 ) ); 61 qpeDirButton->setAutoRaise( true );
68 layout->addMultiCellWidget( qpeDirButton , 0, 0, 4, 4); 62 menuBar->insertItem( qpeDirButton );
69 63
70 cfButton = new QToolButton( this,"CFButton"); 64 cfButton = new QToolButton( 0, "CFButton");
71 cfButton->setPixmap(Resource::loadPixmap("cardmon/pcmcia")); 65 cfButton->setPixmap(Resource::loadPixmap("cardmon/pcmcia"));
72 cfButton ->setFixedSize( QSize( 20, 20 ) ); 66 cfButton->setAutoRaise( true );
73 layout->addMultiCellWidget( cfButton , 0, 0, 5, 5); 67 menuBar->insertItem( cfButton );
74 68
75 sdButton = new QToolButton( this,"SDButton"); 69 sdButton = new QToolButton( 0, "SDButton");
76 sdButton->setPixmap(Resource::loadPixmap("advancedfm/sdcard")); 70 sdButton->setPixmap(Resource::loadPixmap("advancedfm/sdcard"));
77 sdButton->setFixedSize( QSize( 20, 20 ) ); 71 sdButton->setAutoRaise( true );
78 layout->addMultiCellWidget( sdButton , 0, 0, 6, 6); 72 menuBar->insertItem( sdButton );
79
80 73
81 docButton = new QToolButton( this,"docsButton"); 74 docButton = new QToolButton( 0,"docsButton");
82 docButton->setPixmap(Resource::loadPixmap("DocsIcon")); 75 docButton->setPixmap(Resource::loadPixmap("DocsIcon"));
83 docButton->setFixedSize( QSize( 20, 20 ) ); 76 docButton->setAutoRaise( true );
84 layout->addMultiCellWidget( docButton, 0, 0, 7, 7); 77 menuBar->insertItem( docButton );
85 78
86 homeButton = new QToolButton( this,"homeButton"); 79 homeButton = new QToolButton( 0, "homeButton");
87 homeButton->setPixmap(Resource::loadPixmap("home")); 80 homeButton->setPixmap(Resource::loadPixmap("home"));
88 homeButton->setFixedSize( QSize( 20, 20 ) ); 81 homeButton->setAutoRaise( true );
89 layout->addMultiCellWidget( homeButton, 0, 0, 8, 8); 82 menuBar->insertItem( homeButton );
90 83
@@ -113,6 +106,2 @@ void AdvancedFm::init() {
113 106
114 menuButton->setUseLabel(false);
115 menuButton->insertItem( s_addBookmark);
116 menuButton->insertItem( s_removeBookmark);
117 menuButton->insertSeparator();
118// menuButton->insertItem(""); 107// menuButton->insertItem("");
@@ -125,10 +114,15 @@ void AdvancedFm::init() {
125 114
126 currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); 115 menuButton = new MenuButton( lineBox );
127 currentPathCombo->setEditable(TRUE);
128 layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 8);
129 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
130 116
117 menuButton->setUseLabel(false);
118 menuButton->setMaximumWidth( 20 );
119 menuButton->insertItem( s_addBookmark);
120 menuButton->insertItem( s_removeBookmark);
121 menuButton->insertSeparator();
122
123 currentPathCombo = new QComboBox( FALSE, lineBox, "currentPathCombo" );
124 currentPathCombo->setEditable(TRUE);
131 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); 125 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
132 126
133 layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 8); 127 layout->addWidget( lineBox );
134 128
@@ -137,3 +131,3 @@ void AdvancedFm::init() {
137// TabWidget = new QTabWidget( this, "TabWidget" ); 131// TabWidget = new QTabWidget( this, "TabWidget" );
138 layout->addMultiCellWidget( TabWidget, 2, 2, 0, 8); 132 layout->addWidget( TabWidget, 4 );
139 133
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index eae86a4..575833a 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -20,4 +20,2 @@
20#include <qpe/qpeapplication.h> 20#include <qpe/qpeapplication.h>
21#include <qpe/qpemenubar.h>
22#include <qpe/qpetoolbar.h>
23#include <qpe/resource.h> 21#include <qpe/resource.h>
@@ -776,3 +774,3 @@ void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int buflen) {
776 QMessageBox::warning( this, tr("Error"), lineStr ,tr("Ok") ); 774 QMessageBox::warning( this, tr("Error"), lineStr ,tr("Ok") );
777 775
778// OutputEdit->append(lineStr); 776// OutputEdit->append(lineStr);