author | llornkcor <llornkcor> | 2002-02-24 15:30:25 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-02-24 15:30:25 (UTC) |
commit | d4592dd8d9cb451c780b71b9aebaa53b2e58f2c3 (patch) (side-by-side diff) | |
tree | 7ea4e5bf47467510c35c08e4cd4114d46ffd4e1b | |
parent | a43106c752dae2404f33a07dc80851c4a745d2bc (diff) | |
download | opie-d4592dd8d9cb451c780b71b9aebaa53b2e58f2c3.zip opie-d4592dd8d9cb451c780b71b9aebaa53b2e58f2c3.tar.gz opie-d4592dd8d9cb451c780b71b9aebaa53b2e58f2c3.tar.bz2 |
changed capitalization of new menu item
-rw-r--r-- | noncore/unsupported/filebrowser/filebrowser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/unsupported/filebrowser/filebrowser.cpp b/noncore/unsupported/filebrowser/filebrowser.cpp index 384d7da..eaf5eeb 100644 --- a/noncore/unsupported/filebrowser/filebrowser.cpp +++ b/noncore/unsupported/filebrowser/filebrowser.cpp @@ -561,193 +561,193 @@ void FileView::itemClicked( QListViewItem * i) void FileView::itemDblClicked( QListViewItem * i) { FileItem * t = (FileItem *) i; if(t == NULL) return; if(t->launch() == -1){ QMessageBox::warning( this, tr( "Launch Application" ), tr( "Launch failed!" ), tr( "Ok" ) ); } } void FileView::parentDir() { setDir( currentDir + "./.." ); } void FileView::lastDir() { if( dirHistory.count() == 0 ) return; QString newDir = dirHistory.last(); dirHistory.remove( dirHistory.last() ); generateDir( newDir ); } void FileView::contentsMousePressEvent( QMouseEvent * e ) { QListView::contentsMousePressEvent( e ); menuTimer.start( 750, TRUE ); } void FileView::contentsMouseReleaseEvent( QMouseEvent * e ) { QListView::contentsMouseReleaseEvent( e ); menuTimer.stop(); } void FileView::cancelMenuTimer() { if( menuTimer.isActive() ) menuTimer.stop(); } void FileView::addToDocuments() { FileItem * i = (FileItem *) currentItem(); DocLnk f; QString n = i->text(0); n.replace(QRegExp("\\..*"),""); f.setName( n ); f.setFile( i->getFilePath() ); f.writeLink(); } void FileView::run() { FileItem * i = (FileItem *) currentItem(); i->launch(); } void FileView::showFileMenu() { FileItem * i = (FileItem *) currentItem(); if ( !i ) return; QPopupMenu * m = new QPopupMenu( this ); if ( !i->isDir() ) { m->insertItem( tr( "Add to Documents" ), this, SLOT( addToDocuments() ) ); m->insertSeparator(); } MimeType mt(i->getFilePath()); const AppLnk* app = mt.application(); if ( !i->isDir() ) { if ( app ) m->insertItem( app->pixmap(), tr( "Open in " + app->name() ), this, SLOT( run() ) ); else if( i->isExecutable() ) m->insertItem( Resource::loadPixmap( i->text( 0 ) ), tr( "Run" ), this, SLOT( run() ) ); m->insertItem( Resource::loadPixmap( "txt" ), tr( "View as text" ), this, SLOT( viewAsText() ) ); m->insertSeparator(); } m->insertItem( tr( "Rename" ), this, SLOT( rename() ) ); m->insertItem( Resource::loadPixmap("cut"), tr( "Cut" ), this, SLOT( cut() ) ); m->insertItem( Resource::loadPixmap("copy"), tr( "Copy" ), this, SLOT( copy() ) ); m->insertItem( Resource::loadPixmap("paste"), tr( "Paste" ), this, SLOT( paste() ) ); - m->insertItem( tr( "change permissions" ), this, SLOT( chPerm() ) ); + m->insertItem( tr( "Change Permissions" ), this, SLOT( chPerm() ) ); m->insertItem( tr( "Delete" ), this, SLOT( del() ) ); m->insertSeparator(); m->insertItem( tr( "Select all" ), this, SLOT( selectAll() ) ); m->insertItem( tr( "Deselect all" ), this, SLOT( deselectAll() ) ); m->popup( QCursor::pos() ); } // // FileBrowser // FileBrowser::FileBrowser( QWidget * parent, const char * name, WFlags f ) : QMainWindow( parent, name, f ) { init( QDir::current().canonicalPath() ); } FileBrowser::FileBrowser( const QString & dir, QWidget * parent, const char * name, WFlags f ) : QMainWindow( parent, name, f ) { init( dir ); } void FileBrowser::init(const QString & dir) { setCaption( tr("File Manager") ); setIcon( Resource::loadPixmap( "filebrowser_icon" ) ); fileView = new FileView( dir, this ); fileView->setAllColumnsShowFocus( TRUE ); setCentralWidget( fileView ); setToolBarsMovable( FALSE ); QPEToolBar* toolBar = new QPEToolBar( this ); toolBar->setHorizontalStretchable( TRUE ); QPEMenuBar* menuBar = new QPEMenuBar( toolBar ); dirMenu = new QPopupMenu( this ); menuBar->insertItem( tr( "Dir" ), dirMenu ); sortMenu = new QPopupMenu( this ); menuBar->insertItem( tr( "Sort" ), sortMenu ); sortMenu->insertItem( tr( "by Name "), this, SLOT( sortName() ) ); sortMenu->insertItem( tr( "by Size "), this, SLOT( sortSize() ) ); sortMenu->insertItem( tr( "by Date "), this, SLOT( sortDate() ) ); sortMenu->insertItem( tr( "by Type "), this, SLOT( sortType() ) ); sortMenu->insertSeparator(); sortMenu->insertItem( tr( "Ascending" ), this, SLOT( updateSorting() ) ); sortMenu->setItemChecked( sortMenu->idAt( 5 ), TRUE ); sortMenu->setItemChecked( sortMenu->idAt( 0 ), TRUE ); toolBar = new QPEToolBar( this ); lastAction = new QAction( tr("Previous dir"), Resource::loadIconSet( "back" ), QString::null, 0, this, 0 ); connect( lastAction, SIGNAL( activated() ), fileView, SLOT( lastDir() ) ); lastAction->addTo( toolBar ); lastAction->setEnabled( FALSE ); upAction = new QAction( tr("Parent dir"), Resource::loadIconSet( "up" ), QString::null, 0, this, 0 ); connect( upAction, SIGNAL( activated() ), fileView, SLOT( parentDir() ) ); upAction->addTo( toolBar ); QAction *a = new QAction( tr("New folder"), Resource::loadPixmap( "newfolder" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), fileView, SLOT( newFolder() ) ); a->addTo( toolBar ); a = new QAction( tr("Cut"), Resource::loadPixmap( "cut" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), fileView, SLOT( cut() ) ); a->addTo( toolBar ); a = new QAction( tr("Copy"), Resource::loadPixmap( "copy" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), fileView, SLOT( copy() ) ); a->addTo( toolBar ); pasteAction = new QAction( tr("Paste"), Resource::loadPixmap( "paste" ), QString::null, 0, this, 0 ); connect( pasteAction, SIGNAL( activated() ), fileView, SLOT( paste() ) ); pasteAction->addTo( toolBar ); connect( fileView, SIGNAL( dirChanged() ), SLOT( updateDirMenu() ) ); updateDirMenu(); QCopChannel* pcmciaChannel = new QCopChannel( "QPE/Card", this ); connect( pcmciaChannel, SIGNAL(received(const QCString &, const QByteArray &)), this, SLOT(pcmciaMessage( const QCString &, const QByteArray &)) ); } |