summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm
authorllornkcor <llornkcor>2002-04-25 18:15:30 (UTC)
committer llornkcor <llornkcor>2002-04-25 18:15:30 (UTC)
commit42cb3d115a46637f4c46f4b3f3821075a2c18f02 (patch) (unidiff)
treeb11a7aebc1c5282e463e211d89ba64cccf8dae29 /noncore/apps/advancedfm
parent1568872bbd1c92242d7110fe931da23226ca0c55 (diff)
downloadopie-42cb3d115a46637f4c46f4b3f3821075a2c18f02.zip
opie-42cb3d115a46637f4c46f4b3f3821075a2c18f02.tar.gz
opie-42cb3d115a46637f4c46f4b3f3821075a2c18f02.tar.bz2
fixed menu items
Diffstat (limited to 'noncore/apps/advancedfm') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp37
-rw-r--r--noncore/apps/advancedfm/advancedfm.h4
2 files changed, 34 insertions, 7 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index 1083f23..4289fcf 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -115,19 +115,20 @@ AdvancedFm::AdvancedFm( )
115 layout->addMultiCellWidget( homeButton, 0, 0, 6, 6); 115 layout->addMultiCellWidget( homeButton, 0, 0, 6, 6);
116// fileMenu->insertItem( tr( "New" ), this, SLOT( newConnection() )); 116// fileMenu->insertItem( tr( "New" ), this, SLOT( newConnection() ));
117// fileMenu->insertItem( tr( "Connect" ), this, SLOT( connector() )); 117// fileMenu->insertItem( tr( "Connect" ), this, SLOT( connector() ));
118// fileMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() )); 118// fileMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() ));
119 119
120 fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); 120 fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
121 fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
121 fileMenu->insertSeparator(); 122 fileMenu->insertSeparator();
122 fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); 123 fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( mkDir() ));
123 fileMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() )); 124 fileMenu->insertItem( tr( "Rename" ), this, SLOT( rn() ));
124 fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() )); 125 fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() ));
125 fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() )); 126 fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() ));
126 fileMenu->insertSeparator(); 127 fileMenu->insertSeparator();
127 fileMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); 128 fileMenu->insertItem( tr( "Delete" ), this, SLOT( del() ));
128 fileMenu->setCheckable(TRUE); 129 fileMenu->setCheckable(TRUE);
129 130
130 viewMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); 131 viewMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() ));
131 viewMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); 132 viewMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() ));
132 viewMenu->insertSeparator(); 133 viewMenu->insertSeparator();
133 viewMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); 134 viewMenu->insertItem( tr( "About" ), this, SLOT( doAbout() ));
@@ -198,19 +199,20 @@ AdvancedFm::AdvancedFm( )
198// OFileSelector *fileSelector; 199// OFileSelector *fileSelector;
199// fileSelector = new OFileSelector(tab_3,0,0,"/","","*"); 200// fileSelector = new OFileSelector(tab_3,0,0,"/","","*");
200// tabLayout_3->addMultiCellWidget( fileSelector, 0, 0, 0, 3 ); 201// tabLayout_3->addMultiCellWidget( fileSelector, 0, 0, 0, 3 );
201 202
202// TabWidget->insertTab( tab_3, tr( "Files" ) ); 203// TabWidget->insertTab( tab_3, tr( "Files" ) );
203 204
204 currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 205 currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
205 currentDir.setPath( QDir::currentDirPath()); 206 currentDir.setPath( QDir::currentDirPath());
206 207
207 currentRemoteDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 208 currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
208 currentRemoteDir.setPath( QDir::currentDirPath()); 209 currentRemoteDir.setPath( QDir::currentDirPath());
209 210
210 currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); 211b = TRUE;
212 currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" );
211 currentPathCombo->setEditable(TRUE); 213 currentPathCombo->setEditable(TRUE);
212 layout->addMultiCellWidget( currentPathCombo, 3, 3, 0, 6); 214 layout->addMultiCellWidget( currentPathCombo, 3, 3, 0, 6);
213 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); 215 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
214 216
215 connect( currentPathCombo, SIGNAL( activated( const QString & ) ), 217 connect( currentPathCombo, SIGNAL( activated( const QString & ) ),
216 this, SLOT( currentPathComboActivated( const QString & ) ) ); 218 this, SLOT( currentPathComboActivated( const QString & ) ) );
@@ -1259,12 +1261,35 @@ void AdvancedFm::fileStatus() {
1259 1261
1260 } 1262 }
1261 1263
1262 } 1264 }
1263} 1265}
1264 1266
1267void AdvancedFm::mkDir() {
1268 if (TabWidget->currentPageIndex() == 0)
1269 localMakDir();
1270 else
1271 remoteMakDir();
1272
1273}
1274
1275void AdvancedFm::rn() {
1276 if (TabWidget->currentPageIndex() == 0)
1277 localRename();
1278 else
1279 remoteRename();
1280
1281}
1282
1283void AdvancedFm::del() {
1284 if (TabWidget->currentPageIndex() == 0)
1285 localDelete();
1286 else
1287 remoteDelete();
1288}
1289
1265void AdvancedFm::doAbout() { 1290void AdvancedFm::doAbout() {
1266 QMessageBox::message("AdvancedFm","Advanced FileManager\n" 1291 QMessageBox::message("AdvancedFm","Advanced FileManager\n"
1267 "is copyright 2002 by\n" 1292 "is copyright 2002 by\n"
1268 "L.J.Potter<llornkcor@handhelds.org>\n" 1293 "L.J.Potter<llornkcor@handhelds.org>\n"
1269 "and is licensed by the GPL"); 1294 "and is licensed by the GPL");
1270} 1295}
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h
index 30ff28c..a5f26a7 100644
--- a/noncore/apps/advancedfm/advancedfm.h
+++ b/noncore/apps/advancedfm/advancedfm.h
@@ -61,13 +61,15 @@ public:
61protected slots: 61protected slots:
62 void showLocalMenu( QListViewItem *); 62 void showLocalMenu( QListViewItem *);
63 void showRemoteMenu( QListViewItem *); 63 void showRemoteMenu( QListViewItem *);
64 void doLocalCd(); 64 void doLocalCd();
65 void doRemoteCd(); 65 void doRemoteCd();
66// void copy(); 66// void copy();
67 67 void mkDir();
68 void del();
69 void rn();
68 void populateLocalView(); 70 void populateLocalView();
69 void populateRemoteView(); 71 void populateRemoteView();
70 void showHidden(); 72 void showHidden();
71 void showRemoteHidden(); 73 void showRemoteHidden();
72 void writeConfig(); 74 void writeConfig();
73 void readConfig(); 75 void readConfig();