Diffstat (limited to 'noncore/apps/advancedfm/advancedfmData.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index a4f4d59..4c24e83 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp | |||
@@ -56,49 +56,49 @@ void AdvancedFm::init() { | |||
56 | cfButton->setPixmap(Resource::loadPixmap("cardmon/pcmcia")); | 56 | cfButton->setPixmap(Resource::loadPixmap("cardmon/pcmcia")); |
57 | cfButton ->setFixedSize( QSize( 20, 20 ) ); | 57 | cfButton ->setFixedSize( QSize( 20, 20 ) ); |
58 | layout->addMultiCellWidget( cfButton , 0, 0, 3, 3); | 58 | layout->addMultiCellWidget( cfButton , 0, 0, 3, 3); |
59 | 59 | ||
60 | sdButton = new QToolButton( this,"SDButton"); | 60 | sdButton = new QToolButton( this,"SDButton"); |
61 | sdButton->setPixmap(Resource::loadPixmap("advancedfm/sdcard")); | 61 | sdButton->setPixmap(Resource::loadPixmap("advancedfm/sdcard")); |
62 | sdButton->setFixedSize( QSize( 20, 20 ) ); | 62 | sdButton->setFixedSize( QSize( 20, 20 ) ); |
63 | layout->addMultiCellWidget( sdButton , 0, 0, 4, 4); | 63 | layout->addMultiCellWidget( sdButton , 0, 0, 4, 4); |
64 | 64 | ||
65 | cdUpButton = new QToolButton( this,"cdUpButton"); | 65 | cdUpButton = new QToolButton( this,"cdUpButton"); |
66 | cdUpButton->setPixmap(Resource::loadPixmap("up")); | 66 | cdUpButton->setPixmap(Resource::loadPixmap("up")); |
67 | cdUpButton ->setFixedSize( QSize( 20, 20 ) ); | 67 | cdUpButton ->setFixedSize( QSize( 20, 20 ) ); |
68 | layout->addMultiCellWidget( cdUpButton , 0, 0, 5, 5); | 68 | layout->addMultiCellWidget( cdUpButton , 0, 0, 5, 5); |
69 | 69 | ||
70 | docButton = new QToolButton( this,"docsButton"); | 70 | docButton = new QToolButton( this,"docsButton"); |
71 | docButton->setPixmap(Resource::loadPixmap("DocsIcon")); | 71 | docButton->setPixmap(Resource::loadPixmap("DocsIcon")); |
72 | docButton->setFixedSize( QSize( 20, 20 ) ); | 72 | docButton->setFixedSize( QSize( 20, 20 ) ); |
73 | layout->addMultiCellWidget( docButton, 0, 0, 6, 6); | 73 | layout->addMultiCellWidget( docButton, 0, 0, 6, 6); |
74 | 74 | ||
75 | homeButton = new QToolButton( this,"homeButton"); | 75 | homeButton = new QToolButton( this,"homeButton"); |
76 | homeButton->setPixmap(Resource::loadPixmap("home")); | 76 | homeButton->setPixmap(Resource::loadPixmap("home")); |
77 | homeButton->setFixedSize( QSize( 20, 20 ) ); | 77 | homeButton->setFixedSize( QSize( 20, 20 ) ); |
78 | layout->addMultiCellWidget( homeButton, 0, 0, 7, 7); | 78 | layout->addMultiCellWidget( homeButton, 0, 0, 7, 7); |
79 | 79 | ||
80 | fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); | 80 | fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showMenuHidden() )); |
81 | fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); | 81 | fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); |
82 | fileMenu->insertSeparator(); | 82 | fileMenu->insertSeparator(); |
83 | fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( mkDir() )); | 83 | fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( mkDir() )); |
84 | fileMenu->insertItem( tr( "Rename" ), this, SLOT( rn() )); | 84 | fileMenu->insertItem( tr( "Rename" ), this, SLOT( rn() )); |
85 | fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() )); | 85 | fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() )); |
86 | fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() )); | 86 | fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() )); |
87 | fileMenu->insertSeparator(); | 87 | fileMenu->insertSeparator(); |
88 | fileMenu->insertItem( tr( "Add To Documents" ), this, SLOT( addToDocs() )); | 88 | fileMenu->insertItem( tr( "Add To Documents" ), this, SLOT( addToDocs() )); |
89 | fileMenu->insertItem( tr( "Delete" ), this, SLOT( del() )); | 89 | fileMenu->insertItem( tr( "Delete" ), this, SLOT( del() )); |
90 | fileMenu->setCheckable(TRUE); | 90 | fileMenu->setCheckable(TRUE); |
91 | 91 | ||
92 | viewMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); | 92 | viewMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); |
93 | viewMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); | 93 | viewMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); |
94 | viewMenu->insertSeparator(); | 94 | viewMenu->insertSeparator(); |
95 | viewMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); | 95 | viewMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); |
96 | viewMenu->setCheckable(TRUE); | 96 | viewMenu->setCheckable(TRUE); |
97 | 97 | ||
98 | 98 | ||
99 | currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); | 99 | currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); |
100 | currentPathCombo->setEditable(TRUE); | 100 | currentPathCombo->setEditable(TRUE); |
101 | layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7); | 101 | layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7); |
102 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 102 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
103 | 103 | ||
104 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 104 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
@@ -177,50 +177,49 @@ void AdvancedFm::init() { | |||
177 | /////////////// | 177 | /////////////// |
178 | 178 | ||
179 | struct utsname name; /* check for embedix kernel running on the zaurus*/ | 179 | struct utsname name; /* check for embedix kernel running on the zaurus*/ |
180 | if (uname(&name) != -1) { | 180 | if (uname(&name) != -1) { |
181 | QString release=name.release; | 181 | QString release=name.release; |
182 | if(release.find("embedix",0,TRUE) !=-1) { | 182 | if(release.find("embedix",0,TRUE) !=-1) { |
183 | zaurusDevice=TRUE; | 183 | zaurusDevice=TRUE; |
184 | } else { | 184 | } else { |
185 | zaurusDevice=FALSE; | 185 | zaurusDevice=FALSE; |
186 | sdButton->hide(); | 186 | sdButton->hide(); |
187 | } | 187 | } |
188 | } | 188 | } |
189 | 189 | ||
190 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 190 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
191 | currentDir.setPath( QDir::currentDirPath()); | 191 | currentDir.setPath( QDir::currentDirPath()); |
192 | 192 | ||
193 | currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 193 | currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
194 | currentRemoteDir.setPath( QDir::currentDirPath()); | 194 | currentRemoteDir.setPath( QDir::currentDirPath()); |
195 | 195 | ||
196 | b = TRUE; | 196 | b = TRUE; |
197 | 197 | ||
198 | filterStr="*"; | 198 | filterStr="*"; |
199 | b=FALSE; | 199 | b=FALSE; |
200 | 200 | ||
201 | 201 | ||
202 | |||
203 | } | 202 | } |
204 | 203 | ||
205 | void AdvancedFm::initConnections() { | 204 | void AdvancedFm::initConnections() { |
206 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 205 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
207 | connect( qpeDirButton ,SIGNAL(released()),this,SLOT( QPEButtonPushed()) ); | 206 | connect( qpeDirButton ,SIGNAL(released()),this,SLOT( QPEButtonPushed()) ); |
208 | connect( cfButton ,SIGNAL(released()),this,SLOT( CFButtonPushed()) ); | 207 | connect( cfButton ,SIGNAL(released()),this,SLOT( CFButtonPushed()) ); |
209 | connect( sdButton ,SIGNAL(released()),this,SLOT( SDButtonPushed()) ); | 208 | connect( sdButton ,SIGNAL(released()),this,SLOT( SDButtonPushed()) ); |
210 | connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); | 209 | connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); |
211 | connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); | 210 | connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); |
212 | connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); | 211 | connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); |
213 | connect( currentPathCombo, SIGNAL( activated( const QString & ) ), | 212 | connect( currentPathCombo, SIGNAL( activated( const QString & ) ), |
214 | this, SLOT( currentPathComboActivated( const QString & ) ) ); | 213 | this, SLOT( currentPathComboActivated( const QString & ) ) ); |
215 | 214 | ||
216 | connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), | 215 | connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), |
217 | this,SLOT(currentPathComboChanged())); | 216 | this,SLOT(currentPathComboChanged())); |
218 | 217 | ||
219 | connect( Local_View, SIGNAL( clicked( QListViewItem*)), | 218 | connect( Local_View, SIGNAL( clicked( QListViewItem*)), |
220 | this,SLOT( localListClicked(QListViewItem *)) ); | 219 | this,SLOT( localListClicked(QListViewItem *)) ); |
221 | connect( Local_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 220 | connect( Local_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), |
222 | this,SLOT( localListPressed(int, QListViewItem *, const QPoint&, int)) ); | 221 | this,SLOT( localListPressed(int, QListViewItem *, const QPoint&, int)) ); |
223 | 222 | ||
224 | connect( Local_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); | 223 | connect( Local_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); |
225 | 224 | ||
226 | connect( Remote_View, SIGNAL( clicked( QListViewItem*)), | 225 | connect( Remote_View, SIGNAL( clicked( QListViewItem*)), |