-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 9 | ||||
-rw-r--r-- | noncore/apps/advancedfm/opie-advancedfm.control | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index ebd7fc3..1287c57 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -170,130 +170,134 @@ AdvancedFm::AdvancedFm( ) | |||
170 | layout->addMultiCellWidget( TabWidget, 2, 2, 0, 7); | 170 | layout->addMultiCellWidget( TabWidget, 2, 2, 0, 7); |
171 | 171 | ||
172 | tab = new QWidget( TabWidget, "tab" ); | 172 | tab = new QWidget( TabWidget, "tab" ); |
173 | tabLayout = new QGridLayout( tab ); | 173 | tabLayout = new QGridLayout( tab ); |
174 | tabLayout->setSpacing( 2); | 174 | tabLayout->setSpacing( 2); |
175 | tabLayout->setMargin( 2); | 175 | tabLayout->setMargin( 2); |
176 | 176 | ||
177 | Local_View = new QListView( tab, "Local_View" ); | 177 | Local_View = new QListView( tab, "Local_View" ); |
178 | // Local_View->setResizePolicy( QListView::AutoOneFit ); | 178 | // Local_View->setResizePolicy( QListView::AutoOneFit ); |
179 | Local_View->addColumn( tr("File"),130); | 179 | Local_View->addColumn( tr("File"),130); |
180 | Local_View->addColumn( tr("Size"),-1); | 180 | Local_View->addColumn( tr("Size"),-1); |
181 | Local_View->setColumnAlignment(1,QListView::AlignRight); | 181 | Local_View->setColumnAlignment(1,QListView::AlignRight); |
182 | Local_View->addColumn( tr("Date"),-1); | 182 | Local_View->addColumn( tr("Date"),-1); |
183 | Local_View->setColumnAlignment(2,QListView::AlignRight); | 183 | Local_View->setColumnAlignment(2,QListView::AlignRight); |
184 | Local_View->setAllColumnsShowFocus(TRUE); | 184 | Local_View->setAllColumnsShowFocus(TRUE); |
185 | Local_View->setMultiSelection( TRUE ); | 185 | Local_View->setMultiSelection( TRUE ); |
186 | Local_View->setSelectionMode(QListView::Extended); | 186 | Local_View->setSelectionMode(QListView::Extended); |
187 | 187 | ||
188 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); | 188 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); |
189 | 189 | ||
190 | 190 | ||
191 | 191 | ||
192 | tabLayout->addWidget( Local_View, 0, 0 ); | 192 | tabLayout->addWidget( Local_View, 0, 0 ); |
193 | 193 | ||
194 | connect( Local_View, SIGNAL( clicked( QListViewItem*)), | 194 | connect( Local_View, SIGNAL( clicked( QListViewItem*)), |
195 | this,SLOT( localListClicked(QListViewItem *)) ); | 195 | this,SLOT( localListClicked(QListViewItem *)) ); |
196 | connect( Local_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 196 | connect( Local_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), |
197 | this,SLOT( localListPressed(int, QListViewItem *, const QPoint&, int)) ); | 197 | this,SLOT( localListPressed(int, QListViewItem *, const QPoint&, int)) ); |
198 | 198 | ||
199 | connect( Local_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); | 199 | connect( Local_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); |
200 | 200 | ||
201 | TabWidget->insertTab( tab, tr("1")); | 201 | TabWidget->insertTab( tab, tr("1")); |
202 | 202 | ||
203 | tab_2 = new QWidget( TabWidget, "tab_2" ); | 203 | tab_2 = new QWidget( TabWidget, "tab_2" ); |
204 | tabLayout_2 = new QGridLayout( tab_2 ); | 204 | tabLayout_2 = new QGridLayout( tab_2 ); |
205 | tabLayout_2->setSpacing( 2); | 205 | tabLayout_2->setSpacing( 2); |
206 | tabLayout_2->setMargin( 2); | 206 | tabLayout_2->setMargin( 2); |
207 | 207 | ||
208 | Remote_View = new QListView( tab_2, "Remote_View" ); | 208 | Remote_View = new QListView( tab_2, "Remote_View" ); |
209 | Remote_View->addColumn( tr("File"),130); | 209 | Remote_View->addColumn( tr("File"),130); |
210 | Remote_View->addColumn( tr("Size"),-1); | 210 | Remote_View->addColumn( tr("Size"),-1); |
211 | Remote_View->setColumnAlignment(1,QListView::AlignRight); | 211 | Remote_View->setColumnAlignment(1,QListView::AlignRight); |
212 | Remote_View->addColumn( tr("Date"),-1); | 212 | Remote_View->addColumn( tr("Date"),-1); |
213 | Remote_View->setColumnAlignment(2,QListView::AlignRight); | 213 | Remote_View->setColumnAlignment(2,QListView::AlignRight); |
214 | Remote_View->setAllColumnsShowFocus(TRUE); | 214 | Remote_View->setAllColumnsShowFocus(TRUE); |
215 | Remote_View->setMultiSelection( TRUE ); | 215 | Remote_View->setMultiSelection( TRUE ); |
216 | Remote_View->setSelectionMode(QListView::Extended); | 216 | Remote_View->setSelectionMode(QListView::Extended); |
217 | 217 | ||
218 | |||
218 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); | 219 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); |
219 | 220 | ||
220 | connect( Remote_View, SIGNAL( clicked( QListViewItem*)), | 221 | connect( Remote_View, SIGNAL( clicked( QListViewItem*)), |
221 | this,SLOT( remoteListClicked(QListViewItem *)) ); | 222 | this,SLOT( remoteListClicked(QListViewItem *)) ); |
222 | connect( Remote_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 223 | connect( Remote_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), |
223 | this,SLOT( remoteListPressed(int, QListViewItem *, const QPoint&, int)) ); | 224 | this,SLOT( remoteListPressed(int, QListViewItem *, const QPoint&, int)) ); |
224 | // connect( Remote_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); | 225 | // connect( Remote_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); |
225 | 226 | ||
226 | tabLayout_2->addWidget( Remote_View, 0, 0 ); | 227 | tabLayout_2->addWidget( Remote_View, 0, 0 ); |
227 | 228 | ||
229 | |||
228 | TabWidget->insertTab( tab_2, tr( "2")); | 230 | TabWidget->insertTab( tab_2, tr( "2")); |
229 | 231 | ||
230 | connect(TabWidget,SIGNAL(currentChanged(QWidget *)), | 232 | connect(TabWidget,SIGNAL(currentChanged(QWidget *)), |
231 | this,SLOT(tabChanged(QWidget*))); | 233 | this,SLOT(tabChanged(QWidget*))); |
232 | 234 | ||
233 | tab_3 = new QWidget( TabWidget, "tab_3" ); | 235 | /* tab_3 = new QWidget( TabWidget, "tab_3" ); |
234 | tabLayout_3 = new QGridLayout( tab_3 ); | 236 | tabLayout_3 = new QGridLayout( tab_3 ); |
235 | tabLayout_3->setSpacing( 2); | 237 | tabLayout_3->setSpacing( 2); |
236 | tabLayout_3->setMargin( 2); | 238 | tabLayout_3->setMargin( 2); |
237 | 239 | ||
238 | 240 | ||
239 | // OFileDialog fileDialog; | 241 | // OFileDialog fileDialog; |
240 | // fileDialog; | 242 | // fileDialog; |
241 | // fileSelector = new FileSelector( "*",tab_3, "fileselector" , FALSE, FALSE); //buggy | 243 | // fileSelector = new FileSelector( "*",tab_3, "fileselector" , FALSE, FALSE); //buggy |
242 | // fileDialog = new OFileDialog("bangalow", tab_3, 4, 2, "Bungalow"); | 244 | // fileDialog = new OFileDialog("bangalow", tab_3, 4, 2, "Bungalow"); |
243 | // OFileSelector fileDialog = new OFileSelector( tab_3, 4, 2,"/"); | 245 | // OFileSelector fileDialog = new OFileSelector( tab_3, 4, 2,"/"); |
244 | 246 | ||
245 | QListView *fileTree; | 247 | QListView *fileTree; |
246 | fileTree = new QListView( tab_3, "tree" ); | 248 | fileTree = new QListView( tab_3, "tree" ); |
247 | 249 | ||
248 | 250 | ||
249 | tabLayout_3->addMultiCellWidget( fileTree, 0, 0, 0, 3 ); | 251 | tabLayout_3->addMultiCellWidget( fileTree, 0, 0, 0, 3 ); |
250 | 252 | ||
251 | TabWidget->insertTab( tab_3, tr( "Remote" ) ); | 253 | TabWidget->insertTab( tab_3, tr( "Remote" ) ); |
254 | */ | ||
255 | |||
252 | /////////////// | 256 | /////////////// |
253 | 257 | ||
254 | //////////////////// | 258 | //////////////////// |
255 | 259 | ||
256 | 260 | ||
257 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 261 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
258 | currentDir.setPath( QDir::currentDirPath()); | 262 | currentDir.setPath( QDir::currentDirPath()); |
259 | 263 | ||
260 | currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 264 | currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
261 | currentRemoteDir.setPath( QDir::currentDirPath()); | 265 | currentRemoteDir.setPath( QDir::currentDirPath()); |
262 | 266 | ||
263 | b = TRUE; | 267 | b = TRUE; |
264 | 268 | ||
265 | filterStr="*"; | 269 | filterStr="*"; |
266 | b=FALSE; | 270 | b=FALSE; |
267 | 271 | ||
268 | connect( &menuTimer, SIGNAL( timeout() ), SLOT( showFileMenu() ) ); | 272 | connect( &menuTimer, SIGNAL( timeout() ), SLOT( showFileMenu() ) ); |
269 | 273 | ||
270 | populateLocalView(); | 274 | populateLocalView(); |
271 | populateRemoteView(); | 275 | populateRemoteView(); |
272 | currentPathCombo->setFocus(); | 276 | currentPathCombo->setFocus(); |
273 | } | 277 | } |
274 | 278 | ||
275 | AdvancedFm::~AdvancedFm() | 279 | AdvancedFm::~AdvancedFm() |
276 | { | 280 | { |
277 | } | 281 | } |
278 | 282 | ||
279 | void AdvancedFm::cleanUp() | 283 | void AdvancedFm::cleanUp() |
280 | { | 284 | { |
281 | QString sfile=QDir::homeDirPath(); | 285 | QString sfile=QDir::homeDirPath(); |
282 | if(sfile.right(1) != "/") | 286 | if(sfile.right(1) != "/") |
283 | sfile+="/._temp"; | 287 | sfile+="/._temp"; |
284 | else | 288 | else |
285 | sfile+="._temp"; | 289 | sfile+="._temp"; |
286 | QFile file( sfile); | 290 | QFile file( sfile); |
287 | if(file.exists()) | 291 | if(file.exists()) |
288 | file.remove(); | 292 | file.remove(); |
289 | } | 293 | } |
290 | 294 | ||
291 | void AdvancedFm::tabChanged(QWidget *w) | 295 | void AdvancedFm::tabChanged(QWidget *w) |
292 | { | 296 | { |
293 | if (TabWidget->currentPageIndex() == 0) { | 297 | if (TabWidget->currentPageIndex() == 0) { |
294 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 298 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
295 | viewMenu->setItemChecked(viewMenu->idAt(0),TRUE); | 299 | viewMenu->setItemChecked(viewMenu->idAt(0),TRUE); |
296 | viewMenu->setItemChecked(viewMenu->idAt(1),FALSE); | 300 | viewMenu->setItemChecked(viewMenu->idAt(1),FALSE); |
297 | } | 301 | } |
298 | if (TabWidget->currentPageIndex() == 1) { | 302 | if (TabWidget->currentPageIndex() == 1) { |
299 | currentPathCombo->lineEdit()->setText( currentRemoteDir.canonicalPath()); | 303 | currentPathCombo->lineEdit()->setText( currentRemoteDir.canonicalPath()); |
@@ -1724,59 +1728,60 @@ void AdvancedFm::showFileMenu() { | |||
1724 | m->insertSeparator(); | 1728 | m->insertSeparator(); |
1725 | 1729 | ||
1726 | 1730 | ||
1727 | if(isLocalView) | 1731 | if(isLocalView) |
1728 | m->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); | 1732 | m->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); |
1729 | else | 1733 | else |
1730 | m->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); | 1734 | m->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); |
1731 | 1735 | ||
1732 | m->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); | 1736 | m->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); |
1733 | m->insertSeparator(); | 1737 | m->insertSeparator(); |
1734 | 1738 | ||
1735 | if(isLocalView) | 1739 | if(isLocalView) |
1736 | m->insertItem( tr( "Rename" ), this, SLOT( localRename() )); | 1740 | m->insertItem( tr( "Rename" ), this, SLOT( localRename() )); |
1737 | else | 1741 | else |
1738 | m->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); | 1742 | m->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); |
1739 | 1743 | ||
1740 | m->insertItem( tr( "Copy" ), this, SLOT( copy() )); | 1744 | m->insertItem( tr( "Copy" ), this, SLOT( copy() )); |
1741 | m->insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); | 1745 | m->insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); |
1742 | m->insertItem( tr( "Move" ), this, SLOT( move() )); | 1746 | m->insertItem( tr( "Move" ), this, SLOT( move() )); |
1743 | m->insertSeparator(); | 1747 | m->insertSeparator(); |
1744 | 1748 | ||
1745 | if(isLocalView) | 1749 | if(isLocalView) |
1746 | m->insertItem( tr( "Rescan" ), this, SLOT( populateLocalView() )); | 1750 | m->insertItem( tr( "Rescan" ), this, SLOT( populateLocalView() )); |
1747 | else | 1751 | else |
1748 | m->insertItem( tr( "Rescan" ), this, SLOT( populateRemoteView() )); | 1752 | m->insertItem( tr( "Rescan" ), this, SLOT( populateRemoteView() )); |
1749 | 1753 | ||
1750 | m->insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); | 1754 | m->insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); |
1751 | m->insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); | 1755 | m->insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); |
1752 | m->insertSeparator(); | 1756 | m->insertSeparator(); |
1753 | 1757 | ||
1754 | if(isLocalView) | 1758 | if(isLocalView) |
1755 | m->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); | 1759 | m->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); |
1756 | else | 1760 | else |
1757 | m->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); | 1761 | m->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); |
1758 | 1762 | ||
1759 | m->insertSeparator(); | 1763 | m->insertSeparator(); |
1760 | m->insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); | 1764 | m->insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); |
1761 | if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) //bad hack for Sharp zaurus failings | 1765 | if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) //bad hack for Sharp zaurus failings |
1762 | m->insertItem( tr( "Properties" ), this, SLOT( doProperties() )); | 1766 | m->insertItem( tr( "Properties" ), this, SLOT( doProperties() )); |
1763 | m->setCheckable(TRUE); | 1767 | m->setCheckable(TRUE); |
1764 | if (!b) | 1768 | if (!b) |
1765 | m->setItemChecked(m->idAt(0),TRUE); | 1769 | m->setItemChecked(m->idAt(0),TRUE); |
1766 | else | 1770 | else |
1767 | m->setItemChecked(m->idAt(0),FALSE); | 1771 | m->setItemChecked(m->idAt(0),FALSE); |
1768 | if(Ir::supported()) | 1772 | if(Ir::supported()) |
1769 | m->insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); | 1773 | m->insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); |
1770 | m->setFocus(); | 1774 | m->setFocus(); |
1771 | m->exec( QCursor::pos() ); | 1775 | m->exec( QCursor::pos() ); |
1776 | sleep(1); | ||
1772 | if(m) delete m; | 1777 | if(m) delete m; |
1773 | } | 1778 | } |
1774 | 1779 | ||
1775 | 1780 | ||
1776 | void AdvancedFm::cancelMenuTimer() | 1781 | void AdvancedFm::cancelMenuTimer() |
1777 | { | 1782 | { |
1778 | 1783 | ||
1779 | qDebug("selectionChanged: cancel menu timer"); | 1784 | qDebug("selectionChanged: cancel menu timer"); |
1780 | if( menuTimer.isActive() ) | 1785 | if( menuTimer.isActive() ) |
1781 | menuTimer.stop(); | 1786 | menuTimer.stop(); |
1782 | } | 1787 | } |
diff --git a/noncore/apps/advancedfm/opie-advancedfm.control b/noncore/apps/advancedfm/opie-advancedfm.control index bda8543..957a584 100644 --- a/noncore/apps/advancedfm/opie-advancedfm.control +++ b/noncore/apps/advancedfm/opie-advancedfm.control | |||
@@ -1,9 +1,10 @@ | |||
1 | Files: bin/advancedfm apps/Applications/advancedfm.desktop | 1 | Files: bin/advancedfm apps/Applications/advancedfm.desktop |
2 | Priority: optional | 2 | Priority: optional |
3 | Package: opie-advancedfm | ||
3 | Section: opie/applications | 4 | Section: opie/applications |
4 | Maintainer: L.J. Potter <ljp@llornkcor.com> | 5 | Maintainer: L.J. Potter <ljp@llornkcor.com> |
5 | Architecture: arm | 6 | Architecture: arm |
6 | Version: $QPE_VERSION-$SUB_VERSION | 7 | Version: $QPE_VERSION-$SUB_VERSION |
7 | Depends: opie-base ($QPE_VERSION) | 8 | Depends: opie-base ($QPE_VERSION) |
8 | Description: Advanced File Manager | 9 | Description: Advanced File Manager |
9 | The advanced file manager for the Opie environment. | 10 | The advanced file manager for the Opie environment. |