You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(98) |
Sep
(138) |
Oct
(100) |
Nov
(49) |
Dec
(131) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(94) |
Feb
(65) |
Mar
(100) |
Apr
(83) |
May
(72) |
Jun
(29) |
Jul
(167) |
Aug
(127) |
Sep
(131) |
Oct
(269) |
Nov
(122) |
Dec
(100) |
2005 |
Jan
(228) |
Feb
(266) |
Mar
(63) |
Apr
(135) |
May
(157) |
Jun
(52) |
Jul
(25) |
Aug
(49) |
Sep
(184) |
Oct
(159) |
Nov
(75) |
Dec
(37) |
2006 |
Jan
(60) |
Feb
(129) |
Mar
(110) |
Apr
(34) |
May
(31) |
Jun
(42) |
Jul
(72) |
Aug
(90) |
Sep
(57) |
Oct
(66) |
Nov
(42) |
Dec
(90) |
2007 |
Jan
(106) |
Feb
(54) |
Mar
(93) |
Apr
(27) |
May
(21) |
Jun
(17) |
Jul
(19) |
Aug
(22) |
Sep
(25) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
2008 |
Jan
(65) |
Feb
(70) |
Mar
(29) |
Apr
(45) |
May
(91) |
Jun
(20) |
Jul
(11) |
Aug
(24) |
Sep
(23) |
Oct
(13) |
Nov
(23) |
Dec
(39) |
2009 |
Jan
(23) |
Feb
(39) |
Mar
(15) |
Apr
(56) |
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Synchronizer In directory sc8-pr-cvs1:/tmp/cvs-serv5908/krusader_kde3/krusader/Synchronizer Added Files: Makefile.am synchronizedialog.cpp synchronizedialog.h synchronizer.cpp synchronizer.h synchronizergui.cpp synchronizergui.h Log Message: ADDED: directory synchronizer files to the repository --- NEW FILE: Makefile.am --- ####### kdevelop will overwrite this part!!! (begin)########## noinst_LIBRARIES = libSynchronizer.a INCLUDES = $(all_includes) libSynchronizer_a_METASOURCES = AUTO libSynchronizer_a_SOURCES = synchronizedialog.cpp synchronizer.cpp synchronizergui.cpp EXTRA_DIST = synchronizergui.h synchronizergui.cpp synchronizer.h synchronizer.cpp synchronizedialog.h synchronizedialog.cpp ####### kdevelop will overwrite this part!!! (end)############ --- NEW FILE: synchronizedialog.cpp --- /*************************************************************************** synchronizedialog.cpp - description ------------------- copyright : (C) 2003 by Csaba Karai e-mail : kru...@us... web site : http://krusader.sourceforge.net --------------------------------------------------------------------------- Description *************************************************************************** A db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD S o u r c e F i l e *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "synchronizedialog.h" #include "../VFS/krpermhandler.h" #include "../krusader.h" #include "../defaults.h" #include <qlayout.h> #include <qhbox.h> #include <klocale.h> /* TODO TODO TODO TODO TODO */ #define _ConfirmOverWrites false /* TODO TODO TODO TODO TODO */ SynchronizeDialog::SynchronizeDialog( QWidget* parent, const char* name, bool modal, WFlags fl, Synchronizer *sync, int pleftCopyNr, KIO::filesize_t pleftCopySize, int prightCopyNr, KIO::filesize_t prightCopySize, int pdeleteNr, KIO::filesize_t pdeleteSize ) : QDialog( parent, name, modal, fl ), synchronizer( sync ), leftCopyNr ( pleftCopyNr ), leftCopySize( pleftCopySize ), rightCopyNr ( prightCopyNr ), rightCopySize( prightCopySize ), deleteNr( pdeleteNr ), deleteSize( pdeleteSize ), isPause( true ), syncStarted( false ) { setCaption( i18n("Krusader::Synchronize") ); QVBoxLayout *layout = new QVBoxLayout( this, 11, 6, "SynchronizeDialogLayout" ); cbRightToLeft = new QCheckBox( i18n( "Left to right: Copy %1 files (%2 bytes)" ) .arg( leftCopyNr ).arg( KRpermHandler::parseSize( leftCopySize ).stripWhiteSpace() ), this, "labelRightToLeft" ); cbRightToLeft->setChecked( leftCopyNr != 0 ); cbRightToLeft->setEnabled( leftCopyNr != 0 ); layout->addWidget( cbRightToLeft ); lbRightToLeft = new QLabel( i18n( "\tReady: %1/%2 files, %3/%4" ).arg( 0 ) .arg( leftCopyNr ).arg( 0 ).arg( KRpermHandler::parseSize( leftCopySize ).stripWhiteSpace() ), this, "lbRightToLeft" ); lbRightToLeft->setEnabled( leftCopyNr != 0 ); layout->addWidget( lbRightToLeft ); cbLeftToRight = new QCheckBox( i18n( "Right to left: Copy %1 files (%2 bytes)" ) .arg( rightCopyNr ).arg( KRpermHandler::parseSize( rightCopySize ).stripWhiteSpace() ), this, "cbLeftToRight" ); cbLeftToRight->setChecked( rightCopyNr != 0 ); cbLeftToRight->setEnabled( rightCopyNr != 0 ); layout->addWidget( cbLeftToRight ); lbLeftToRight = new QLabel( i18n( "\tReady: %1/%2 files, %3/%4" ).arg( 0 ) .arg( rightCopyNr ).arg( 0 ).arg( KRpermHandler::parseSize( rightCopySize ).stripWhiteSpace() ), this, "lbLeftToRight" ); lbLeftToRight->setEnabled( rightCopyNr != 0 ); layout->addWidget( lbLeftToRight ); cbDeletable = new QCheckBox( i18n( "Right: Delete %1 files (%2 bytes)" ) .arg( deleteNr ).arg( KRpermHandler::parseSize( deleteSize ).stripWhiteSpace() ), this, "cbDeletable" ); cbDeletable->setChecked( deleteNr != 0 ); cbDeletable->setEnabled( deleteNr != 0 ); layout->addWidget( cbDeletable ); lbDeletable = new QLabel( i18n( "\tReady: %1/%2 files, %3/%4" ).arg( 0 ) .arg( deleteNr ).arg( 0 ).arg( KRpermHandler::parseSize( deleteSize ).stripWhiteSpace() ), this, "lbDeletable" ); lbDeletable->setEnabled( deleteNr != 0 ); layout->addWidget( lbDeletable ); progress = new QProgressBar(1000, this); progress->setCenterIndicator(true); progress->setProgress( 0 ); progress->setMinimumWidth( 400 ); layout->addWidget( progress ); QHBox *hbox = new QHBox( this, "SynchronizeDialogHBox" ); hbox->setSpacing( 6 ); cbOverwrite = new QCheckBox( i18n( "Confirm overwrites" ), this, "cbOverWrite" ); krConfig->setGroup("Synchronize"); cbOverwrite->setChecked( krConfig->readBoolEntry( "Confirm overwrites", _ConfirmOverWrites ) ); layout->addWidget( cbOverwrite ); QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); hbox->layout()->addItem( spacer ); btnStart = new QPushButton( hbox, "btnStart" ); btnStart->setText( i18n( "Start" ) ); btnPause = new QPushButton( hbox, "btnPause" ); btnPause->setEnabled( false ); btnPause->setText( i18n( "Pause" ) ); QPushButton *btnClose = new QPushButton( hbox, "btnClose" ); btnClose->setText( i18n( "Close" ) ); layout->addWidget( hbox ); connect( btnStart, SIGNAL( clicked() ), this, SLOT( startSynchronization() ) ); connect( btnPause, SIGNAL( clicked() ), this, SLOT( pauseOrResume() ) ); connect( btnClose, SIGNAL( clicked() ), this, SLOT( reject() ) ); exec(); } SynchronizeDialog::~SynchronizeDialog() { krConfig->writeEntry("Confirm overwrites", cbOverwrite->isChecked() ); } void SynchronizeDialog::startSynchronization() { btnStart->setEnabled( false ); btnPause->setEnabled( syncStarted = true ); connect( synchronizer, SIGNAL( synchronizationFinished() ), this, SLOT( synchronizationFinished() ) ); connect( synchronizer, SIGNAL( processedSizes( int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t ) ), this, SLOT( processedSizes( int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t) ) ); connect( synchronizer, SIGNAL( pauseAccepted() ), this, SLOT( pauseAccepted() ) ); synchronizer->synchronize( cbRightToLeft->isChecked(), cbLeftToRight->isChecked(), cbDeletable->isChecked(), !cbOverwrite->isChecked() ); } void SynchronizeDialog::synchronizationFinished() { QDialog::reject(); } void SynchronizeDialog::processedSizes( int leftNr, KIO::filesize_t leftSize, int rightNr, KIO::filesize_t rightSize, int delNr, KIO::filesize_t delSize ) { lbRightToLeft->setText( i18n( "\tReady: %1/%2 files, %3/%4" ).arg( leftNr ).arg( leftCopyNr ) .arg( KRpermHandler::parseSize( leftSize ).stripWhiteSpace() ) .arg( KRpermHandler::parseSize( leftCopySize ).stripWhiteSpace() ) ); lbLeftToRight->setText( i18n( "\tReady: %1/%2 files, %3/%4" ).arg( rightNr ).arg( rightCopyNr ) .arg( KRpermHandler::parseSize( rightSize ).stripWhiteSpace() ) .arg( KRpermHandler::parseSize( rightCopySize ).stripWhiteSpace() ) ); lbDeletable->setText ( i18n( "\tReady: %1/%2 files, %3/%4" ).arg( delNr ).arg( deleteNr ) .arg( KRpermHandler::parseSize( delSize ).stripWhiteSpace() ) .arg( KRpermHandler::parseSize( deleteSize ).stripWhiteSpace() ) ); KIO::filesize_t totalSum = leftCopySize + rightCopySize + deleteSize; KIO::filesize_t processedSum = leftSize + rightSize + delSize; if( totalSum == 0 ) totalSum++; progress->setProgress( (int)(((double)processedSum / (double)totalSum )*1000) ); } void SynchronizeDialog::pauseOrResume() { if( isPause ) { btnPause->setEnabled( false ); synchronizer->pause(); } else { btnPause->setText( i18n( "Pause" ) ); synchronizer->resume(); isPause = true; } } void SynchronizeDialog::pauseAccepted() { btnPause->setText( i18n( "Resume" ) ); btnPause->setEnabled( true ); isPause = false; } --- NEW FILE: synchronizedialog.h --- /*************************************************************************** synchronizedialog.h - description ------------------- copyright : (C) 2003 by Csaba Karai e-mail : kru...@us... web site : http://krusader.sourceforge.net --------------------------------------------------------------------------- Description *************************************************************************** A db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD H e a d e r F i l e *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef __SYNCHRONIZE_DIALOG__ #define __SYNCHRONIZE_DIALOG__ #include "../VFS/vfs.h" #include "synchronizer.h" #include <qdialog.h> #include <qpushbutton.h> #include <qcheckbox.h> #include <qlabel.h> #include <qprogressbar.h> class SynchronizeDialog : QDialog { Q_OBJECT public: SynchronizeDialog( QWidget*, const char*, bool, WFlags, Synchronizer *sync, int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t); ~SynchronizeDialog(); inline bool wasSyncronizationStarted() { return syncStarted; } public slots: void startSynchronization(); void synchronizationFinished(); void processedSizes( int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t); void pauseOrResume(); void pauseAccepted(); private: QProgressBar *progress; QCheckBox *cbRightToLeft; QCheckBox *cbLeftToRight; QCheckBox *cbDeletable; QLabel *lbRightToLeft; QLabel *lbLeftToRight; QLabel *lbDeletable; QCheckBox *cbOverwrite; QPushButton *btnStart; QPushButton *btnPause; Synchronizer *synchronizer; int leftCopyNr; KIO::filesize_t leftCopySize; int rightCopyNr; KIO::filesize_t rightCopySize; int deleteNr; KIO::filesize_t deleteSize; bool isPause; bool syncStarted; }; #endif /* __SYNCHRONIZE_DIALOG__ */ --- NEW FILE: synchronizer.cpp --- /*************************************************************************** synchronizer.cpp - description ------------------- copyright : (C) 2003 by Csaba Karai e-mail : kru...@us... web site : http://krusader.sourceforge.net --------------------------------------------------------------------------- Description *************************************************************************** A db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD S o u r c e F i l e *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "synchronizer.h" #include "../VFS/ftp_vfs.h" #include "../VFS/normal_vfs.h" #include "../VFS/vfile.h" #include <kurl.h> #include <kmessagebox.h> #include <klocale.h> #include <qapplication.h> #include <qregexp.h> #include <kio/job.h> #include <kdialogbase.h> #include <kio/observer.h> #include <kio/renamedlg.h> #include <kio/skipdlg.h> #include <unistd.h> #define DISPLAY_UPDATE_PERIOD 2 Synchronizer::Synchronizer() : displayUpdateCount( 0 ), markEquals( true ), markDiffers ( true ), markCopyToLeft( true ), markCopyToRight( true ), markDeletable( true ) { resultList.setAutoDelete( true ); } void Synchronizer::compare( QString leftURL, QString rightURL, QString filter, bool subDirs, bool symLinks, bool igDate, bool asymm ) { resultList.clear(); recurseSubDirs = subDirs; followSymLinks = symLinks; ignoreDate = igDate; asymmetric = asymm; fileFilter = filter; stopped = false; if( !leftURL.endsWith("/" )) leftURL+="/"; if( !rightURL.endsWith("/" )) rightURL+="/"; compareDirectory( 0, leftBaseDir = leftURL, rightBaseDir = rightURL, "" ); } void Synchronizer::compareDirectory( SynchronizerFileItem *parent, QString leftURL, QString rightURL, QString dir, QString addName, QString addDir, time_t addLTime, time_t addRTime ) { vfs * left_directory = getDirectory( leftURL ); vfs * right_directory = getDirectory( rightURL ); vfile * left_file; vfile * right_file; QString file_name; if( left_directory == 0 || right_directory == 0 ) { if( left_directory ) delete left_directory; if( right_directory ) delete right_directory; return; } if( !dir.isEmpty() ) parent = addDuplicateItem( parent, addName, addDir, 0, 0, addLTime, addRTime, true ); /* walking through in the left directory */ for( left_file=left_directory->vfs_getFirstFile(); left_file != 0 ; left_file=left_directory->vfs_getNextFile() ) { if ( left_file->vfile_isDir() || left_file->vfile_isSymLink() ) continue; file_name = left_file->vfile_getName(); if( !checkName( file_name ) ) continue; if( (right_file = right_directory->vfs_search( file_name )) == 0 ) addLeftOnlyItem( parent, file_name, dir, left_file->vfile_getSize(), left_file->vfile_getTime_t() ); else { if( right_file->vfile_isDir() || right_file->vfile_isSymLink() ) continue; addDuplicateItem( parent, file_name, dir, left_file->vfile_getSize(), right_file->vfile_getSize(), left_file->vfile_getTime_t(), right_file->vfile_getTime_t() ); } } /* walking through in the right directory */ for( right_file=right_directory->vfs_getFirstFile(); right_file != 0 ; right_file=right_directory->vfs_getNextFile() ) { if( right_file->vfile_isDir() || right_file->vfile_isSymLink() ) continue; file_name = right_file->vfile_getName(); if( !checkName( file_name ) ) continue; if( left_directory->vfs_search( file_name ) == 0 ) addRightOnlyItem( parent, file_name, dir, right_file->vfile_getSize(), right_file->vfile_getTime_t() ); } /* walking through the subdirectories */ if( recurseSubDirs ) { for( left_file=left_directory->vfs_getFirstFile(); left_file != 0 ; left_file=left_directory->vfs_getNextFile() ) { if ( left_file->vfile_isDir() && ( followSymLinks || !left_file->vfile_isSymLink()) ) { file_name = left_file->vfile_getName(); if( (right_file = right_directory->vfs_search( file_name )) == 0 ) addSingleDirectory( parent, file_name, dir, left_file->vfile_getTime_t(), true ); else compareDirectory( parent, leftURL+file_name+"/", rightURL+file_name+"/", dir.isEmpty() ? file_name : dir+"/"+file_name, file_name, dir, left_file->vfile_getTime_t(), right_file->vfile_getTime_t() ); } } for( right_file=right_directory->vfs_getFirstFile(); right_file != 0 ; right_file=right_directory->vfs_getNextFile() ) { if ( right_file->vfile_isDir() && (followSymLinks || !right_file->vfile_isSymLink()) ) { file_name = right_file->vfile_getName(); if( left_directory->vfs_search( file_name ) == 0 ) addSingleDirectory( parent, file_name, dir, right_file->vfile_getTime_t(), false ); } } } delete left_directory; delete right_directory; } vfs * Synchronizer::getDirectory( QString url ) { if( stopped ) return 0; vfs *v; bool isNormalVFS; if( url.startsWith( "/" ) || url.startsWith( "file:/" )) /* is it normal vfs? */ { v = new normal_vfs(url,0); isNormalVFS = true; } else /* ftp vfs */ { v = new ftp_vfs(url,0); isNormalVFS = false; } if ( v->vfs_error() ) { KMessageBox::error(0, i18n("Error at opening URL:%1!").arg( url )); delete v; return 0; } bool result; if( isNormalVFS ) result = v->vfs_refresh( url ); else { while( ((ftp_vfs *)v)->isBusy() ) { qApp->processEvents(); usleep( 100 ); } } if ( !result || v->vfs_error() ) { KMessageBox::error(0, i18n("Error at opening URL:%1!").arg( url )); delete v; return 0; } return v; } QString Synchronizer::getTaskTypeName( TaskType taskType ) { static QString names[] = {"=","!=","<-","->","DEL"}; return names[taskType]; } SynchronizerFileItem * Synchronizer::addItem( SynchronizerFileItem *parent, QString file_name, QString dir, bool existsLeft, bool existsRight, KIO::filesize_t leftSize, KIO::filesize_t rightSize, time_t leftDate, time_t rightDate, TaskType tsk, bool isDir ) { bool marked = isMarked( tsk, existsLeft && existsRight ); SynchronizerFileItem *item = new SynchronizerFileItem( file_name, dir, marked, existsLeft, existsRight, leftSize, rightSize, leftDate, rightDate, tsk, isDir, parent ); resultList.append( item ); if( marked ) { markParentDirectories( item ); emit comparedFileData( item ); } if( displayUpdateCount++ % DISPLAY_UPDATE_PERIOD == (DISPLAY_UPDATE_PERIOD-1) ) qApp->processEvents(); return item; } SynchronizerFileItem * Synchronizer::addLeftOnlyItem( SynchronizerFileItem *parent, QString file_name, QString dir, KIO::filesize_t size, time_t date, bool isDir ) { return addItem( parent, file_name, dir, true, false, size, 0, date, 0, asymmetric ? TT_DELETE : TT_COPY_TO_RIGHT, isDir ); } SynchronizerFileItem * Synchronizer::addRightOnlyItem( SynchronizerFileItem *parent, QString file_name, QString dir, KIO::filesize_t size, time_t date, bool isDir ) { return addItem( parent, file_name, dir, false, true, 0, size, 0, date, TT_COPY_TO_LEFT, isDir ); } SynchronizerFileItem * Synchronizer::addDuplicateItem( SynchronizerFileItem *parent, QString file_name, QString dir, KIO::filesize_t leftSize, KIO::filesize_t rightSize, time_t leftDate, time_t rightDate, bool isDir ) { TaskType task; if( isDir || ( leftSize == rightSize && (ignoreDate || leftDate == rightDate) ) ) task = TT_EQUALS; else { if( asymmetric ) task = TT_COPY_TO_LEFT; else if( ignoreDate ) task = TT_DIFFERS; else if( leftDate > rightDate ) task = TT_COPY_TO_RIGHT; else if( leftDate < rightDate ) task = TT_COPY_TO_LEFT; else task = TT_DIFFERS; /* TODO TODO TODO TODO */ } return addItem( parent, file_name, dir, true, true, leftSize, rightSize, leftDate, rightDate, task, isDir ); } void Synchronizer::addSingleDirectory( SynchronizerFileItem *parent, QString name, QString dir , time_t date, bool isLeft ) { QString baseDir = (isLeft ? leftBaseDir : rightBaseDir ); QString dirName = dir.isEmpty() ? name : dir+"/"+name; vfs * directory = getDirectory( baseDir+ dirName ); vfile * file; QString file_name; if( directory == 0 ) return; if( isLeft ) parent = addLeftOnlyItem( parent, name, dir, 0, date, true ); else parent = addRightOnlyItem( parent, name, dir, 0, date, true ); /* walking through the directory files */ for( file=directory->vfs_getFirstFile(); file != 0 ; file = directory->vfs_getNextFile() ) { if ( file->vfile_isDir() || file->vfile_isSymLink() ) continue; file_name = file->vfile_getName(); if( !checkName( file_name ) ) continue; if( isLeft ) addLeftOnlyItem( parent, file_name, dirName, file->vfile_getSize(), file->vfile_getTime_t() ); else addRightOnlyItem( parent, file_name, dirName, file->vfile_getSize(), file->vfile_getTime_t() ); } /* walking through the subdirectories */ for( file=directory->vfs_getFirstFile(); file != 0 ; file=directory->vfs_getNextFile() ) { if ( file->vfile_isDir() && (followSymLinks || !file->vfile_isSymLink()) ) { file_name = file->vfile_getName(); addSingleDirectory( parent, file_name, dirName, file->vfile_getTime_t(), isLeft ); } } delete directory; } bool Synchronizer::checkName( QString name ) { return QRegExp(fileFilter,true,true).exactMatch( name ); } void Synchronizer::setMarkFlags( bool left, bool equal, bool differs, bool right, bool dup, bool sing, bool del ) { markEquals = equal; markDiffers = differs; markCopyToLeft = left; markCopyToRight = right; markDeletable = del; markDuplicates = dup; markSingles = sing; } bool Synchronizer::isMarked( TaskType task, bool isDuplicate ) { if( (isDuplicate && !markDuplicates) || (!isDuplicate && !markSingles) ) return false; switch( task ) { case TT_EQUALS: return markEquals; case TT_DIFFERS: return markDiffers; case TT_COPY_TO_LEFT: return markCopyToLeft; case TT_COPY_TO_RIGHT: return markCopyToRight; case TT_DELETE: return markDeletable; } return false; } void Synchronizer::markParentDirectories( SynchronizerFileItem *item ) { if( item->parent() == 0 || item->parent()->isMarked() ) return; markParentDirectories( item->parent() ); item->parent()->setMarked( true ); emit comparedFileData( item->parent() ); } void Synchronizer::refresh() { int step = 0; SynchronizerFileItem *item = resultList.first(); while( item ) { bool marked = isMarked( item->task(), item->existsInLeft() && item->existsInRight() ); item->setMarked( marked ); if( marked ) { markParentDirectories( item ); emit comparedFileData( item ); } if( step++ % DISPLAY_UPDATE_PERIOD == (DISPLAY_UPDATE_PERIOD-1) ) qApp->processEvents(); item = resultList.next(); } } bool Synchronizer::totalSizes( int * leftCopyNr, KIO::filesize_t *leftCopySize, int * rightCopyNr, KIO::filesize_t *rightCopySize, int *deleteNr, KIO::filesize_t *deletableSize ) { bool hasAnythingToDo = false; *leftCopySize = *rightCopySize = *deletableSize = 0; *leftCopyNr = *rightCopyNr = *deleteNr = 0; SynchronizerFileItem *item = resultList.first(); while( item ) { if( item->isMarked() ) { switch( item->task() ) { case TT_COPY_TO_LEFT: *leftCopySize += item->rightSize(); (*leftCopyNr)++; hasAnythingToDo = true; break; case TT_COPY_TO_RIGHT: *rightCopySize += item->leftSize(); (*rightCopyNr)++; hasAnythingToDo = true; break; case TT_DELETE: *deletableSize += item->leftSize(); (*deleteNr)++; hasAnythingToDo = true; break; default: break; } } item = resultList.next(); } return hasAnythingToDo; } void Synchronizer::synchronize( bool leftCopyEnabled, bool rightCopyEnabled, bool deleteEnabled, bool overWrite ) { this->leftCopyEnabled = leftCopyEnabled; this->rightCopyEnabled = rightCopyEnabled; this->deleteEnabled = deleteEnabled; this->overWrite = overWrite; autoSkip = paused = false; leftCopyNr = rightCopyNr = deleteNr = 0; leftCopySize = rightCopySize = deleteSize = 0; currentTask = resultList.first(); executeTask(); } void Synchronizer::executeTask() { TaskType task; do { if( currentTask == 0 ) { emit synchronizationFinished(); return; } if( currentTask->isMarked() ) { task = currentTask->task(); if( leftCopyEnabled && task == TT_COPY_TO_LEFT ) break; else if( rightCopyEnabled && task == TT_COPY_TO_RIGHT ) break; else if( deleteEnabled && task == TT_DELETE ) break; } currentTask = resultList.next(); }while( true ); QString dirName = currentTask->directory(); if( !dirName.isEmpty() ) dirName += "/"; leftURL = fromPathOrURL( leftBaseDir + dirName + currentTask->name() ); rightURL = fromPathOrURL( rightBaseDir + dirName + currentTask->name() ); switch( task ) { case TT_COPY_TO_LEFT: if( currentTask->isDir() ) { KIO::SimpleJob *job = KIO::mkdir( leftURL ); connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(slotTaskFinished(KIO::Job*))); } else { KURL destURL( leftURL ); if( !currentTask->destination().isNull() ) destURL = fromPathOrURL( currentTask->destination() ); KIO::FileCopyJob *job = KIO::file_copy(rightURL, destURL, -1, overWrite || currentTask->overWrite(), false, false ); connect(job,SIGNAL(processedSize (KIO::Job *, KIO::filesize_t )), this, SLOT (slotProcessedSize (KIO::Job *, KIO::filesize_t ))); connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(slotTaskFinished(KIO::Job*))); } break; case TT_COPY_TO_RIGHT: if( currentTask->isDir() ) { KIO::SimpleJob *job = KIO::mkdir( rightURL ); connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(slotTaskFinished(KIO::Job*))); } else { KURL destURL( rightURL ); if( !currentTask->destination().isNull() ) destURL = fromPathOrURL( currentTask->destination() ); KIO::FileCopyJob *job = KIO::file_copy(leftURL, destURL, -1, overWrite || currentTask->overWrite(), false, false ); connect(job,SIGNAL(processedSize (KIO::Job *, KIO::filesize_t )), this, SLOT (slotProcessedSize (KIO::Job *, KIO::filesize_t ))); connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(slotTaskFinished(KIO::Job*))); } break; case TT_DELETE: { KIO::DeleteJob *job = KIO::del( leftURL, false ); connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(slotTaskFinished(KIO::Job*))); } break; default: break; } } void Synchronizer::slotTaskFinished(KIO::Job *job ) { do { if( job->error() ) { if( job->error() == KIO::ERR_FILE_ALREADY_EXIST && currentTask->task() != TT_DELETE ) { KIO::RenameDlg_Result result; QString newDest; if( autoSkip ) break; if ( currentTask->task() == TT_COPY_TO_LEFT ) { result = Observer::self()->open_RenameDlg ( job, i18n("File Already Exists"), rightURL.path(), leftURL.path(), (KIO::RenameDlg_Mode)( KIO::M_OVERWRITE | KIO::M_SKIP | KIO::M_MULTI ), newDest, currentTask->rightSize(), currentTask->leftSize(), (time_t)-1, (time_t)-1, currentTask->rightDate(), currentTask->leftDate()); } else { result = Observer::self()->open_RenameDlg ( job, i18n("File Already Exists"), leftURL.path(), rightURL.path(), (KIO::RenameDlg_Mode)( KIO::M_OVERWRITE | KIO::M_SKIP | KIO::M_MULTI ), newDest, currentTask->leftSize(), currentTask->rightSize(), (time_t)-1, (time_t)-1, currentTask->leftDate(), currentTask->rightDate()); } switch ( result ) { case KIO::R_RENAME: currentTask->setDestination( newDest ); executeTask(); return; case KIO::R_OVERWRITE: currentTask->setOverWrite(); executeTask(); return; case KIO::R_OVERWRITE_ALL: overWrite = true; executeTask(); return; case KIO::R_AUTO_SKIP: autoSkip = true; case KIO::R_SKIP: default: break; } break; } if( job->error() != KIO::ERR_DOES_NOT_EXIST || currentTask->task() != TT_DELETE ) { if( autoSkip ) break; QString error; switch( currentTask->task() ) { case TT_COPY_TO_LEFT: error = i18n("Error at copying file %1 to %2!").arg( rightURL.path() ).arg( leftURL.path() ); break; case TT_COPY_TO_RIGHT: error = i18n("Error at copying file %1 to %2!").arg( leftURL.path() ).arg( rightURL.path() ); break; case TT_DELETE: error = i18n("Error at deleting file %1!").arg( leftURL.url() ); break; default: break; } KIO::SkipDlg_Result result = Observer::self()->open_SkipDlg( job, true, error ); switch( result ) { case KIO::S_CANCEL: executeTask(); /* simply retry */ return; case KIO::S_AUTO_SKIP: autoSkip = true; default: break; } } } }while( false ); switch( currentTask->task() ) { case TT_COPY_TO_LEFT: leftCopyNr++; leftCopySize += currentTask->rightSize(); break; case TT_COPY_TO_RIGHT: rightCopyNr++; rightCopySize += currentTask->leftSize(); break; case TT_DELETE: deleteNr++; deleteSize += currentTask->leftSize(); break; default: break; } emit processedSizes( leftCopyNr, leftCopySize, rightCopyNr, rightCopySize, deleteNr, deleteSize ); currentTask = resultList.next(); if( paused ) emit pauseAccepted(); else executeTask(); } void Synchronizer::slotProcessedSize( KIO::Job * , KIO::filesize_t size) { KIO::filesize_t dl = 0, dr = 0, dd = 0; switch( currentTask->task() ) { case TT_COPY_TO_LEFT: dl = size; break; case TT_COPY_TO_RIGHT: dr = size; break; case TT_DELETE: dd = size; break; default: break; } emit processedSizes( leftCopyNr, leftCopySize+dl, rightCopyNr, rightCopySize+dr, deleteNr, deleteSize+dd ); } void Synchronizer::pause() { paused = true; } void Synchronizer::resume() { paused = false; executeTask(); } KURL Synchronizer::fromPathOrURL( QString origin ) { QString password, loginName; // breakdown the url; /* FIXME: untill KDE fixes the bug we have to check for passwords and users with @ in them... */ bool bugfix = origin.find("@") != origin.findRev("@"); if(bugfix){ if(origin.find(":") != origin.findRev(":")){ int passStart = origin.find( ":",origin.find(":")+1 )+1; int passLen = origin.findRev("@")-passStart; password = origin.mid(passStart,passLen); origin = origin.remove(passStart-1,passLen+1); } if(origin.find("@") != origin.findRev("@")){ int usrStart = origin.find( "/" )+1; if(origin.at(usrStart) == '/') ++usrStart; int usrLen = origin.findRev("@")-usrStart; loginName = origin.mid(usrStart,usrLen); origin = origin.remove(usrStart,usrLen+1); } } KURL url = origin; if(loginName.isEmpty()) loginName = url.user(); if(password.isEmpty()) password = url.pass(); if(bugfix){ url.setPass(password); url.setUser(loginName); } return url; } --- NEW FILE: synchronizer.h --- /*************************************************************************** synchronizer.h - description ------------------- copyright : (C) 2003 by Csaba Karai e-mail : kru...@us... web site : http://krusader.sourceforge.net --------------------------------------------------------------------------- Description *************************************************************************** A db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD H e a d e r F i l e *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef __SYNCHRONIZER_H__ #define __SYNCHRONIZER_H__ #include "../VFS/vfs.h" #include <qobject.h> #include <qptrvector.h> typedef enum { TT_EQUALS = 0, // the files are equals -> do nothing TT_DIFFERS = 1, // the files are differents -> don't know what to do TT_COPY_TO_LEFT = 2, // the right file is newer -> copy from right to left TT_COPY_TO_RIGHT = 3, // the left file is newer -> copy from left to right TT_DELETE = 4 // the left file is single -> delete it } TaskType; class SynchronizerFileItem { private: QString m_name; // the file name QString m_directory; // the relative directory path from the base bool m_marked; // flag, indicates to show the file bool m_existsLeft; // flag, the file exists in the left directory bool m_existsRight; // flag, the file exists in the right directory KIO::filesize_t m_leftSize; // the file size at the left directory KIO::filesize_t m_rightSize; // the file size at the right directory time_t m_leftDate; // the file date at the left directory time_t m_rightDate; // the file date at the left directory TaskType m_task; // the task with the file bool m_isDir; // flag, indicates that the file is a directory SynchronizerFileItem *m_parent; // pointer to the parent directory item or 0 void *m_userData; // user data bool m_overWrite; // overwrite flag QString m_destination; // the destination URL at rename public: SynchronizerFileItem(QString nam, QString dir, bool mark, bool exL, bool exR, KIO::filesize_t leftSize, KIO::filesize_t rightSize, time_t leftDate, time_t rightDate, TaskType tsk, bool isDir, SynchronizerFileItem *parent ) : m_name( nam ), m_directory( dir ), m_marked( mark ), m_existsLeft( exL ), m_existsRight( exR ), m_leftSize( leftSize ), m_rightSize( rightSize ), m_leftDate( leftDate ), m_rightDate( rightDate ),m_task( tsk ), m_isDir( isDir ), m_parent(parent), m_userData( 0 ), m_overWrite( false ), m_destination( QString::null ) {} inline bool isMarked() {return m_marked;} inline void setMarked( bool flag ) {m_marked = flag;} inline QString name() {return m_name;} inline QString directory() {return m_directory;} inline bool existsInLeft() {return m_existsLeft;} inline bool existsInRight() {return m_existsRight;} inline bool overWrite() {return m_overWrite;} inline KIO::filesize_t leftSize() {return m_leftSize;} inline KIO::filesize_t rightSize() {return m_rightSize;} inline time_t leftDate() {return m_leftDate;} inline time_t rightDate() {return m_rightDate;} inline TaskType task() {return m_task;} inline bool isDir() {return m_isDir;} inline SynchronizerFileItem * parent() {return m_parent;} inline void * userData() {return m_userData;} inline void setUserData( void *ud) {m_userData = ud;} inline void setOverWrite() {m_overWrite = true;} inline QString destination() {return m_destination;} inline void setDestination(QString d) {m_destination = d;} }; class Synchronizer : public QObject { Q_OBJECT private: int displayUpdateCount; // the display is refreshed after every x-th change public: Synchronizer(); void compare( QString leftURL, QString rightURL, QString filter, bool subDirs, bool symLinks, bool igDate, bool asymm ); void stop() {stopped = true;} void setMarkFlags( bool left, bool equal, bool differs, bool right, bool dup, bool sing, bool del ); void refresh(); bool totalSizes( int *, KIO::filesize_t *, int *, KIO::filesize_t *, int *, KIO::filesize_t * ); void synchronize( bool leftCopyEnabled, bool rightCopyEnabled, bool deleteEnabled, bool overWrite ); void pause(); void resume(); static QString getTaskTypeName( TaskType taskType ); signals: void comparedFileData( SynchronizerFileItem * ); void synchronizationFinished(); void processedSizes( int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t ); void pauseAccepted(); public slots: void slotTaskFinished(KIO::Job*); void slotProcessedSize( KIO::Job * , KIO::filesize_t ); private: vfs * getDirectory( QString urlIn ); void compareDirectory( SynchronizerFileItem *,QString leftURL, QString rightURL, QString dir, QString addName=QString::null, QString addDir=QString::null, time_t addLTime=0, time_t addRTime=0 ); void addSingleDirectory( SynchronizerFileItem *, QString, QString, time_t, bool ); SynchronizerFileItem * addItem( SynchronizerFileItem *, QString, QString, bool, bool, KIO::filesize_t, KIO::filesize_t, time_t, time_t, TaskType, bool); SynchronizerFileItem * addLeftOnlyItem( SynchronizerFileItem *, QString, QString, KIO::filesize_t, time_t, bool isDir = false ); SynchronizerFileItem * addRightOnlyItem( SynchronizerFileItem *, QString, QString, KIO::filesize_t, time_t, bool isDir = false ); SynchronizerFileItem * addDuplicateItem( SynchronizerFileItem *, QString, QString, KIO::filesize_t, KIO::filesize_t, time_t, time_t, bool isDir = false ); bool checkName( QString name ); bool isMarked( TaskType task, bool dupl ); void markParentDirectories( SynchronizerFileItem * ); void executeTask(); KURL fromPathOrURL( QString url ); protected: bool recurseSubDirs; // walk through subdirectories also bool followSymLinks; // follow the symbolic links bool ignoreDate; // don't use date info at comparing bool asymmetric; // asymmetric directory update QPtrList<SynchronizerFileItem> resultList; // the found files QString leftBaseDir; // the left-side base directory QString rightBaseDir; // the right-side base directory QString fileFilter; // the file selection filter bool stopped; // 'Stop' button was pressed bool markEquals; // show the equal files bool markDiffers; // show the different files bool markCopyToLeft; // show the files to copy from right to left bool markCopyToRight;// show the files to copy from left to right bool markDeletable; // show the files to be deleted bool markDuplicates; // show the duplicated items bool markSingles; // show the single items bool leftCopyEnabled;// copy to left is enabled at synchronize bool rightCopyEnabled;// copy to right is enabled at synchronize bool deleteEnabled; // delete is enabled at synchronize bool overWrite; // overwrite or query each modification bool autoSkip; // automatic skipping bool paused; // pause flag int leftCopyNr; // the file number copied to left int rightCopyNr; // the file number copied to right int deleteNr; // the number of the deleted files KIO::filesize_t leftCopySize; // the total size copied to left KIO::filesize_t rightCopySize; // the total size copied to right KIO::filesize_t deleteSize; // the size of the deleted files SynchronizerFileItem * currentTask; // the current task to process private: KURL leftURL; // the currently processed URL (left) KURL rightURL; // the currently processed URL (right) }; #endif /* __SYNCHRONIZER_H__ */ --- NEW FILE: synchronizergui.cpp --- /*************************************************************************** synchronizergui.cpp - description ------------------- copyright : (C) 2003 by Csaba Karai e-mail : kru...@us... web site : http://krusader.sourceforge.net --------------------------------------------------------------------------- Description *************************************************************************** A db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD [...1187 lines suppressed...] KIO::filesize_t copyToLeftSize, copyToRightSize, deleteSize; if( !synchronizer.totalSizes( ©ToLeftNr, ©ToLeftSize, ©ToRightNr, ©ToRightSize, &deleteNr, &deleteSize ) ) { KMessageBox::sorry(0, i18n("The directories are identical!")); return; } SynchronizeDialog *sd = new SynchronizeDialog( this, "SychDialog", true, 0, &synchronizer, copyToLeftNr, copyToLeftSize, copyToRightNr, copyToRightSize, deleteNr, deleteSize ); bool syncStarted = sd->wasSyncronizationStarted(); delete sd; if( syncStarted ) closeDialog(); } --- NEW FILE: synchronizergui.h --- /*************************************************************************** synchronizergui.h - description ------------------- copyright : (C) 2003 by Csaba Karai e-mail : kru...@us... web site : http://krusader.sourceforge.net --------------------------------------------------------------------------- Description *************************************************************************** A db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD H e a d e r F i l e *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef __SYNCHRONIZERGUI_H__ #define __SYNCHRONIZERGUI_H__ #include "synchronizer.h" #include <qdialog.h> #include <qlistview.h> #include <kcombobox.h> #include <qpixmap.h> #include <qcheckbox.h> #include <qmap.h> class SynchronizerGUI : QDialog { Q_OBJECT public: class SyncViewItem : public QListViewItem { private: SynchronizerFileItem *syncItemRef; SyncViewItem *lastItemRef; public: SyncViewItem( SynchronizerFileItem *item, QListView * parent, QListViewItem *after, QString label1, QString label2 = QString::null, QString label3 = QString::null, QString label4 = QString::null, QString label5 = QString::null, QString label6 = QString::null, QString label7 = QString::null, QString label8 = QString::null ) : QListViewItem( parent, after, label1, label2, label3, label4, label5, label6, label7, label8 ), syncItemRef( item ), lastItemRef( 0 ) { item->setUserData( (void *)this ); } SyncViewItem( SynchronizerFileItem *item, QListViewItem * parent, QListViewItem *after, QString label1, QString label2 = QString::null, QString label3 = QString::null, QString label4 = QString::null, QString label5 = QString::null, QString label6 = QString::null, QString label7 = QString::null, QString label8 = QString::null ) : QListViewItem( parent, after, label1, label2, label3, label4, label5, label6, label7, label8 ), syncItemRef( item ), lastItemRef( 0 ) { item->setUserData( (void *)this ); } ~SyncViewItem() { syncItemRef->setUserData( 0 ); } inline SynchronizerFileItem * synchronizerItemRef() {return syncItemRef;} inline SyncViewItem * lastItem() {return lastItemRef;} inline void setLastItem(SyncViewItem*s) {lastItemRef = s;} }; public: SynchronizerGUI(QWidget* parent, QString leftDirectory, QString rightDirectory ); ~SynchronizerGUI(); public slots: void rightMouseClicked(QListViewItem *); void compare(); void synchronize(); void stop(); void closeDialog(); void refresh(); void subdirsChecked( bool ); protected slots: void reject(); void addFile( SynchronizerFileItem * ); private: QString convertTime(time_t time) const; void setMarkFlags(); protected: KHistoryCombo *leftLocation; KHistoryCombo *rightLocation; KHistoryCombo *fileFilter; QListView *syncList; Synchronizer synchronizer; QCheckBox *cbSubdirs; QCheckBox *cbSymlinks; QCheckBox *cbByContent; QCheckBox *cbIgnoreDate; QCheckBox *cbAsymmetric; QPushButton *btnCompareDirs; QPushButton *btnStopComparing; QPushButton *btnSynchronize; QPushButton *btnLeftToRight; QPushButton *btnEquals; QPushButton *btnDifferents; QPushButton *btnRightToLeft; QPushButton *btnDeletable; QPushButton *btnDuplicates; QPushButton *btnSingles; private: QPixmap fileIcon; QPixmap folderIcon; bool isComparing; bool wasClosed; SyncViewItem *lastItem; }; #endif /* __SYNCHRONIZERGUI_H__ */ |
From: <ck...@us...> - 2003-12-11 14:00:28
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Synchronizer In directory sc8-pr-cvs1:/tmp/cvs-serv4510/Synchronizer Log Message: Directory /cvsroot/krusader/krusader_kde3/krusader/Synchronizer added to the repository |
From: <ya...@us...> - 2003-12-10 20:37:49
|
Update of /cvsroot/krusader/krusader_kde3/krusader/VFS In directory sc8-pr-cvs1:/tmp/cvs-serv24743/krusader/VFS Added Files: krvfshandler.cpp krvfshandler.h virt_vfs.cpp virt_vfs.h Log Message: --- NEW FILE: krvfshandler.cpp --- /*************************************************************************** krvfshandler.cpp - description ------------------- begin : Fri Dec 5 2003 copyright : (C) 2003 by Shie Erlich & Rafi Yanai email : ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "krvfshandler.h" KrVfsHandler::KrVfsHandler(){ } KrVfsHandler::~KrVfsHandler(){ } vfs::VFS_TYPE KrVfsHandler::getVfsType(const KURL& url){ if(url.isLocalFile() ) return vfs::NORMAL; else{ if(url.protocol() == "virt") return vfs::VIRT; else return vfs::FTP; } return vfs::ERROR; } vfs* KrVfsHandler::getVfs(const KURL& url,vfs* oldVfs){ vfs::VFS_TYPE newType,oldType = vfs::ERROR; if(oldVfs) oldType = oldVfs->vfs_getType(); return 0; } --- NEW FILE: krvfshandler.h --- /*************************************************************************** krvfshandler.h - description ------------------- begin : Fri Dec 5 2003 copyright : (C) 2003 by Shie Erlich & Rafi Yanai email : ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef KRVFSHANDLER_H #define KRVFSHANDLER_H #include <qobject.h> #include <kurl.h> #include "vfs.h" /** *@author Shie Erlich & Rafi Yanai */ class KrVfsHandler : public QObject { public: KrVfsHandler(); ~KrVfsHandler(); static vfs::VFS_TYPE getVfsType(const KURL& url); static vfs* getVfs(const KURL& url,vfs* oldVfs); }; #endif --- NEW FILE: virt_vfs.cpp --- /*************************************************************************** virt_vfs.cpp - description ------------------- begin : Fri Dec 5 2003 copyright : (C) 2003 by Shie Erlich & Rafi Yanai email : ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "virt_vfs.h" virt_vfs::virt_vfs(QObject* panel, bool quiet): vfs(panel,quiet){ } virt_vfs::~virt_vfs(){ } --- NEW FILE: virt_vfs.h --- /*************************************************************************** virt_vfs.h - description ------------------- begin : Fri Dec 5 2003 copyright : (C) 2003 by Shie Erlich & Rafi Yanai email : ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef VIRT_VFS_H #define VIRT_VFS_H #include <vfs.h> /** *@author Shie Erlich & Rafi Yanai */ class virt_vfs : public vfs { public: virt_vfs(QObject* panel, bool quiet=false); ~virt_vfs(); }; #endif |
From: <ya...@us...> - 2003-12-09 23:06:01
|
Update of /cvsroot/krusader/krusader_kde3/krusader/VFS In directory sc8-pr-cvs1:/tmp/cvs-serv10473/krusader/VFS Modified Files: Makefile.am arc_vfs.cpp ftp_vfs.cpp ftp_vfs.h normal_vfs.cpp normal_vfs.h temp_vfs.cpp temp_vfs.h vfile.h vfs.cpp vfs.h Log Message: moving from QString to KURL and code clean up Index: Makefile.am =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 14 Nov 2002 19:06:03 -0000 1.2 --- Makefile.am 9 Dec 2003 23:05:58 -0000 1.3 *************** *** 6,13 **** libVFS_a_METASOURCES = AUTO ! libVFS_a_SOURCES = vfs.cpp vfile.cpp temp_vfs.cpp normal_vfs.cpp krpermhandler.cpp krdirwatch.cpp krarchandler.cpp ftp_vfs.cpp arc_vfs.cpp ! EXTRA_DIST = arc_vfs.cpp arc_vfs.h ftp_vfs.cpp ftp_vfs.h krarchandler.cpp krarchandler.h krdirwatch.cpp krdirwatch.h krpermhandler.cpp krpermhandler.h normal_vfs.cpp normal_vfs.h temp_vfs.cpp temp_vfs.h vfile.cpp vfile.h vfs.cpp vfs.h ####### kdevelop will overwrite this part!!! (end)############ --- 6,13 ---- libVFS_a_METASOURCES = AUTO ! libVFS_a_SOURCES = krvfshandler.cpp virt_vfs.cpp vfs.cpp vfile.cpp temp_vfs.cpp normal_vfs.cpp krpermhandler.cpp krdirwatch.cpp krarchandler.cpp ftp_vfs.cpp ! EXTRA_DIST = ftp_vfs.cpp ftp_vfs.h krarchandler.cpp krarchandler.h krdirwatch.cpp krdirwatch.h krpermhandler.cpp krpermhandler.h normal_vfs.cpp normal_vfs.h temp_vfs.cpp temp_vfs.h vfile.cpp vfile.h vfs.cpp vfs.h virt_vfs.cpp virt_vfs.h krvfshandler.cpp krvfshandler.h ####### kdevelop will overwrite this part!!! (end)############ Index: arc_vfs.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/arc_vfs.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** arc_vfs.cpp 20 Sep 2003 13:46:37 -0000 1.13 --- arc_vfs.cpp 9 Dec 2003 23:05:58 -0000 1.14 *************** *** 72,76 **** isWritable = ( write && isWritable ); ! vfs_type = type; // create the temp dir.. --- 72,76 ---- isWritable = ( write && isWritable ); ! vfs_type = vfs::ERROR; // create the temp dir.. Index: ftp_vfs.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/ftp_vfs.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ftp_vfs.cpp 29 Nov 2003 17:00:50 -0000 1.21 --- ftp_vfs.cpp 9 Dec 2003 23:05:58 -0000 1.22 *************** *** 58,62 **** } ! ftp_vfs::ftp_vfs(QString origin,QWidget* panel):vfs(panel),busy(false){ // set the writable attribute isWritable = true; --- 58,62 ---- } ! ftp_vfs::ftp_vfs(const KURL& origin,QWidget* panel):vfs(panel),busy(false){ // set the writable attribute isWritable = true; *************** *** 68,75 **** notConnected = true; ! KURL url = separateUserAndPassword( origin ); ! vfs_type = "ftp"; ! vfs_origin = url.prettyURL(); vfs_refresh(vfs_origin); --- 68,75 ---- notConnected = true; ! KURL url = separateUserAndPassword( origin.url() ); ! vfs_type = FTP; ! vfs_origin = url; vfs_refresh(vfs_origin); *************** *** 111,118 **** void ftp_vfs::slotAddFiles(KIO::Job *, const KIO::UDSEntryList& entries){ // remove trailing "/" ! if(vfs_origin.right(1) == "/" ) vfs_origin = vfs_origin.left(vfs_origin.length()-1); // but don't turn ftp://server/ to ftp://server ! ! if(vfs_origin.find("/",vfs_origin.find(":/")+3) < 0 ) ! vfs_origin = vfs_origin+"/"; KIO::UDSEntryListConstIterator it = entries.begin(); --- 111,118 ---- void ftp_vfs::slotAddFiles(KIO::Job *, const KIO::UDSEntryList& entries){ // remove trailing "/" ! //if(vfs_origin.right(1) == "/" ) vfs_origin = vfs_origin.left(vfs_origin.length()-1); // but don't turn ftp://server/ to ftp://server ! ! //if(vfs_origin.find("/",vfs_origin.find(":/")+3) < 0 ) ! // vfs_origin = vfs_origin+"/"; KIO::UDSEntryListConstIterator it = entries.begin(); *************** *** 121,125 **** // as long as u can find files - add them to the vfs for ( ; it != end; ++it ){ ! KFileItem kfi(*it,vfs_url,false,true); vfile *temp; --- 121,125 ---- // as long as u can find files - add them to the vfs for ( ; it != end; ++it ){ ! KFileItem kfi(*it,vfs_origin,false,true); vfile *temp; *************** *** 143,147 **** else temp=new vfile(name,size,perm,mtime,symLink,kfi.user(),kfi.group(),mime,symDest,mode); ! vfs_addToList(temp); } } --- 143,147 ---- else temp=new vfile(name,size,perm,mtime,symLink,kfi.user(),kfi.group(),mime,symDest,mode); ! addToList(temp); } } *************** *** 149,153 **** void ftp_vfs::slotRedirection(KIO::Job *, const KURL &url){ // update the origin ! vfs_url = url; vfs_origin = KURL::decode_string(url.prettyURL()); password = url.pass(); --- 149,153 ---- void ftp_vfs::slotRedirection(KIO::Job *, const KURL &url){ // update the origin ! vfs_origin = url; vfs_origin = KURL::decode_string(url.prettyURL()); password = url.pass(); *************** *** 158,162 **** void ftp_vfs::slotListResult(KIO::Job *job){ if( job && job->error()){ ! QString msg= KIO::buildErrorString(job->error(),vfs_origin); if ( !msg.isEmpty() && !quietMode ) KMessageBox::sorry(krApp,msg); --- 158,162 ---- void ftp_vfs::slotListResult(KIO::Job *job){ if( job && job->error()){ ! QString msg= KIO::buildErrorString(job->error(),vfs_origin.prettyURL()); if ( !msg.isEmpty() && !quietMode ) KMessageBox::sorry(krApp,msg); *************** *** 168,172 **** kr_swap(vfs_filesP2,vfs_filesP); vfs_origin=origin_backup; - vfs_url = vfs_url_backup; } busy = false; --- 168,171 ---- *************** *** 184,190 **** } ! bool ftp_vfs::vfs_refresh(QString origin) { error = false; ! KURL url = separateUserAndPassword( origin ); QString errorMsg = QString::null; --- 183,189 ---- } ! bool ftp_vfs::vfs_refresh(const KURL& origin) { error = false; ! KURL url = separateUserAndPassword( origin.url() ); QString errorMsg = QString::null; *************** *** 210,215 **** origin_backup = vfs_origin; vfs_origin = origin; ! vfs_url_backup = vfs_url; ! vfs_url = url; // Open the directory marked by origin --- 209,213 ---- origin_backup = vfs_origin; vfs_origin = origin; ! vfs_origin = url; // Open the directory marked by origin *************** *** 232,236 **** // copy a file to the vfs (physical) void ftp_vfs::vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify,QString dir){ ! KURL destUrl = vfs_url; if(dir != "") destUrl.addPath(dir); --- 230,234 ---- // copy a file to the vfs (physical) void ftp_vfs::vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify,QString dir){ ! KURL destUrl = vfs_origin; if(dir != "") destUrl.addPath(dir); *************** *** 254,258 **** for(uint i=0 ; i<fileNames->count(); ++i){ QString filename = (*fileNames)[i]; ! url = vfs_url; url.addPath(filename); url.setUser(loginName); --- 252,256 ---- for(uint i=0 ; i<fileNames->count(); ++i){ QString filename = (*fileNames)[i]; ! url = vfs_origin; url.addPath(filename); url.setUser(loginName); *************** *** 281,286 **** // return a path to the file ! QString ftp_vfs::vfs_getFile(QString name){ ! KURL url = vfs_url; url.addPath(name); --- 279,284 ---- // return a path to the file ! KURL ftp_vfs::vfs_getFile(const QString& name){ ! KURL url = vfs_origin; url.addPath(name); *************** *** 290,298 **** if ( port ) url.setPort(port); ! return url.url(); } ! void ftp_vfs::vfs_mkdir(QString name){ ! KURL url = vfs_url; url.addPath(name); url.setUser(loginName); --- 288,296 ---- if ( port ) url.setPort(port); ! return url; } ! void ftp_vfs::vfs_mkdir(const QString& name){ ! KURL url = vfs_origin; url.addPath(name); url.setUser(loginName); *************** *** 305,311 **** ! void ftp_vfs::vfs_rename(QString fileName,QString newName){ KURL::List fileUrls; ! KURL url = vfs_url; url.addPath(fileName) ; url.setUser(loginName); --- 303,309 ---- ! void ftp_vfs::vfs_rename(const QString& fileName,const QString& newName){ KURL::List fileUrls; ! KURL url = vfs_origin; url.addPath(fileName) ; url.setUser(loginName); *************** *** 314,318 **** fileUrls.append(url); ! KURL dest = vfs_url; dest.addPath(newName); dest.setUser(loginName); --- 312,316 ---- fileUrls.append(url); ! KURL dest = vfs_origin; dest.addPath(newName); dest.setUser(loginName); *************** *** 325,329 **** QString ftp_vfs::vfs_workingDir(){ ! QString ret = vfs_origin; if ( !password.isEmpty() ) ret.replace(QRegExp("@"),":"+password+"@"); return ret; --- 323,327 ---- QString ftp_vfs::vfs_workingDir(){ ! QString ret = vfs_origin.prettyURL(); if ( !password.isEmpty() ) ret.replace(QRegExp("@"),":"+password+"@"); return ret; Index: ftp_vfs.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/ftp_vfs.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ftp_vfs.h 29 Nov 2003 17:00:51 -0000 1.7 --- ftp_vfs.h 9 Dec 2003 23:05:58 -0000 1.8 *************** *** 42,81 **** public: // the constructor simply uses the inherited constructor ! ftp_vfs(QString origin,QWidget* panel); ~ftp_vfs(){} - - // copy a file to the vfs (physical) - void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify,QString dir = ""); - // remove a file from the vfs (physical) - void vfs_delFiles(QStringList *fileNames); - // return a path to the file - QString vfs_getFile(QString name); - KURL::List* vfs_getFiles(QStringList* names); - // make dir - void vfs_mkdir(QString name); - // rename file - void vfs_rename(QString fileName,QString newName); - QString vfs_workingDir(); - // not implemented for ftp ! - void vfs_calcSpace(QString ,KIO::filesize_t *,unsigned long *,unsigned long *,bool*){} inline bool isBusy(){ return busy; } public slots: ! // recieve KDirLister job. void slotAddFiles(KIO::Job * job, const KIO::UDSEntryList& entries); ! void slotRedirection(KIO::Job *, const KURL &url); ! void slotListResult(KIO::Job *job); ! // actually reads files and stats ! bool vfs_refresh(QString origin); protected: ! QList<vfile> vfs_files; // list of pointers to vfile ! QList<vfile> vfs_files2; // list of pointers to vfile ! QList<vfile> *vfs_filesP2; ! QString origin_backup; ! ! KURL vfs_url; ! KURL vfs_url_backup; bool notConnected; --- 42,84 ---- public: // the constructor simply uses the inherited constructor ! ftp_vfs(const KURL& origin,QWidget* panel); ~ftp_vfs(){} + /// Copy a file to the vfs (physical). + virtual void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify,QString dir = ""); + /// Remove a file from the vfs (physical) + virtual void vfs_delFiles(QStringList *fileNames); + /// Return a list of URLs for multiple files + virtual KURL::List* vfs_getFiles(QStringList* names); + /// Return a URL to a single file + virtual KURL vfs_getFile(const QString& name); + /// Create a new directory + virtual void vfs_mkdir(const QString& name); + /// Rename file + virtual void vfs_rename(const QString& fileName,const QString& newName); + /// Calculate the amount of space occupied by a file or directory (recursive). + /// Not implemted (yet) in ftp_vfs + virtual void vfs_calcSpace(QString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop = 0){}; + + /// Return the VFS working dir + QString vfs_workingDir(); + /// Return true while the VFS is refreshing itself inline bool isBusy(){ return busy; } public slots: ! /// Handles new files from the dir lister void slotAddFiles(KIO::Job * job, const KIO::UDSEntryList& entries); ! /// Redirection signal handler ! void slotRedirection(KIO::Job *, const KURL &url); ! /// Called when the dir listing job is finished (for better or worst) ! void slotListResult(KIO::Job *job); ! /// Active the dir listing job ! bool vfs_refresh(const KURL& origin); protected: ! QList<vfile> vfs_files; //< List of pointers to vfile. ! QList<vfile> vfs_files2; //< The second list of pointers to vfiles. ! QList<vfile> *vfs_filesP2; //< pointer to the second list ! KURL origin_backup; //< used to backup the old URL when refreshing to a new one, bool notConnected; Index: normal_vfs.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/normal_vfs.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** normal_vfs.cpp 20 Sep 2003 16:48:36 -0000 1.19 --- normal_vfs.cpp 9 Dec 2003 23:05:58 -0000 1.20 *************** *** 56,83 **** #include "../resources.h" ! normal_vfs::normal_vfs(QString,QWidget* panel):vfs(panel){ vfs_filesP = &vfs_files; vfs_files.setAutoDelete(true); ! vfs_type="normal"; ! ! // connect the watcher to vfs_refresh ! //connect(&watcher,SIGNAL(dirty(const QString&)),this,SLOT(vfs_refresh())); connect(&watcher,SIGNAL(dirty(const QString&)),this,SLOT(vfs_slotDirty())); } ! bool normal_vfs::vfs_refresh(QString origin){ // check that the new origin exists ! if ( !QDir(origin).exists() ) return false; krConfig->setGroup("Advanced"); ! if (krConfig->readBoolEntry("AutoMount",_AutoMount)) krMtMan.autoMount(origin); watcher.stopScan(); //stop watching the old dir ! if( origin != vfs_getOrigin() ){ ! watcher.removeDir(vfs_getOrigin()); // and remove it from the list ! watcher.addDir(origin/*,true*/); //start watching the new dir } - //watcher.clearList(); // set the writable attribute to true, if that's not the case - the KIO job --- 56,85 ---- #include "../resources.h" ! normal_vfs::normal_vfs(QString url,QWidget* panel):vfs(panel){ vfs_filesP = &vfs_files; vfs_files.setAutoDelete(true); + + vfs_origin = KURL::fromPathOrURL(url); + vfs_type=NORMAL; ! // connect the watcher to vfs_slotDirty connect(&watcher,SIGNAL(dirty(const QString&)),this,SLOT(vfs_slotDirty())); } ! bool normal_vfs::vfs_refresh(const KURL& origin){ ! QString path = origin.path(-1); ! // check that the new origin exists ! if ( !QDir(path).exists() ) return false; krConfig->setGroup("Advanced"); ! if (krConfig->readBoolEntry("AutoMount",_AutoMount)) krMtMan.autoMount(path); watcher.stopScan(); //stop watching the old dir ! if( !origin.equals(vfs_getOrigin()) ){ ! // and remove it from the list ! if( !vfs_getOrigin().isEmpty() ) watcher.removeDir(vfs_getOrigin().path(-1)); ! watcher.addDir(origin.path(-1)); //start watching the new dir } // set the writable attribute to true, if that's not the case - the KIO job *************** *** 91,112 **** // set the origin... ! if( vfs_type == "normal" ) vfs_origin = QDir::cleanDirPath(origin); // clear the the list vfs_files.clear(); ! DIR* dir = opendir(origin.local8Bit()); if(!dir) return false; ! // change directory to the new directory ! chdir(origin.local8Bit()); ! if (!quietMode) emit startUpdate(); ! struct dirent* dirEnt; QString name; KURL mimeUrl; - //int i = 0; char symDest[256]; KDE_struct_stat stat_p; while( (dirEnt=readdir(dir)) != NULL ){ name = QString::fromLocal8Bit(dirEnt->d_name); --- 93,116 ---- // set the origin... ! vfs_origin = origin; ! vfs_origin.cleanPath(); // clear the the list vfs_files.clear(); + ! DIR* dir = opendir(path.local8Bit()); if(!dir) return false; ! //change directory to the new directory ! chdir(path.local8Bit()); ! if (!quietMode) emit startUpdate(); ! struct dirent* dirEnt; QString name; KURL mimeUrl; char symDest[256]; KDE_struct_stat stat_p; + while( (dirEnt=readdir(dir)) != NULL ){ name = QString::fromLocal8Bit(dirEnt->d_name); *************** *** 141,145 **** vfile* temp=new vfile(name,size,perm,stat_p.st_mtime,symLink,stat_p.st_uid, stat_p.st_gid,mime,symDest,stat_p.st_mode); ! vfs_addToList(temp); } // clean up --- 145,149 ---- vfile* temp=new vfile(name,size,perm,stat_p.st_mtime,symLink,stat_p.st_uid, stat_p.st_gid,mime,symDest,stat_p.st_mode); ! addToList(temp); } // clean up *************** *** 196,222 **** // return a path to the file ! QString normal_vfs::vfs_getFile(QString name){ ! if ( vfs_workingDir() == "/" ) return ("/"+name); ! else return ( vfs_workingDir()+"/"+name); } KURL::List* normal_vfs::vfs_getFiles(QStringList* names){ - KURL url; KURL::List* urls = new KURL::List(); for(QStringList::Iterator name = names->begin(); name != names->end(); ++name){ ! url.setPath( vfs_getFile(*name) ); ! urls->append(url); } return urls; } ! void normal_vfs::vfs_mkdir(QString name){ if (!QDir(vfs_workingDir()).mkdir(name)) if (!quietMode) KMessageBox::sorry(krApp,i18n("Can't create a directory check your permissions.")); ! vfs_refresh(vfs_origin); } ! ! void normal_vfs::vfs_rename(QString fileName,QString newName){ KURL::List fileUrls; KURL url , dest; --- 200,226 ---- // return a path to the file ! KURL normal_vfs::vfs_getFile(const QString& name){ ! QString url; ! if ( vfs_workingDir() == "/" ) url = "/"+name; ! else url = vfs_workingDir()+"/"+name; ! ! return KURL::fromPathOrURL(url); } KURL::List* normal_vfs::vfs_getFiles(QStringList* names){ KURL::List* urls = new KURL::List(); for(QStringList::Iterator name = names->begin(); name != names->end(); ++name){ ! urls->append( vfs_getFile(*name) ); } return urls; } ! void normal_vfs::vfs_mkdir(const QString& name){ if (!QDir(vfs_workingDir()).mkdir(name)) if (!quietMode) KMessageBox::sorry(krApp,i18n("Can't create a directory check your permissions.")); ! vfs::vfs_refresh(); } ! void normal_vfs::vfs_rename(const QString& fileName,const QString& newName){ KURL::List fileUrls; KURL url , dest; Index: normal_vfs.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/normal_vfs.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** normal_vfs.h 19 Sep 2003 22:35:32 -0000 1.9 --- normal_vfs.h 9 Dec 2003 23:05:58 -0000 1.10 *************** *** 6,12 **** e-mail : kru...@us... web site : http://krusader.sourceforge.net ! --------------------------------------------------------------------------- ! A vfs class that handels "normal" directory enterys ! inherits: vfs *************************************************************************** --- 6,10 ---- e-mail : kru...@us... web site : http://krusader.sourceforge.net ! *************************************************************************** *************** *** 39,46 **** #include <kfileitem.h> #include <kdirwatch.h> // Krusader includes #include "vfs.h" - //#include "krdirwatch.h" class normal_vfs : public vfs{ Q_OBJECT --- 37,48 ---- #include <kfileitem.h> #include <kdirwatch.h> + #include <kurl.h> // Krusader includes #include "vfs.h" + /** + * The normal_vfs class is Kruasder implemention for local directories. + * As this is the most common case, we try to make it as fast and efficent as possible. + */ class normal_vfs : public vfs{ Q_OBJECT *************** *** 49,78 **** normal_vfs(QString origin,QWidget* panel); ~normal_vfs(){} ! ! // copy a file to the vfs (physical) ! void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify=0,QString dir=""); ! // remove a file from the vfs (physical) ! void vfs_delFiles(QStringList *fileNames); ! // return a path to the file ! QString vfs_getFile(QString name); ! KURL::List* vfs_getFiles(QStringList* names); ! // make dir ! void vfs_mkdir(QString name); ! // rename file ! void vfs_rename(QString fileName,QString newName); ! // calculate space ! void vfs_calcSpace(QString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop = 0); ! // return the working dir ! inline virtual QString vfs_workingDir() { return vfs_origin; } ! void blockSignals(bool block){ block? watcher.stopScan() : watcher.startScan() ; } public slots: ! // actually reads files and stats ! bool vfs_refresh(QString origin); void vfs_slotDirty(){ QTimer::singleShot(100,this,SLOT(vfs_refresh())); } protected: ! QList<vfile> vfs_files; // list of pointers to vfile ! KDirWatch watcher; }; --- 51,82 ---- normal_vfs(QString origin,QWidget* panel); ~normal_vfs(){} ! ! /// Copy a file to the vfs (physical). ! virtual void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify,QString dir = ""); ! /// Remove a file from the vfs (physical) ! virtual void vfs_delFiles(QStringList *fileNames); ! /// Return a list of URLs for multiple files ! virtual KURL::List* vfs_getFiles(QStringList* names); ! /// Return a URL to a single file ! virtual KURL vfs_getFile(const QString& name); ! /// Create a new directory ! virtual void vfs_mkdir(const QString& name); ! /// Rename file ! virtual void vfs_rename(const QString& fileName,const QString& newName); ! /// Calculate the amount of space occupied by a file or directory (recursive). ! virtual void vfs_calcSpace(QString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop = 0); ! ! /// return the VFS working dir ! virtual QString vfs_workingDir() { return vfs_origin.path(-1); } public slots: ! /// Re-reads files and stats and fills the vfile list ! virtual bool vfs_refresh(const KURL& origin); ! /// used by to refresh the VFS with a short delay. void vfs_slotDirty(){ QTimer::singleShot(100,this,SLOT(vfs_refresh())); } protected: ! QList<vfile> vfs_files; //< List of pointers to vfile ! KDirWatch watcher; //< The internal dir watcher - use to detect changes in directories }; Index: temp_vfs.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/temp_vfs.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** temp_vfs.cpp 12 Nov 2002 23:06:05 -0000 1.4 --- temp_vfs.cpp 9 Dec 2003 23:05:58 -0000 1.5 *************** *** 42,46 **** temp_vfs::temp_vfs( QString origin, QString type, QWidget* panel, bool ): normal_vfs(origin,panel){ ! vfs_type="temp"; // first we need to create a temp diretory tmpDir = krApp->getTempDir(); --- 42,46 ---- temp_vfs::temp_vfs( QString origin, QString type, QWidget* panel, bool ): normal_vfs(origin,panel){ ! vfs_type=TEMP; // first we need to create a temp diretory tmpDir = krApp->getTempDir(); *************** *** 80,84 **** QString temp_vfs::vfs_workingDir(){ // get the path inside the archive ! QString path = vfs_origin.right((vfs_origin.length()-vfs_origin.findRev('\\'))-1); if(path.left(1) != "/") path = "/"+path; QDir().mkdir(tmpDir+path); --- 80,85 ---- QString temp_vfs::vfs_workingDir(){ // get the path inside the archive ! QString path = vfs_origin.path(-1); ! path = path.mid(path.findRev('\\')+1); if(path.left(1) != "/") path = "/"+path; QDir().mkdir(tmpDir+path); *************** *** 86,94 **** } ! bool temp_vfs::vfs_refresh(QString origin){ ! QString backup = vfs_origin; vfs_origin = origin; // get the directory... ! QString path = origin.right((origin.length()-origin.findRev('\\'))-1); if(path.left(1) =="/") path.remove(0,1); if ( !normal_vfs::vfs_refresh(tmpDir+"/"+path) ){ --- 87,95 ---- } ! bool temp_vfs::vfs_refresh(const KURL& origin){ ! KURL backup = vfs_origin; vfs_origin = origin; // get the directory... ! QString path = origin.path(-1).mid(origin.path(-1).findRev('\\')+1); if(path.left(1) =="/") path.remove(0,1); if ( !normal_vfs::vfs_refresh(tmpDir+"/"+path) ){ Index: temp_vfs.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/temp_vfs.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** temp_vfs.h 12 Nov 2002 23:06:05 -0000 1.3 --- temp_vfs.h 9 Dec 2003 23:05:58 -0000 1.4 *************** *** 45,49 **** public slots: // actually reads files and stats ! bool vfs_refresh(QString origin); protected: --- 45,49 ---- public slots: // actually reads files and stats ! bool vfs_refresh(const KURL& origin); protected: Index: vfile.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/vfile.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** vfile.h 19 Sep 2003 22:35:32 -0000 1.7 --- vfile.h 9 Dec 2003 23:05:58 -0000 1.8 *************** *** 6,14 **** e-mail : kru...@us... web site : http://krusader.sourceforge.net - --------------------------------------------------------------------------- - the Virtual File class handles all the details of maintaining a single - file component within the virtual file system (vfs). a vfile object - contains the nessecery details about a file and member functions which - allow the object to give out the needed details about the file. *************************************************************************** --- 6,9 ---- *************** *** 42,65 **** #include <kio/global.h> class vfile{ - protected: - // the file information list - QString vfile_name; // name - KIO::filesize_t vfile_size; // size - mode_t vfile_mode; // the vfile mode - uid_t vfile_ownerId; // owner id - gid_t vfile_groupId; // group id - QString vfile_owner; // owner name - QString vfile_group; // group name - QString vfile_perm; // permissions - time_t vfile_time_t; // modification in time_t format - bool vfile_symLink; // true==yes - QString vfile_mimeType; // file mimetype - QString vfile_symDest; // if it's a sym link - its detination - public: ! // the constractor needs: ! // (file name, file size, file permissions,is the file a link, ! // owner uid, group uid) vfile(QString name, KIO::filesize_t size, --- 37,52 ---- #include <kio/global.h> + /** + * The Virtual File class handles all the details of maintaining a single + * file component within the virtual file system (vfs). a vfile object + * contains the nessecery details about a file and member functions which + * allow the object to give out the needed details about the file. + */ class vfile{ public: ! /** ! * Use this constructor when you know the following files properties: \n ! * file name, file size, file permissions,is the file a link,owner uid & group uid. ! */ vfile(QString name, KIO::filesize_t size, *************** *** 86,90 **** // following functions give-out file details inline QString vfile_getName() { return vfile_name; } ! inline KIO::filesize_t vfile_getSize() { return vfile_size; } inline QString vfile_getPerm() { return vfile_perm; } inline bool vfile_isDir() { return (vfile_perm[0]=='d');} --- 73,77 ---- // following functions give-out file details inline QString vfile_getName() { return vfile_name; } ! inline KIO::filesize_t vfile_getSize() { return vfile_size; } inline QString vfile_getPerm() { return vfile_perm; } inline bool vfile_isDir() { return (vfile_perm[0]=='d');} *************** *** 101,110 **** char vfile_isWriteable(); char vfile_isExecutable(); ! KIO::UDSEntry vfile_getEntry(); // return the UDSEntry from the vfile ! // used ONLY when calculating a directory's space, needs to change the ! // displayed size of the viewitem and thus the vfile. For INTERNAL USE ! ! inline void vfile_setSize(KIO::filesize_t size) {vfile_size = size;} virtual ~vfile(){} }; --- 88,116 ---- char vfile_isWriteable(); char vfile_isExecutable(); ! KIO::UDSEntry vfile_getEntry(); //< return the UDSEntry from the vfile ! /** ! * Set the file size. ! * used ONLY when calculating a directory's space, needs to change the ! * displayed size of the viewitem and thus the vfile. For INTERNAL USE ! ! */ ! inline void vfile_setSize(KIO::filesize_t size) {vfile_size = size;} virtual ~vfile(){} + + protected: + // the file information list + QString vfile_name; //< file name + KIO::filesize_t vfile_size; //< file size + mode_t vfile_mode; //< file mode + uid_t vfile_ownerId; //< file owner id + gid_t vfile_groupId; //< file group id + QString vfile_owner; //< file owner name + QString vfile_group; //< file group name + QString vfile_perm; //< file permissions string + time_t vfile_time_t; //< file modification in time_t format + bool vfile_symLink; //< true if the file is a symlink + QString vfile_mimeType; //< file mimetype + QString vfile_symDest; //< if it's a sym link - its detination + KURL vfile_url; //< file URL - empty by default }; Index: vfs.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/vfs.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** vfs.cpp 19 Sep 2003 22:35:32 -0000 1.3 --- vfs.cpp 9 Dec 2003 23:05:58 -0000 1.4 *************** *** 50,62 **** while (vf!=0){ ! if ( (vf->vfile_getName() != ".") && ( vf->vfile_getName() != "..") && !(vf->vfile_isDir()) ) temp+=vf->vfile_getSize(); vf=vfs_getNextFile(); } ! return temp; } ! vfile* vfs::vfs_search(QString name){ vfile* temp = vfs_getFirstFile(); --- 50,62 ---- while (vf!=0){ ! if ( (vf->vfile_getName() != ".") && ( vf->vfile_getName() != "..") && !(vf->vfile_isDir()) ) temp+=vf->vfile_getSize(); vf=vfs_getNextFile(); } ! return temp; } ! vfile* vfs::vfs_search(const QString& name){ vfile* temp = vfs_getFirstFile(); *************** *** 68,71 **** --- 68,79 ---- } + bool vfs::vfs_refresh(KIO::Job* job){ + if(job && job->error()){ + job->showErrorDialog(krApp); + } + return vfs_refresh(vfs_origin); + } + + #if 0 QString vfs::round(int i){ QString t; *************** *** 103,113 **** return dateTime; } ! ! bool vfs::vfs_refresh(KIO::Job* job){ ! if(job && job->error()){ ! job->showErrorDialog(krApp); ! } ! return vfs_refresh(vfs_origin); ! } #include "vfs.moc" --- 111,115 ---- return dateTime; } ! #endif #include "vfs.moc" Index: vfs.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/vfs.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** vfs.h 6 Dec 2003 13:10:08 -0000 1.8 --- vfs.h 9 Dec 2003 23:05:58 -0000 1.9 *************** *** 6,14 **** e-mail : kru...@us... web site : http://krusader.sourceforge.net - ------------------------------------------------------------------------- - the vfs class is an extendable class which by itself does (almost) - nothing. other VFSs like the normal_vfs inherits from this class and - make it possible to use a consistent API for all types of VFSs. - *************************************************************************** --- 6,9 ---- *************** *** 46,111 **** #include "vfile.h" class vfs: public QObject{ Q_OBJECT ! public: ! // service functions ! inline void vfs_addToList(vfile *data){ vfs_filesP->append(data); } ! inline void vfs_removeFromList(vfile *data){ vfs_filesP->remove(data); } ! QString dateTime2QString(const QDateTime& datetime); ! QString round(int i); ! QString month2Qstring(QString month); ! // create a vfs from origin ! vfs(QObject* panel, bool quiet=false); virtual ~vfs(){} ! // copy a file to the vfs (physical) virtual void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify,QString dir = "")=0; ! // remove a file from the vfs (physical) virtual void vfs_delFiles(QStringList *fileNames)=0; ! // return a path to the file virtual KURL::List* vfs_getFiles(QStringList* names)=0; ! virtual QString vfs_getFile(QString name)=0; ! // make dir ! virtual void vfs_mkdir(QString name)=0; ! // rename file ! virtual void vfs_rename(QString fileName,QString newName)=0; ! // calculate space virtual void vfs_calcSpace(QString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop = 0)=0; - // return the working dir - virtual QString vfs_workingDir()=0; - virtual void blockSignals(bool block){ QObject::blockSignals(block); } - // check the write permission - virtual bool vfs_isWritable() { return isWritable; } ! KIO::filesize_t vfs_totalSize(); // the total size of FILES in the vfs, ! vfile* vfs_search(QString name); // return vfile* or 0 if not found ! ! inline int vfs_noOfFiles() { return vfs_filesP->count(); } ! virtual inline QString vfs_getOrigin() { return vfs_origin; } ! inline QString vfs_getType() { return vfs_type; } ! inline bool vfs_error() { return error; } ! inline vfile* vfs_getFirstFile(){ ! if(vfs_filesP->isEmpty()) return 0; ! else return (vfs_filesP->first()); } ! inline vfile* vfs_getNextFile() { return (vfs_filesP->next()); } public slots: ! // actually reads files and stats ! virtual bool vfs_refresh(QString origin)=0; virtual bool vfs_refresh(KIO::Job* job); ! bool vfs_refresh(){ return vfs_refresh(vfs_getOrigin()); } signals: ! void startUpdate(); ! void endUpdate(); ! protected: // allows derived classes to use these fields ! QString vfs_type; // the vfs type; ! QString vfs_origin; // the path or file the VFS originates from ! QList<vfile> *vfs_filesP; ! bool error; ! bool quietMode; // if true the vfs won't display error messages or emit signals ! bool isWritable; // true if it's writable }; --- 41,124 ---- #include "vfile.h" + /** + * The vfs class is an extendable class which by itself does (almost) + * nothing. other VFSs like the normal_vfs inherits from this class and + * make it possible to use a consistent API for all types of VFSs. + */ class vfs: public QObject{ Q_OBJECT ! public: ! enum VFS_TYPE{ERROR=0,NORMAL,FTP,TEMP,VIRT}; + /** + * Creates a vfs. + * @param panel the panel father. the VFS will connect it's signals to this object. + * @param quiet if true, the VFS will not display error messages or emit signals + */ + vfs(QObject* panel, bool quiet=false); virtual ~vfs(){} ! ! /// Copy a file to the vfs (physical). virtual void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify,QString dir = "")=0; ! /// Remove a file from the vfs (physical) virtual void vfs_delFiles(QStringList *fileNames)=0; ! /// Return a list of URLs for multiple files virtual KURL::List* vfs_getFiles(QStringList* names)=0; ! /// Return a URL to a single file ! virtual KURL vfs_getFile(const QString& name)=0; ! /// Create a new directory ! virtual void vfs_mkdir(const QString& name)=0; ! /// Rename file ! virtual void vfs_rename(const QString& fileName,const QString& newName)=0; ! /// Calculate the amount of space occupied by a file or directory (recursive). virtual void vfs_calcSpace(QString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop = 0)=0; ! /// Return the VFS working dir ! virtual QString vfs_workingDir()=0; ! /// Return true if the VFS url is writable ! virtual bool vfs_isWritable() { return isWritable; } ! /// Return vfile* or 0 if not found ! vfile* vfs_search(const QString& name); ! /// The total size of all the files in the VFS, ! KIO::filesize_t vfs_totalSize(); ! /// The number of files in the VFS ! inline unsigned long vfs_noOfFiles() { return vfs_filesP->count(); } ! /// Returns the VFS url. ! inline KURL vfs_getOrigin() { return vfs_origin; } ! // Return the VFS type. ! inline VFS_TYPE vfs_getType() { return vfs_type; } ! /// Return true if an internal error occurs. ! inline bool vfs_error() { return error; } ! /// Return the first file in the VFS and set the internal iterator to the beginning of the list. ! inline vfile* vfs_getFirstFile(){ return (vfs_filesP->isEmpty()) ? 0 : vfs_filesP->first(); } ! /// Return the the next file in the list and advance the iterator. ! inline vfile* vfs_getNextFile() { return (vfs_filesP->next()); } public slots: ! /// Re-reads files and stats and fills the vfile list ! virtual bool vfs_refresh(const KURL& origin)=0; ! /// Used to refresh the VFS when a job finishs. it calls the refresh() slot ! /// or display a error message if the job fails virtual bool vfs_refresh(KIO::Job* job); ! //virtual bool vfs_refresh(KIO::Job* job); ! virtual bool vfs_refresh(){ return vfs_refresh(vfs_getOrigin()); } signals: ! void startUpdate(); //< emitted when the VFS starts to refresh its list of vfiles. ! void endUpdate(); //< emmitted when the the vfile list is stable. ! protected: ! /// Add a new vfile to the list. ! inline void addToList(vfile *data){ vfs_filesP->append(data); } ! /// Deletes a vfile from the list. ! inline void removeFromList(vfile *data){ vfs_filesP->remove(data); } ! ! VFS_TYPE vfs_type; //< the vfs type. ! KURL vfs_origin; //< the path or file the VFS originates from. ! QList<vfile>* vfs_filesP; //< Point to a lists of virtual files (vfile). ! bool error; //< true if the VFS failed to refresh. ! bool quietMode; //< if true the vfs won't display error messages or emit signals ! bool isWritable; //< true if it's writable }; |
From: <ya...@us...> - 2003-12-09 23:06:01
|
Update of /cvsroot/krusader/krusader_kde3/pics In directory sc8-pr-cvs1:/tmp/cvs-serv10473/pics Modified Files: Makefile.am Log Message: moving from QString to KURL and code clean up Index: Makefile.am =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/pics/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 30 Nov 2003 13:14:27 -0000 1.2 --- Makefile.am 9 Dec 2003 23:05:58 -0000 1.3 *************** *** 2,6 **** ! EXTRA_DIST = about.png arc_pack16x16.png arc_pack22x22.png arc_pack32x32.png arc_test16x16.png arc_test22x22.png arc_test32x32.png arc_unpack16x16.png arc_unpack22x22.png arc_unpack32x32.png calc16x16.png calc22x22.png calc32x32.png compare16x16.png compare22x22.png compare32x32.png comparedirs16x16.png comparedirs22x22.png comparedirs32x32.png ftp_connect16x16.png ftp_connect22x22.png ftp_connect32x32.png ftp_disconnect16x16.png ftp_disconnect22x22.png ftp_disconnect32x32.png ftp_new16x16.png ftp_new22x22.png ftp_new32x32.png konfig_small.jpg kr_addbookmark16x16.png kr_addbookmark22x22.png kr_addbookmark32x32.png kr_bookman16x16.png kr_bookman22x22.png kr_bookman32x32.png kr_bookmark16x16.png kr_bookmark22x22.png kr_bookmark32x32.png kr_fullview16x16.png kr_fullview22x22.png kr_fullview32x32.png kr_hwinfo16x16.png kr_hwinfo22x22.png kr_hwinfo32x32.png kr_invert16x16.png kr_invert22x22.png kr_invert32x32.png kr_treeview16x16.png kr_treeview22x22.png kr_treeview32x32.png kr_unselect16x16.png kr_unselect22x22.png kr_unselect32x32.png Makefile Makefile.am Makefile.in mountman16x16.png mountman22x22.png mountman32x32.png properties16x16.png properties22x22.png properties32x32.png select16x16.png select22x22.png select32x32.png selectall16x16.png selectall22x22.png selectall32x32.png terminal16x16.png terminal22x22.png terminal32x32.png unselectall16x16.png unselectall22x22.png unselectall32x32.png kr_split16x16.png kr_split22x22.png kr_split32x32.png kr_combine16x16.png kr_combine22x22.png kr_combine32x32.png install-data-local: --- 2,6 ---- ! EXTRA_DIST = about.png arc_pack16x16.png arc_pack22x22.png arc_pack32x32.png arc_test16x16.png arc_test22x22.png arc_test32x32.png arc_unpack16x16.png arc_unpack22x22.png arc_unpack32x32.png calc16x16.png calc22x22.png calc32x32.png compare16x16.png compare22x22.png compare32x32.png comparedirs16x16.png comparedirs22x22.png comparedirs32x32.png ftp_connect16x16.png ftp_connect22x22.png ftp_connect32x32.png ftp_disconnect16x16.png ftp_disconnect22x22.png ftp_disconnect32x32.png ftp_new16x16.png ftp_new22x22.png ftp_new32x32.png konfig_small.jpg kr_addbookmark16x16.png kr_addbookmark22x22.png kr_addbookmark32x32.png kr_bookman16x16.png kr_bookman22x22.png kr_bookman32x32.png kr_bookmark16x16.png kr_bookmark22x22.png kr_bookmark32x32.png kr_fullview16x16.png kr_fullview22x22.png kr_fullview32x32.png kr_hwinfo16x16.png kr_hwinfo22x22.png kr_hwinfo32x32.png kr_invert16x16.png kr_invert22x22.png kr_invert32x32.png kr_treeview16x16.png kr_treeview22x22.png kr_treeview32x32.png kr_unselect16x16.png kr_unselect22x22.png kr_unselect32x32.png Makefile Makefile.am Makefile.in mountman16x16.png mountman22x22.png mountman32x32.png properties16x16.png properties22x22.png properties32x32.png select16x16.png select22x22.png select32x32.png selectall16x16.png selectall22x22.png selectall32x32.png terminal16x16.png terminal22x22.png terminal32x32.png unselectall16x16.png unselectall22x22.png unselectall32x32.png kr_split16x16.png kr_split22x22.png kr_split32x32.png kr_combine16x16.png kr_combine22x22.png kr_combine32x32.png install-data-local: *************** *** 153,157 **** $(mkinstalldirs) $(kde_datadir)/krusader/icons/hicolor/32x32/actions/ $(INSTALL_DATA) $(srcdir)/kr_split32x32.png $(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_split.png ! $(mkinstalldirs) $(kde_datadir)/krusader/icons/hicolor/32x32/actions/ $(INSTALL_DATA) $(srcdir)/kr_combine16x16.png $(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_combine.png $(mkinstalldirs) $(kde_datadir)/krusader/icons/hicolor/22x22/actions/ --- 153,157 ---- $(mkinstalldirs) $(kde_datadir)/krusader/icons/hicolor/32x32/actions/ $(INSTALL_DATA) $(srcdir)/kr_split32x32.png $(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_split.png ! $(mkinstalldirs) $(kde_datadir)/krusader/icons/hicolor/16x16/actions/ $(INSTALL_DATA) $(srcdir)/kr_combine16x16.png $(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_combine.png $(mkinstalldirs) $(kde_datadir)/krusader/icons/hicolor/22x22/actions/ |
From: <ya...@us...> - 2003-12-09 23:06:00
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Search In directory sc8-pr-cvs1:/tmp/cvs-serv10473/krusader/Search Modified Files: krsearchdialog.cpp krsearchmod.cpp krsearchmod.h Log Message: moving from QString to KURL and code clean up Index: krsearchdialog.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchdialog.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** krsearchdialog.cpp 29 Nov 2003 17:04:18 -0000 1.12 --- krsearchdialog.cpp 9 Dec 2003 23:05:57 -0000 1.13 *************** *** 176,184 **** // the path in the active panel should be the default search location ! if (krApp->mainView->activePanel->func->files()->vfs_getType() != "ftp") { QString path = krApp->mainView->activePanel->getPath(); - // if we're inside an archive, show its directory - int i = path.find('\\'); - if (i>=0) path = path.left(path.findRev('/', i)); searchInEdit->setText(path); } --- 176,181 ---- // the path in the active panel should be the default search location ! if (krApp->mainView->activePanel->func->files()->vfs_getType() == vfs::NORMAL) { QString path = krApp->mainView->activePanel->getPath(); searchInEdit->setText(path); } *************** *** 553,557 **** void KrSearchDialog::resultClicked(QListViewItem* i) { ! krApp->mainView->activePanel->func->openUrl((i->text(1)),i->text(0)); showMinimized(); } --- 550,554 ---- void KrSearchDialog::resultClicked(QListViewItem* i) { ! krApp->mainView->activePanel->func->openUrl(KURL::fromPathOrURL(i->text(1)),i->text(0)); showMinimized(); } Index: krsearchmod.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchmod.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** krsearchmod.cpp 29 Nov 2003 17:04:18 -0000 1.7 --- krsearchmod.cpp 9 Dec 2003 23:05:57 -0000 1.8 *************** *** 251,261 **** } ! void KRSearchMod::scanURL( ftp_vfs* v, QString url){ if( !v->vfs_refresh(url) ) return; while(v->isBusy()) qApp->processEvents(); ! if( scanedDirs.contains(v->vfs_getOrigin()) ) return; // don't re-scan urls.. ! scanedDirs.append(v->vfs_getOrigin()); for( vfile* vf=v->vfs_getFirstFile(); vf != 0 ; vf=v->vfs_getNextFile() ){ --- 251,261 ---- } ! void KRSearchMod::scanURL( ftp_vfs* v, KURL url){ if( !v->vfs_refresh(url) ) return; while(v->isBusy()) qApp->processEvents(); ! if( scanedDirs.contains(v->vfs_getOrigin().url() ) ) return; // don't re-scan urls.. ! scanedDirs.append(v->vfs_getOrigin().url() ); for( vfile* vf=v->vfs_getFirstFile(); vf != 0 ; vf=v->vfs_getNextFile() ){ *************** *** 263,267 **** if ( vf->vfile_isDir() ){ ! unScanedUrls.append(v->vfs_getOrigin()+"/"+name); } // see if the name matches --- 263,269 ---- if ( vf->vfile_isDir() ){ ! KURL url = v->vfs_getOrigin(); ! url.addPath(name); ! unScanedUrls.push(url); } // see if the name matches *************** *** 285,290 **** // if we got here - we got a winner ! results.append(v->vfs_getOrigin()+"/"+name); ! emit found(name, v->vfs_getOrigin(), size, vf->vfile_getTime_t(),vf->vfile_getPerm()); qApp->processEvents(); } --- 287,292 ---- // if we got here - we got a winner ! results.append(v->vfs_getOrigin().prettyURL(1)+name); ! emit found(name, v->vfs_getOrigin().prettyURL(-1), size, vf->vfile_getTime_t(),vf->vfile_getPerm()); qApp->processEvents(); } Index: krsearchmod.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchmod.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** krsearchmod.h 29 Nov 2003 17:04:18 -0000 1.4 --- krsearchmod.h 9 Dec 2003 23:05:57 -0000 1.5 *************** *** 39,42 **** --- 39,43 ---- #include <time.h> #include <kio/global.h> + #include <kurl.h> class KRQuery; *************** *** 51,55 **** void scanDir( QString dir); void scanArchive( QString archive, QString type ); ! void scanURL( ftp_vfs* v, QString url ); void start(); void stop(); --- 52,56 ---- void scanDir( QString dir); void scanArchive( QString archive, QString type ); ! void scanURL( ftp_vfs* v, KURL url ); void start(); void stop(); *************** *** 66,70 **** bool fileMatch(QString name); QStringList scanedDirs; ! QValueStack<QString> unScanedUrls; KRQuery *query; QStringList results; --- 67,71 ---- bool fileMatch(QString name); QStringList scanedDirs; ! QValueStack<KURL> unScanedUrls; KRQuery *query; QStringList results; |
From: <ya...@us...> - 2003-12-09 23:06:00
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Panel In directory sc8-pr-cvs1:/tmp/cvs-serv10473/krusader/Panel Modified Files: listpanel.cpp panelfunc.cpp panelfunc.h Log Message: moving from QString to KURL and code clean up Index: listpanel.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Panel/listpanel.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** listpanel.cpp 6 Dec 2003 14:11:50 -0000 1.43 --- listpanel.cpp 9 Dec 2003 23:05:57 -0000 1.44 *************** *** 59,62 **** --- 59,63 ---- #include <kdebug.h> #include <kurlrequester.h> + #include <kurl.h> // Krusader includes #include "../krusader.h" *************** *** 110,114 **** bookmarksButton = new BookmarksButton( this ); connect( bookmarksButton, SIGNAL( pressed() ), this, SLOT( slotFocusOnMe() ) ); ! connect( bookmarksButton, SIGNAL( openUrl( const QString& ) ), func, SLOT( openUrl( const QString& ) ) ); QWhatsThis::add ( bookmarksButton, i18n( "Open menu with bookmarks. You can also add " --- 111,115 ---- bookmarksButton = new BookmarksButton( this ); connect( bookmarksButton, SIGNAL( pressed() ), this, SLOT( slotFocusOnMe() ) ); ! connect( bookmarksButton, SIGNAL( openUrl( const KURL& ) ), func, SLOT( openUrl( const KURL& ) ) ); QWhatsThis::add ( bookmarksButton, i18n( "Open menu with bookmarks. You can also add " *************** *** 266,270 **** realPath = virtualPath; ! func->openUrl( virtualPath ); } --- 267,271 ---- realPath = virtualPath; ! func->openUrl( KURL::fromPathOrURL(virtualPath) ); } *************** *** 277,282 **** } ! while ( func->inRefresh ) ! ; // wait until the last refresh finish func->inRefresh = true; // make sure the next refresh wait for this one krApp->setCursor( KCursor::workingCursor() ); --- 278,282 ---- } ! while ( func->inRefresh ); // wait until the last refresh finish func->inRefresh = true; // make sure the next refresh wait for this one krApp->setCursor( KCursor::workingCursor() ); *************** *** 284,289 **** // set the virtual path ! virtualPath = func->files() ->vfs_getOrigin(); ! if ( func->files() ->vfs_getType() == "normal" ) realPath = virtualPath; this->origin->setURL( virtualPath ); --- 284,291 ---- // set the virtual path ! virtualPath = func->files() ->vfs_getOrigin().prettyURL(); ! if( virtualPath.startsWith("file:") ) virtualPath = virtualPath.mid(5); ! ! if ( func->files() ->vfs_getType() == vfs::NORMAL ) realPath = virtualPath; this->origin->setURL( virtualPath ); *************** *** 306,311 **** void ListPanel::slotUpdate() { // if we are not at the root add the ".." entery ! QString origin = func->files() ->vfs_getOrigin(); ! if ( origin.right( 1 ) != "/" && !( ( func->files() ->vfs_getType() == "ftp" ) && origin.find( '/', origin.find( ":/" ) + 3 ) == -1 ) ) { view->addItems( func->files() ); --- 308,313 ---- void ListPanel::slotUpdate() { // if we are not at the root add the ".." entery ! QString origin = func->files() ->vfs_getOrigin().prettyURL(); ! if ( origin.right( 1 ) != "/" && !( ( func->files() ->vfs_getType() == vfs::FTP ) && origin.find( '/', origin.find( ":/" ) + 3 ) == -1 ) ) { view->addItems( func->files() ); *************** *** 412,417 **** if ( func->files() ->vfs_isWritable() ) popup.insertItem( i18n( "Move Here" ), 2 ); ! if ( func->files() ->vfs_getType() == "normal" && ! otherPanel->func->files() ->vfs_getType() == "normal" ) popup.insertItem( i18n( "Link Here" ), 3 ); popup.insertItem( i18n( "Cancel" ), 4 ); --- 414,419 ---- if ( func->files() ->vfs_isWritable() ) popup.insertItem( i18n( "Move Here" ), 2 ); ! if ( func->files() ->vfs_getType() == vfs::NORMAL && ! otherPanel->func->files() ->vfs_getType() == vfs::NORMAL ) popup.insertItem( i18n( "Link Here" ), 3 ); popup.insertItem( i18n( "Cancel" ), 4 ); *************** *** 509,513 **** // Preview - normal vfs only ? KrPreviewPopup preview; ! if ( func->files() ->vfs_getType() == "normal" ) { // create the preview popup QStringList names; --- 511,515 ---- // Preview - normal vfs only ? KrPreviewPopup preview; ! if ( func->files() ->vfs_getType() == vfs::NORMAL ) { // create the preview popup QStringList names; *************** *** 558,567 **** popup.insertItem( i18n( "Delete" ), DELETE_ID ); // SHRED - only one file ! if ( func->files() ->vfs_getType() == "normal" && !item->isDir() && !multipleSelections ) popup.insertItem( i18n( "Shred" ), SHRED_ID ); } ! // create new shortcut or redirect links - not on ftp: ! if ( func->files() ->vfs_getType() != "ftp" ) { popup.insertSeparator(); linkPopup.insertItem( i18n( "new symlink" ), NEW_SYMLINK ); --- 560,569 ---- popup.insertItem( i18n( "Delete" ), DELETE_ID ); // SHRED - only one file ! if ( func->files() ->vfs_getType() == vfs::NORMAL && !item->isDir() && !multipleSelections ) popup.insertItem( i18n( "Shred" ), SHRED_ID ); } ! // create new shortcut or redirect links - only on local directories: ! if ( func->files() ->vfs_getType() == vfs::NORMAL ) { popup.insertSeparator(); linkPopup.insertItem( i18n( "new symlink" ), NEW_SYMLINK ); *************** *** 573,584 **** } popup.insertSeparator(); ! if ( func->files() ->vfs_getType() != "ftp" && ( item->isDir() || multipleSelections ) ) krCalculate->plug( &popup ); ! if ( func->files() ->vfs_getType() == "normal" && item->isDir() && !multipleSelections ) { ! if ( krMtMan.getStatus( func->files() ->vfs_getFile( item->name() ) ) == MountMan::KMountMan::MOUNTED ) popup.insertItem( i18n( "Unmount" ), UNMOUNT_ID ); ! else if ( krMtMan.getStatus( func->files() ->vfs_getFile( item->name() ) ) == MountMan::KMountMan::NOT_MOUNTED ) popup.insertItem( i18n( "Mount" ), MOUNT_ID ); ! if ( krMtMan.ejectable( func->files() ->vfs_getFile( item->name() ) ) ) popup.insertItem( i18n( "Eject" ), EJECT_ID ); } --- 575,586 ---- } popup.insertSeparator(); ! if ( func->files() ->vfs_getType() == vfs::NORMAL && ( item->isDir() || multipleSelections ) ) krCalculate->plug( &popup ); ! if ( func->files() ->vfs_getType() == vfs::NORMAL && item->isDir() && !multipleSelections ) { ! if ( krMtMan.getStatus( func->files()->vfs_getFile(item->name()).path(-1) ) == MountMan::KMountMan::MOUNTED ) popup.insertItem( i18n( "Unmount" ), UNMOUNT_ID ); ! else if ( krMtMan.getStatus( func->files()->vfs_getFile(item->name()).path(-1) ) == MountMan::KMountMan::NOT_MOUNTED ) popup.insertItem( i18n( "Mount" ), MOUNT_ID ); ! if ( krMtMan.ejectable( func->files()->vfs_getFile(item->name()).path(-1) ) ) popup.insertItem( i18n( "Eject" ), EJECT_ID ); } *************** *** 603,611 **** // assuming only 1 file is selected (otherwise we won't get here) (krApp->mainView->activePanel == krApp->mainView->left ? krApp->mainView->leftMng : ! krApp->mainView->rightMng)->slotNewTab( func->files() ->vfs_getFile( item->name() ) ); break; case OPEN_ID : // Open in a new tab for ( KrViewItemList::Iterator it = items.begin(); it != items.end(); ++it ) { ! u.setPath( func->files() ->vfs_getFile( ( *it ) ->name() ) ); KRun::runURL( u, item->mime() ); } --- 605,613 ---- // assuming only 1 file is selected (otherwise we won't get here) (krApp->mainView->activePanel == krApp->mainView->left ? krApp->mainView->leftMng : ! krApp->mainView->rightMng)->slotNewTab( func->files()->vfs_getFile(item->name()).url() ); break; case OPEN_ID : // Open in a new tab for ( KrViewItemList::Iterator it = items.begin(); it != items.end(); ++it ) { ! u = func->files()->vfs_getFile((*it)->name()); KRun::runURL( u, item->mime() ); } *************** *** 624,628 **** break; case EJECT_ID : ! MountMan::KMountMan::eject( func->files() ->vfs_getFile( item->name() ) ); break; case SHRED_ID : --- 626,630 ---- break; case EJECT_ID : ! MountMan::KMountMan::eject( func->files()->vfs_getFile(item->name()).path(-1) ); break; case SHRED_ID : *************** *** 631,646 **** " ? Once shred, the file is gone forever !!!", QString::null, KStdGuiItem::cont(), "Shred" ) == KMessageBox::Continue ) ! KShred::shred( func->files() ->vfs_getFile( item->name() ) ); break; case OPEN_KONQ_ID : // open in konqueror ! kapp->startServiceByDesktopName( "konqueror", func->files() ->vfs_getFile( item->name() ) ); break; case CHOOSE_ID : // Other... ! u.setPath( func->files() ->vfs_getFile( item->name() ) ); lst.append( u ); KRun::displayOpenWithDialog( lst ); break; case MOUNT_ID : ! krMtMan.mount( func->files() ->vfs_getFile( item->name() ) ); break; case NEW_LINK : --- 633,648 ---- " ? Once shred, the file is gone forever !!!", QString::null, KStdGuiItem::cont(), "Shred" ) == KMessageBox::Continue ) ! KShred::shred( func->files()->vfs_getFile(item->name()).path(-1) ); break; case OPEN_KONQ_ID : // open in konqueror ! kapp->startServiceByDesktopName( "konqueror", func->files()->vfs_getFile(item->name()).url() ); break; case CHOOSE_ID : // Other... ! u = func->files()->vfs_getFile(item->name()); lst.append( u ); KRun::displayOpenWithDialog( lst ); break; case MOUNT_ID : ! krMtMan.mount( func->files()->vfs_getFile(item->name()).path(-1) ); break; case NEW_LINK : *************** *** 654,665 **** break; case UNMOUNT_ID : ! krMtMan.unmount( func->files() ->vfs_getFile( item->name() ) ); break; case SEND_BY_EMAIL : ! SLOTS->sendFileByEmail( func->files() ->vfs_getFile( item->name() ) ); break; case OPEN_TERM_ID : // open in terminal QString save = getcwd( 0, 0 ); ! chdir( func->files() ->vfs_getFile( item->name() ).local8Bit() ); KProcess proc; krConfig->setGroup( "General" ); --- 656,667 ---- break; case UNMOUNT_ID : ! krMtMan.unmount( func->files()->vfs_getFile(item->name()).path(-1) ); break; case SEND_BY_EMAIL : ! SLOTS->sendFileByEmail( func->files()->vfs_getFile(item->name()).url() ); break; case OPEN_TERM_ID : // open in terminal QString save = getcwd( 0, 0 ); ! chdir( func->files()->vfs_getFile(item->name()).path(-1).local8Bit() ); KProcess proc; krConfig->setGroup( "General" ); *************** *** 726,734 **** // user pressed CTRL+Right/Left - refresh other panel to the selected path if it's a // directory otherwise as this one ! QString newPath; ! if ( view->getCurrentKrViewItem() ->isDir() ) { ! newPath = func->files() ->vfs_getFile( view->getCurrentKrViewItem() ->name() ); } else { ! newPath = realPath; } otherPanel->func->openUrl( newPath ); --- 728,736 ---- // user pressed CTRL+Right/Left - refresh other panel to the selected path if it's a // directory otherwise as this one ! KURL newPath; ! if ( view->getCurrentKrViewItem()->isDir() ) { ! newPath = func->files()->vfs_getFile( view->getCurrentKrViewItem()->name() ); } else { ! newPath = func->files()->vfs_getOrigin(); } otherPanel->func->openUrl( newPath ); Index: panelfunc.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Panel/panelfunc.cpp,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** panelfunc.cpp 29 Nov 2003 17:10:41 -0000 1.44 --- panelfunc.cpp 9 Dec 2003 23:05:57 -0000 1.45 *************** *** 197,207 **** vfsStack.setAutoDelete( true ); vfsStack.push( new normal_vfs( "/", panel ) ); ! files() ->vfs_refresh(); } ! void ListPanelFunc::openUrl( const QString& path,const QString& nameToMakeCurrent) { ! panel->slotFocusOnMe(); ! QString mypath = path; // clear the view - to avoid a repaint crash --- 197,210 ---- vfsStack.setAutoDelete( true ); vfsStack.push( new normal_vfs( "/", panel ) ); ! //files() ->vfs_refresh(); } ! void ListPanelFunc::openUrl( const QString& url,const QString& nameToMakeCurrent) { ! openUrl( KURL::fromPathOrURL(url),nameToMakeCurrent); ! } ! ! void ListPanelFunc::openUrl( const KURL& url,const QString& nameToMakeCurrent) { ! panel->slotFocusOnMe(); // clear the view - to avoid a repaint crash *************** *** 210,224 **** panel->view->setNameToMakeCurrent( nameToMakeCurrent ); } - // make sure local urls are handles ok - if ( mypath.lower().startsWith( "file:" ) ) - mypath = mypath.mid( 5 ); // remote file systems ! if ( mypath.contains( ":/" ) ) { // first close all open archives / remote connections ! while ( files() ->vfs_getType() != "normal" ) vfsStack.remove(); ! vfs* v = new ftp_vfs(mypath,panel); if ( v->vfs_error() ) { ! kdWarning() << "Failed to create vfs: " << mypath.local8Bit() << endl; delete v; refresh(); --- 213,224 ---- panel->view->setNameToMakeCurrent( nameToMakeCurrent ); } // remote file systems ! if ( !url.isLocalFile() ) { // first close all open archives / remote connections ! while ( files() ->vfs_getType() != vfs::NORMAL ) vfsStack.remove(); ! vfs* v = new ftp_vfs(url,panel); if ( v->vfs_error() ) { ! kdWarning() << "Failed to create vfs: " << url.prettyURL() << endl; delete v; refresh(); *************** *** 230,240 **** } else { // local directories // first close all open archives / remote connections ! while ( files() ->vfs_getType() != "normal" ) vfsStack.remove(); // now we have a normal vfs- refresh it. ! files() ->blockSignals( false ); ! if( mypath == "~" ) mypath = QDir::homeDirPath(); ! if( !mypath.startsWith("/") ) mypath = files()->vfs_getOrigin()+"/"+mypath; mypath = QDir::cleanDirPath(mypath); --- 230,239 ---- } else { // local directories // first close all open archives / remote connections ! while ( files() ->vfs_getType() != vfs::NORMAL ) vfsStack.remove(); // now we have a normal vfs- refresh it. ! QString mypath = url.path(-1); if( mypath == "~" ) mypath = QDir::homeDirPath(); ! //if( !mypath.startsWith("/") ) mypath = files()->vfs_getOrigin().prettyURL(1)+mypath; mypath = QDir::cleanDirPath(mypath); *************** *** 248,261 **** chdir( mypath.latin1() ); ! refresh( mypath ); } } ! void ListPanelFunc::refresh( const QString path ) { // change the cursor to busy krApp->setCursor( KCursor::waitCursor() ); // if we could not refresh try to dir up ! QString origin = path; if ( !files() ->vfs_refresh( origin ) ) { panel->virtualPath = origin; --- 247,260 ---- chdir( mypath.latin1() ); ! refresh( KURL::fromPathOrURL(mypath) ); } } ! void ListPanelFunc::refresh( const KURL& url ) { // change the cursor to busy krApp->setCursor( KCursor::waitCursor() ); // if we could not refresh try to dir up ! QString origin = url.prettyURL(-1); if ( !files() ->vfs_refresh( origin ) ) { panel->virtualPath = origin; *************** *** 297,301 **** void ListPanelFunc::redirectLink() { ! if ( files() ->vfs_getType() == "ftp" ) { KMessageBox::sorry( krApp, i18n( "You can edit links only on local file systems" ) ); return ; --- 296,300 ---- void ListPanelFunc::redirectLink() { ! if ( files() ->vfs_getType() != vfs::NORMAL ) { KMessageBox::sorry( krApp, i18n( "You can edit links only on local file systems" ) ); return ; *************** *** 306,310 **** return ; ! QString file = files() ->vfs_getFile( vf->vfile_getName() ); QString currentLink = vf->vfile_getSymDest(); if ( currentLink.isEmpty() ) { --- 305,309 ---- return ; ! QString file = files() ->vfs_getFile( vf->vfile_getName() ).path(-1); QString currentLink = vf->vfile_getSymDest(); if ( currentLink.isEmpty() ) { *************** *** 334,338 **** void ListPanelFunc::krlink( bool sym ) { ! if ( files() ->vfs_getType() == "ftp" ) { KMessageBox::sorry( krApp, i18n( "You can create links only on local file systems" ) ); return ; --- 333,337 ---- void ListPanelFunc::krlink( bool sym ) { ! if ( files() ->vfs_getType() != vfs::NORMAL ) { KMessageBox::sorry( krApp, i18n( "You can create links only on local file systems" ) ); return ; *************** *** 360,364 **** if ( linkName.contains( "/" ) ) ! name = files()->vfs_getFile( name ); if ( sym ) { --- 359,363 ---- if ( linkName.contains( "/" ) ) ! name = files()->vfs_getFile( name ).path(-1); if ( sym ) { *************** *** 386,394 **** return; } ! ! // at this point, let's take the full path ! fileName = files()->vfs_getFile( fileName ); ! // and call KViewer. ! KrViewer::view( KURL::fromPathOrURL(fileName) ); // nothing more to it! } --- 385,390 ---- return; } ! // call KViewer. ! KrViewer::view( files()->vfs_getFile( fileName ) ); // nothing more to it! } *************** *** 427,433 **** QString edit = krConfig->readEntry( "Editor", _Editor ); if ( edit == "internal editor" ) ! KrViewer::edit( KURL::fromPathOrURL(files() ->vfs_getFile( name )) ); else { ! proc << edit << files() ->vfs_getFile( name ); if ( !proc.start( KProcess::DontCare ) ) KMessageBox::sorry( krApp, i18n( "Can't open " ) + "\"" + edit + "\"" ); --- 423,429 ---- QString edit = krConfig->readEntry( "Editor", _Editor ); if ( edit == "internal editor" ) ! KrViewer::edit( files() ->vfs_getFile(name) ); else { ! proc << edit << files()->vfs_getFile(name).url(); if ( !proc.start( KProcess::DontCare ) ) KMessageBox::sorry( krApp, i18n( "Can't open " ) + "\"" + edit + "\"" ); *************** *** 463,466 **** --- 459,466 ---- KURL::List* fileUrls = files() ->vfs_getFiles( &fileNames ); + // after the delete return the cursor to the first unmarked + // file above the current item; + panel->prepareToDelete(); + // if we are not moving to the other panel : if ( panel->otherPanel->getPath() != dest ) { *************** *** 517,521 **** // if the name is already taken - quit ! if ( QDir( files() ->vfs_getOrigin() + "/" + dirName ).exists() ) { KMessageBox::sorry( krApp, i18n( "A directory or a file with this name already exists." ) ); return ; --- 517,521 ---- // if the name is already taken - quit ! if ( files()->vfs_search(dirName) ) { KMessageBox::sorry( krApp, i18n( "A directory or a file with this name already exists." ) ); return ; *************** *** 606,610 **** krConfig->setGroup( "General" ); if ( krConfig->readBoolEntry( "Move To Trash", _MoveToTrash ) && ! files() ->vfs_getType() == "normal" ) { s = i18n( "trash" ) + s; b = i18n( "&Trash" ); --- 606,610 ---- krConfig->setGroup( "General" ); if ( krConfig->readBoolEntry( "Move To Trash", _MoveToTrash ) && ! files() ->vfs_getType() == vfs::NORMAL ) { s = i18n( "trash" ) + s; b = i18n( "&Trash" ); *************** *** 623,627 **** krConfig->setGroup( "Advanced" ); bool emptyDirVerify = krConfig->readBoolEntry( "Confirm Unempty Dir", _ConfirmUnemptyDir ); ! emptyDirVerify = ( ( emptyDirVerify ) && ( files() ->vfs_getType() == "normal" ) ); QDir dir; --- 623,627 ---- krConfig->setGroup( "Advanced" ); bool emptyDirVerify = krConfig->readBoolEntry( "Confirm Unempty Dir", _ConfirmUnemptyDir ); ! emptyDirVerify = ( ( emptyDirVerify ) && ( files() ->vfs_getType() == vfs::NORMAL ) ); QDir dir; *************** *** 671,675 **** if ( vf == 0 ) return ; ! QString origin = files() ->vfs_getOrigin(); QString type = vf->vfile_getMime().right( 4 ); --- 671,675 ---- if ( vf == 0 ) return ; ! KURL origin = files() ->vfs_getOrigin(); QString type = vf->vfile_getMime().right( 4 ); *************** *** 678,695 **** if ( vf->vfile_isDir() ) { ! origin.right(1) == "/" ? origin += name : origin += "/" + name; panel->view->setNameToMakeCurrent( QString::null ); refresh( origin ); ! } else if ( KRarcHandler::arcHandled( type ) && !origin.contains(":/")) { ! QString path = files()->vfs_getFile(vf->vfile_getName()); if ( type == "-tbz" || type == "-tgz" || type == "tarz" || type == "-tar" ){ ! path = "tar:"+path; } else { ! path = "krarc:"+path; } openUrl( path ); } else { ! KURL url; ! url.setPath( files() ->vfs_getFile( name ) ); KRun::runURL( url, vf->vfile_getMime() ); } --- 678,694 ---- if ( vf->vfile_isDir() ) { ! origin.addPath(name); panel->view->setNameToMakeCurrent( QString::null ); refresh( origin ); ! } else if ( KRarcHandler::arcHandled( type ) && origin.isLocalFile() ) { ! KURL path = files()->vfs_getFile(vf->vfile_getName()); if ( type == "-tbz" || type == "-tgz" || type == "tarz" || type == "-tar" ){ ! path.setProtocol("tar"); } else { ! path.setProtocol("krarc:"); } openUrl( path ); } else { ! KURL url = files()->vfs_getFile( name ); KRun::runURL( url, vf->vfile_getMime() ); } *************** *** 807,811 **** // test the archive ! if ( KRarcHandler::test( files() ->vfs_getFile( arcName ), type ) ) KMessageBox::information( krApp, i18n( "%1, test passed." ).arg( arcName ) ); else --- 806,810 ---- // test the archive ! if ( KRarcHandler::test( files()->vfs_getFile(arcName).path(-1), type ) ) KMessageBox::information( krApp, i18n( "%1, test passed." ).arg( arcName ) ); else *************** *** 852,856 **** } // unpack the files ! KRarcHandler::unpack( files() ->vfs_getFile( arcName ), type, dest ); } if ( packToOtherPanel ) --- 851,855 ---- } // unpack the files ! KRarcHandler::unpack( files()->vfs_getFile(arcName).path(-1), type, dest ); } if ( packToOtherPanel ) *************** *** 881,888 **** // you can disconnect only if connected ! ! if ( files() ->vfs_getType() == "ftp" ) { vfsStack.remove(); files() ->blockSignals( false ); ! if ( files() ->vfs_getType() != "ftp" ) krFTPDiss->setEnabled( false ); krFTPNew->setEnabled( true ); --- 880,887 ---- // you can disconnect only if connected ! ! if ( files() ->vfs_getType() == vfs::FTP ) { vfsStack.remove(); files() ->blockSignals( false ); ! if ( files() ->vfs_getType() != vfs::FTP ) krFTPDiss->setEnabled( false ); krFTPNew->setEnabled( true ); *************** *** 923,931 **** void ListPanelFunc::refreshActions() { ! QString vfsType = files() ->vfs_getType(); // set up actions ! krMultiRename->setEnabled( vfsType == "normal" ); // batch rename ! krProperties ->setEnabled( vfsType == "normal" || vfsType == "ftp" ); // file properties ! krFTPDiss ->setEnabled( vfsType == "ftp" ); // disconnect an FTP session /* krUnpack->setEnabled(true); // unpack archive --- 922,930 ---- void ListPanelFunc::refreshActions() { ! vfs::VFS_TYPE vfsType = files() ->vfs_getType(); // set up actions ! krMultiRename->setEnabled( vfsType == vfs::NORMAL ); // batch rename ! krProperties ->setEnabled( vfsType == vfs::NORMAL || vfsType == vfs::FTP ); // file properties ! krFTPDiss ->setEnabled( vfsType == vfs::FTP ); // disconnect an FTP session /* krUnpack->setEnabled(true); // unpack archive Index: panelfunc.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Panel/panelfunc.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** panelfunc.h 29 Nov 2003 17:10:41 -0000 1.15 --- panelfunc.h 9 Dec 2003 23:05:57 -0000 1.16 *************** *** 99,102 **** --- 99,103 ---- public slots: void execute(QString&); + void openUrl(const KURL& path, const QString& nameToMakeCurrent = QString::null); void openUrl(const QString& path, const QString& nameToMakeCurrent = QString::null); void refresh(){ refresh(panel->virtualPath); } // re-read the files *************** *** 137,141 **** protected: ! void refresh(const QString path); ListPanel *panel; // our ListPanel --- 138,142 ---- protected: ! void refresh(const KURL& url); ListPanel *panel; // our ListPanel |
Update of /cvsroot/krusader/krusader_kde3/krusader/BookMan In directory sc8-pr-cvs1:/tmp/cvs-serv10473/krusader/BookMan Modified Files: bookmarksbutton.cpp bookmarksbutton.h kbookmarkhandler.cpp kbookmarkhandler.h kbookmarkmanager.h kbookmarkmenu.cpp Log Message: moving from QString to KURL and code clean up Index: bookmarksbutton.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/bookmarksbutton.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** bookmarksbutton.cpp 8 Aug 2003 21:16:06 -0000 1.2 --- bookmarksbutton.cpp 9 Dec 2003 23:05:57 -0000 1.3 *************** *** 38,42 **** bookmarkHandler = new KBookmarkHandler(this, acmBookmarks->popupMenu()); ! QObject::connect(bookmarkHandler, SIGNAL(openUrl(const QString&)), this, SIGNAL(openUrl(const QString&))); setPopup(acmBookmarks->popupMenu()); } --- 38,42 ---- bookmarkHandler = new KBookmarkHandler(this, acmBookmarks->popupMenu()); ! QObject::connect(bookmarkHandler, SIGNAL(openUrl(const KURL&)), this, SIGNAL(openUrl(const KURL&))); setPopup(acmBookmarks->popupMenu()); } Index: bookmarksbutton.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/bookmarksbutton.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** bookmarksbutton.h 8 Aug 2003 21:13:54 -0000 1.2 --- bookmarksbutton.h 9 Dec 2003 23:05:57 -0000 1.3 *************** *** 42,46 **** KBookmarkHandler *bookmarkHandler; signals: ! void openUrl(const QString& url); }; --- 42,46 ---- KBookmarkHandler *bookmarkHandler; signals: ! void openUrl(const KURL&); }; Index: kbookmarkhandler.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/kbookmarkhandler.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kbookmarkhandler.cpp 11 Aug 2003 20:48:35 -0000 1.2 --- kbookmarkhandler.cpp 9 Dec 2003 23:05:57 -0000 1.3 *************** *** 56,62 **** } ! void KBookmarkHandler::openBookmarkURL(const QString& url) { ! //kdDebug() << "Opening url: " << url << endl; emit openUrl( url ); } --- 56,62 ---- } ! void KBookmarkHandler::openBookmarkURL(const KURL& url) { ! kdDebug() << "Opening url: " << url.url() << endl; emit openUrl( url ); } Index: kbookmarkhandler.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/kbookmarkhandler.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** kbookmarkhandler.h 2 Aug 2003 21:06:01 -0000 1.1 --- kbookmarkhandler.h 9 Dec 2003 23:05:57 -0000 1.2 *************** *** 32,36 **** * This function is called when the user selects a bookmark. */ ! virtual void openBookmarkURL( const QString& url ); /** --- 32,36 ---- * This function is called when the user selects a bookmark. */ ! virtual void openBookmarkURL( const KURL& url ); /** *************** *** 57,61 **** signals: ! void openUrl(const QString& url ); private: --- 57,61 ---- signals: ! void openUrl(const KURL& url ); private: Index: kbookmarkmanager.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/kbookmarkmanager.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** kbookmarkmanager.h 2 Aug 2003 21:06:01 -0000 1.1 --- kbookmarkmanager.h 9 Dec 2003 23:05:57 -0000 1.2 *************** *** 246,250 **** * open up the bookmark in a default fashion unless you override it. */ ! virtual void openBookmarkURL(const QString& _url); /** --- 246,250 ---- * open up the bookmark in a default fashion unless you override it. */ ! virtual void openBookmarkURL(const KURL& _url); /** Index: kbookmarkmenu.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/kbookmarkmenu.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kbookmarkmenu.cpp 24 Aug 2003 18:13:28 -0000 1.3 --- kbookmarkmenu.cpp 9 Dec 2003 23:05:57 -0000 1.4 *************** *** 392,396 **** Q_ASSERT(!bookmark.isGroup()); ! m_pOwner->openBookmarkURL( bookmark.url().prettyURL() ); } --- 392,396 ---- Q_ASSERT(!bookmark.isGroup()); ! m_pOwner->openBookmarkURL( bookmark.url() ); } |
From: <ya...@us...> - 2003-12-09 23:05:59
|
Update of /cvsroot/krusader/krusader_kde3/krusader In directory sc8-pr-cvs1:/tmp/cvs-serv10473/krusader Modified Files: krslots.cpp krslots.h Log Message: moving from QString to KURL and code clean up Index: krslots.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krslots.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** krslots.cpp 6 Dec 2003 14:25:11 -0000 1.33 --- krslots.cpp 9 Dec 2003 23:05:56 -0000 1.34 *************** *** 247,255 **** return; ! if( full_path ) ! { ! QString path=ACTIVE_FUNC->files()->vfs_getOrigin(); ! if( !path.endsWith( "/" )) ! path+="/"; filename = path+filename; } --- 247,252 ---- return; ! if( full_path ){ ! QString path=ACTIVE_FUNC->files()->vfs_getOrigin().path(1); filename = path+filename; } *************** *** 262,268 **** // directory list functions ! void KRslots::allFilter() { ACTIVE_PANEL->setFilter(KrView::All); } ! void KRslots::execFilter() { ACTIVE_PANEL->setFilter(KrView::All); } ! void KRslots::customFilter() { ACTIVE_PANEL->setFilter(KrView::Custom);} void KRslots::markAll() { ACTIVE_PANEL->select(true,true); } void KRslots::unmarkAll() { ACTIVE_PANEL->select(false,true); } --- 259,265 ---- // directory list functions ! void KRslots::allFilter() { ACTIVE_PANEL->setFilter(KrView::All); } ! void KRslots::execFilter() { ACTIVE_PANEL->setFilter(KrView::All); } ! void KRslots::customFilter() { ACTIVE_PANEL->setFilter(KrView::Custom); } void KRslots::markAll() { ACTIVE_PANEL->select(true,true); } void KRslots::unmarkAll() { ACTIVE_PANEL->select(false,true); } *************** *** 271,276 **** void KRslots::invert() { ACTIVE_PANEL->invertSelection(); } ! void KRslots::root() { ACTIVE_FUNC->openUrl("/"); } ! void KRslots::refresh(QString p){ ACTIVE_FUNC->openUrl(p); } void KRslots::home() { ACTIVE_FUNC->openUrl(QDir::homeDirPath()); } void KRslots::refresh() { ACTIVE_FUNC->refresh(); } --- 268,273 ---- void KRslots::invert() { ACTIVE_PANEL->invertSelection(); } ! void KRslots::root() { ACTIVE_FUNC->openUrl(KURL::fromPathOrURL("/"));} ! void KRslots::refresh(const KURL& u){ ACTIVE_FUNC->openUrl(u); } void KRslots::home() { ACTIVE_FUNC->openUrl(QDir::homeDirPath()); } void KRslots::refresh() { ACTIVE_FUNC->refresh(); } *************** *** 321,325 **** if (host==QString::null) return; // otherwise, attempt a connection ! ACTIVE_FUNC->openUrl(host); } --- 318,322 ---- if (host==QString::null) return; // otherwise, attempt a connection ! ACTIVE_FUNC->openUrl(KURL::fromPathOrURL(host)); } *************** *** 386,391 **** KShellProcess proc; proc << "kdesu" << QString("'") + KCmdLineArgs::appName() + ! " --left=" +MAIN_VIEW->left->func->files()->vfs_getOrigin() + ! " --right="+MAIN_VIEW->right->func->files()->vfs_getOrigin() + "'"; proc.start(KProcess::DontCare); --- 383,388 ---- KShellProcess proc; proc << "kdesu" << QString("'") + KCmdLineArgs::appName() + ! " --left=" +MAIN_VIEW->left->func->files()->vfs_getOrigin().url() + ! " --right="+MAIN_VIEW->right->func->files()->vfs_getOrigin().url() + "'"; proc.start(KProcess::DontCare); *************** *** 394,400 **** // settings slots void KRslots::configToolbar(){ ! KEditToolbar dlg(krApp->factory());//actionCollection()); ! if (dlg.exec()) ! krApp->updateGUI(); } --- 391,396 ---- // settings slots void KRslots::configToolbar(){ ! KEditToolbar dlg(krApp->factory()); ! if (dlg.exec()) krApp->updateGUI(); } *************** *** 443,447 **** /* KURL::fromPathOrURL requires fullpath, so we check whether it is relative */ if ( !dest.contains( ":/" ) && !dest.startsWith( "/" ) ) ! dest = ACTIVE_FUNC->files()->vfs_getOrigin() + "/" + dest; /* it's full path now */ KrViewer::view( KURL::fromPathOrURL(dest) ); // view the file --- 439,443 ---- /* KURL::fromPathOrURL requires fullpath, so we check whether it is relative */ if ( !dest.contains( ":/" ) && !dest.startsWith( "/" ) ) ! dest = ACTIVE_FUNC->files()->vfs_getOrigin().prettyURL(1)+dest; /* it's full path now */ KrViewer::view( KURL::fromPathOrURL(dest) ); // view the file *************** *** 460,464 **** /* KURL::fromPathOrURL requires fullpath, so we check whether it is relative */ if ( !dest.contains( ":/" ) && !dest.startsWith( "/" ) ) ! dest = ACTIVE_FUNC->files()->vfs_getOrigin() + "/" + dest; /* it's full path now */ krConfig->setGroup( "General" ); --- 456,460 ---- /* KURL::fromPathOrURL requires fullpath, so we check whether it is relative */ if ( !dest.contains( ":/" ) && !dest.startsWith( "/" ) ) ! dest = ACTIVE_FUNC->files()->vfs_getOrigin().prettyURL(1) + dest; /* it's full path now */ krConfig->setGroup( "General" ); *************** *** 514,518 **** } ! QString fileName = ACTIVE_FUNC->files()->vfs_getFile(name); if( fileName == QString::null ) return; --- 510,514 ---- } ! QString fileName = ACTIVE_FUNC->files()->vfs_getFile(name).path(-1); if( fileName == QString::null ) return; *************** *** 523,527 **** } ! QString destDir = ACTIVE_PANEL->otherPanel->func->files()->vfs_getOrigin(); SplitterGUI splitterGUI( MAIN_VIEW, fileName, destDir ); --- 519,523 ---- } ! QString destDir = ACTIVE_PANEL->otherPanel->func->files()->vfs_getOrigin().path(-1); SplitterGUI splitterGUI( MAIN_VIEW, fileName, destDir ); *************** *** 553,557 **** for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { ! QString name = ACTIVE_FUNC->files()->vfs_getFile(*it); if( name == QString::null ) return; --- 549,553 ---- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { ! QString name = ACTIVE_FUNC->files()->vfs_getFile(*it).path(-1); if( name == QString::null ) return; Index: krslots.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krslots.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** krslots.h 6 Dec 2003 13:56:17 -0000 1.18 --- krslots.h 9 Dec 2003 23:05:56 -0000 1.19 *************** *** 80,84 **** void invert(); void refresh(); ! void refresh( QString p ); void properties(); void back(); --- 80,84 ---- void invert(); void refresh(); ! void refresh( const KURL& u ); void properties(); void back(); |
From: <ya...@us...> - 2003-12-09 23:05:59
|
Update of /cvsroot/krusader/krusader_kde3/doc/pics In directory sc8-pr-cvs1:/tmp/cvs-serv10473/doc/pics Modified Files: Makefile.am Log Message: moving from QString to KURL and code clean up Index: Makefile.am =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/doc/pics/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 14 Nov 2003 16:00:07 -0000 1.2 --- Makefile.am 9 Dec 2003 23:05:56 -0000 1.3 *************** *** 2,6 **** ! EXTRA_DIST = bookmanadd.png bookmanedit.png cmdline.png fnkeys.png kgadvanced.png kgarchives.png kggeneral.png kglookfeel.png kgstartup.png krusader1.png listpanel.png mainwindow.png mountman.png remoteman.png search_advanced.png search_general.png terminalEmu.png toolbar.png tabbed_browsing.png krusader_title.png install-data-local: --- 2,6 ---- ! EXTRA_DIST = bookmanadd.png bookmanedit.png cmdline.png fnkeys.png kgadvanced.png kgarchives.png kggeneral.png kglookfeel.png kgstartup.png krusader1.png listpanel.png mainwindow.png mountman.png remoteman.png search_advanced.png search_general.png terminalEmu.png toolbar.png tabbed_browsing.png krusader_title.png install-data-local: *************** *** 41,49 **** $(mkinstalldirs) $(kde_htmldir)/en/krusader/ $(INSTALL_DATA) $(srcdir)/toolbar.png $(kde_htmldir)/en/krusader/toolbar.png - $(mkinstalldirs) $(kde_htmldir)/en/krusader/ - $(INSTALL_DATA) $(srcdir)/krusader_title.png $(kde_htmldir)/en/krusader/krusader_title.png - $(mkinstalldirs) $(kde_htmldir)/en/krusader/ - $(INSTALL_DATA) $(srcdir)/tabbed_browsing.png $(kde_htmldir)/en/krusader/tabbed_browsing.png - uninstall-local: --- 41,44 ---- |
From: <ya...@us...> - 2003-12-09 23:05:59
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1:/tmp/cvs-serv10473 Modified Files: krusader.kdevprj Log Message: moving from QString to KURL and code clean up Index: krusader.kdevprj =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader.kdevprj,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** krusader.kdevprj 9 Dec 2003 18:21:02 -0000 1.39 --- krusader.kdevprj 9 Dec 2003 23:05:56 -0000 1.40 *************** *** 23,38 **** cppflags=-DKDE_NO_COMPAT -D_LARGEFILE64_SOURCE cxxflags=\s-O0 -Wall ! ldadd=VFS/libVFS.a KViewer/libKViewer.a Dialogs/libDialogs.a BookMan/libBookMan.a UserMenu/libUserMenu.a $(LIB_KPARTS) $(LIB_KFILE) $(LIB_KHTML) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) ! ldflags=\s \s [General] ! AMChanged=true author=Shie Erlich & Rafi Yanai configure_args=\s--build=i386-linux --host=i386-linux --target=i386-linux --prefix=/usr\s email= kdevprj_version=1.3 ! lfv_open_groups=Others,Sources make_options=\s-j1 ! makefiles=Makefile.am,krusader/Makefile.am,doc/Makefile.am,doc/en/Makefile.am,po/Makefile.am,pics/Makefile.am,doc/pics/Makefile.am,krusader/BookMan/Makefile.am,krusader/Dialogs/Makefile.am,krusader/GUI/Makefile.am,krusader/Konfigurator/Makefile.am,krusader/KViewer/Makefile.am,krusader/MountMan/Makefile.am,krusader/Panel/Makefile.am,krusader/RemoteMan/Makefile.am,krusader/VFS/Makefile.am,krusader/Search/Makefile.am,krusader/Splitter/Makefile.am,krusader/UserMenu/Makefile.am modifyMakefiles=true project_name=Krusader --- 23,38 ---- cppflags=-DKDE_NO_COMPAT -D_LARGEFILE64_SOURCE cxxflags=\s-O0 -Wall ! ldadd=VFS/libVFS.a KViewer/libKViewer.a Dialogs/libDialogs.a BookMan/libBookMan.a $(LIB_KPARTS) $(LIB_KFILE) $(LIB_KHTML) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) ! ldflags=\s \s [General] ! AMChanged=false author=Shie Erlich & Rafi Yanai configure_args=\s--build=i386-linux --host=i386-linux --target=i386-linux --prefix=/usr\s email= kdevprj_version=1.3 ! lfv_open_groups= make_options=\s-j1 ! makefiles=Makefile.am,krusader/Makefile.am,doc/Makefile.am,doc/en/Makefile.am,po/Makefile.am,pics/Makefile.am,doc/pics/Makefile.am,krusader/BookMan/Makefile.am,krusader/Dialogs/Makefile.am,krusader/GUI/Makefile.am,krusader/Konfigurator/Makefile.am,krusader/KViewer/Makefile.am,krusader/MountMan/Makefile.am,krusader/Panel/Makefile.am,krusader/RemoteMan/Makefile.am,krusader/VFS/Makefile.am,krusader/Search/Makefile.am,krusader/Splitter/Makefile.am modifyMakefiles=true project_name=Krusader *************** *** 730,734 **** [krusader/Makefile.am] files=krusader/krusader.desktop,krusader/lo32-app-krusader.png,krusader/lo16-app-krusader.png,krusader/defaults.h,krusader/kicons.cpp,krusader/kicons.h,krusader/krslots.cpp,krusader/krslots.h,krusader/krusader.cpp,krusader/krusader.h,krusader/krusaderui.rc,krusader/krusaderview.cpp,krusader/krusaderview.h,krusader/lo32-app-krusader2.png,krusader/main.cpp,krusader/resources.h,krusader/x-ace.desktop,krusader/krservices.cpp,krusader/krservices.h,krusader/panelmanager.cpp,krusader/panelmanager.h,krusader/paneltabbar.cpp,krusader/paneltabbar.h ! sub_dirs=BookMan,Dialogs,GUI,Konfigurator,KViewer,MountMan,Panel,RemoteMan,VFS,Search,Splitter,UserMenu type=prog_main --- 730,734 ---- [krusader/Makefile.am] files=krusader/krusader.desktop,krusader/lo32-app-krusader.png,krusader/lo16-app-krusader.png,krusader/defaults.h,krusader/kicons.cpp,krusader/kicons.h,krusader/krslots.cpp,krusader/krslots.h,krusader/krusader.cpp,krusader/krusader.h,krusader/krusaderui.rc,krusader/krusaderview.cpp,krusader/krusaderview.h,krusader/lo32-app-krusader2.png,krusader/main.cpp,krusader/resources.h,krusader/x-ace.desktop,krusader/krservices.cpp,krusader/krservices.h,krusader/panelmanager.cpp,krusader/panelmanager.h,krusader/paneltabbar.cpp,krusader/paneltabbar.h ! sub_dirs=BookMan,Dialogs,GUI,Konfigurator,KViewer,MountMan,Panel,RemoteMan,VFS,Search,Splitter type=prog_main *************** *** 987,1011 **** type=HEADER - [krusader/UserMenu/Makefile.am] - files=krusader/UserMenu/usermenu.cpp,krusader/UserMenu/usermenu.h - sharedlib_LDFLAGS=-version-info 0:0:0 - sharedlib_rootname=UserMenu - sub_dirs= - type=static_library - - [krusader/UserMenu/usermenu.cpp] - dist=true - install=false - install_location= - type=SOURCE - - [krusader/UserMenu/usermenu.h] - dist=true - install=false - install_location= - type=HEADER - [krusader/VFS/Makefile.am] ! files=krusader/VFS/arc_vfs.cpp,krusader/VFS/arc_vfs.h,krusader/VFS/ftp_vfs.cpp,krusader/VFS/ftp_vfs.h,krusader/VFS/krarchandler.cpp,krusader/VFS/krarchandler.h,krusader/VFS/krdirwatch.cpp,krusader/VFS/krdirwatch.h,krusader/VFS/krpermhandler.cpp,krusader/VFS/krpermhandler.h,krusader/VFS/normal_vfs.cpp,krusader/VFS/normal_vfs.h,krusader/VFS/temp_vfs.cpp,krusader/VFS/temp_vfs.h,krusader/VFS/vfile.cpp,krusader/VFS/vfile.h,krusader/VFS/vfs.cpp,krusader/VFS/vfs.h sharedlib_LDFLAGS=-version-info 0:0:0 sharedlib_rootname=VFS --- 987,992 ---- type=HEADER [krusader/VFS/Makefile.am] ! files=krusader/VFS/ftp_vfs.cpp,krusader/VFS/ftp_vfs.h,krusader/VFS/krarchandler.cpp,krusader/VFS/krarchandler.h,krusader/VFS/krdirwatch.cpp,krusader/VFS/krdirwatch.h,krusader/VFS/krpermhandler.cpp,krusader/VFS/krpermhandler.h,krusader/VFS/normal_vfs.cpp,krusader/VFS/normal_vfs.h,krusader/VFS/temp_vfs.cpp,krusader/VFS/temp_vfs.h,krusader/VFS/vfile.cpp,krusader/VFS/vfile.h,krusader/VFS/vfs.cpp,krusader/VFS/vfs.h,krusader/VFS/virt_vfs.cpp,krusader/VFS/virt_vfs.h,krusader/VFS/krvfshandler.cpp,krusader/VFS/krvfshandler.h sharedlib_LDFLAGS=-version-info 0:0:0 sharedlib_rootname=VFS *************** *** 1013,1017 **** type=static_library ! [krusader/VFS/arc_vfs.cpp] dist=true install=false --- 994,998 ---- type=static_library ! [krusader/VFS/ftp_vfs.cpp] dist=true install=false *************** *** 1019,1023 **** type=SOURCE ! [krusader/VFS/arc_vfs.h] dist=true install=false --- 1000,1004 ---- type=SOURCE ! [krusader/VFS/ftp_vfs.h] dist=true install=false *************** *** 1025,1029 **** type=HEADER ! [krusader/VFS/ftp_vfs.cpp] dist=true install=false --- 1006,1010 ---- type=HEADER ! [krusader/VFS/krarchandler.cpp] dist=true install=false *************** *** 1031,1035 **** type=SOURCE ! [krusader/VFS/ftp_vfs.h] dist=true install=false --- 1012,1016 ---- type=SOURCE ! [krusader/VFS/krarchandler.h] dist=true install=false *************** *** 1037,1041 **** type=HEADER ! [krusader/VFS/krarchandler.cpp] dist=true install=false --- 1018,1022 ---- type=HEADER ! [krusader/VFS/krdirwatch.cpp] dist=true install=false *************** *** 1043,1047 **** type=SOURCE ! [krusader/VFS/krarchandler.h] dist=true install=false --- 1024,1028 ---- type=SOURCE ! [krusader/VFS/krdirwatch.h] dist=true install=false *************** *** 1049,1053 **** type=HEADER ! [krusader/VFS/krdirwatch.cpp] dist=true install=false --- 1030,1034 ---- type=HEADER ! [krusader/VFS/krpermhandler.cpp] dist=true install=false *************** *** 1055,1059 **** type=SOURCE ! [krusader/VFS/krdirwatch.h] dist=true install=false --- 1036,1040 ---- type=SOURCE ! [krusader/VFS/krpermhandler.h] dist=true install=false *************** *** 1061,1065 **** type=HEADER ! [krusader/VFS/krpermhandler.cpp] dist=true install=false --- 1042,1046 ---- type=HEADER ! [krusader/VFS/krvfshandler.cpp] dist=true install=false *************** *** 1067,1071 **** type=SOURCE ! [krusader/VFS/krpermhandler.h] dist=true install=false --- 1048,1052 ---- type=SOURCE ! [krusader/VFS/krvfshandler.h] dist=true install=false *************** *** 1116,1119 **** --- 1097,1112 ---- [krusader/VFS/vfs.h] + dist=true + install=false + install_location= + type=HEADER + + [krusader/VFS/virt_vfs.cpp] + dist=true + install=false + install_location= + type=SOURCE + + [krusader/VFS/virt_vfs.h] dist=true install=false |
From: <er...@us...> - 2003-12-09 21:26:47
|
Update of /cvsroot/krusader/krusader_kde3/krusader/UserMenu In directory sc8-pr-cvs1:/tmp/cvs-serv23029/krusader/UserMenu Modified Files: usermenu.cpp Log Message: Index: usermenu.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/UserMenu/usermenu.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** usermenu.cpp 6 Dec 2003 16:59:57 -0000 1.2 --- usermenu.cpp 9 Dec 2003 21:26:44 -0000 1.3 *************** *** 1,9 **** /*************************************************************************** ! usermenu.cpp - description ! ------------------- ! begin : Sat Dec 6 2003 ! copyright : (C) 2003 by Shie Erlich & Rafi Yanai ! email : ! ***************************************************************************/ /*************************************************************************** --- 1,9 ---- /*************************************************************************** ! usermenu.cpp - description ! ------------------- ! begin : Sat Dec 6 2003 ! copyright : (C) 2003 by Shie Erlich & Rafi Yanai ! email : ! ***************************************************************************/ /*************************************************************************** *************** *** 21,37 **** #include "../Panel/listpanel.h" #include <kdebug.h> /** ! Command: %xYYY% x - can be either 'a' for active panel, or 'o' for other panel YYY - the specific command ! For example: %ap% - active panel path %op% - other panel path ! In the following commands, we'll use '_' instead of 'a'/'o'. Please substitute as needed. ! %_p% - panel path %_c% - current file (or folder). Note: current != selected --- 21,38 ---- #include "../Panel/listpanel.h" #include <kdebug.h> + #include <kstandarddirs.h> /** ! Command: %xYYY% x - can be either 'a' for active panel, or 'o' for other panel YYY - the specific command ! For example: %ap% - active panel path %op% - other panel path ! In the following commands, we'll use '_' instead of 'a'/'o'. Please substitute as needed. ! %_p% - panel path %_c% - current file (or folder). Note: current != selected *************** *** 45,63 **** %_and% - number of folders %_fm% - filter mask (for example: *, *.cpp, *.h etc.) ! */ ! UMCmd UserMenu::_expressions[NUM_EXPS] = { ! {"%_p%", expPath} ! }; #define ACTIVE krApp->mainView->activePanel #define OTHER krApp->mainView->activePanel->otherPanel ! QString UserMenu::expPath(const QString& str) { ! if (str.lower() == "%ap%") { ! return ACTIVE->virtualPath; ! } else if (str.lower() == "%op%") { ! return OTHER->virtualPath; ! } else return QString::null; } --- 46,64 ---- %_and% - number of folders %_fm% - filter mask (for example: *, *.cpp, *.h etc.) ! */ ! UMCmd UserMenu::_expressions[ NUM_EXPS ] = { ! {"%_p%", expPath} ! }; #define ACTIVE krApp->mainView->activePanel #define OTHER krApp->mainView->activePanel->otherPanel ! QString UserMenu::expPath( const QString& str ) { ! if ( str.lower() == "%ap%" ) { ! return ACTIVE->virtualPath; ! } else if ( str.lower() == "%op%" ) { ! return OTHER->virtualPath; ! } else return QString::null; } *************** *** 67,85 **** */ QString UserMenu::exec() { ! // execute menu and wait for selection ! int idx = _popup.exec(); ! if (idx == -1) return QString::null; // nothing was selected ! if (idx == 0) return QString::null; // todo: insert gui here ! ! // idx is {1..n} while _entries is {0..n-1}X2 ! // so, normalize idx to _entries, and add 1 since we want ! // the command part of the {description,command} pair ! QString cmd = _entries[(idx-1)*2 + 1]; ! // replace %% and prepare string ! //cmd = expand(cmd); ! //kdWarning() << "expanded " << cmd << endl; ! return cmd; } --- 68,79 ---- */ QString UserMenu::exec() { ! // execute menu and wait for selection ! QString cmd = _popup.run(); ! // replace %% and prepare string ! //cmd = expand(cmd); ! //kdWarning() << "expanded " << cmd << endl; ! return cmd; } *************** *** 88,134 **** * data from krusader. return the expanded string */ ! QString UserMenu::expand(QString str) { ! QString result; ! int beg, end; ! unsigned int idx = 0; ! while (idx < str.length()) { ! if ((beg = str.find('%', idx)) == -1) break; ! if ((end = str.find('%', beg+1)) == -1) { ! kdWarning() << "Error: unterminated % in UserMenu::expand" << endl; ! return QString::null; ! } ! kdWarning() << str.mid(beg, end-beg+1) << endl; ! idx = end+1; ! } } ! UserMenu::UserMenu(QWidget *parent, const char *name ) : QWidget(parent,name) { ! _popup.insertTitle("User Menu"); ! // read entries from config file. Note: entries are marked 1..n, so that entry 0 is always ! // available. It is used by the "add new entry" command. ! ///////// for now, create a dummy list ! _entries += "ll in active"; ! _entries += "ll %ap%"; ! _entries += "ll in active to file"; ! _entries += "ll %ap% > /tmp/list.txt"; ! // fill popup menu. Note: this code assumes that the _entries list contains pairs ! // of {descripion, command}. If this is not the case, the code will fail. ! // However, it should have been checked above (read entries from file) ! int idx = 1; ! for ( QStringList::Iterator it = _entries.begin(); it != _entries.end(); ++it ) { ! _popup.insertItem(*it, idx++); ! ++it; ! } ! // add the "add new entry" command ! _popup.insertSeparator(); ! _popup.insertItem("Add new entry", 0); } ! UserMenu::~UserMenu() { } --- 82,161 ---- * data from krusader. return the expanded string */ ! QString UserMenu::expand( QString str ) { ! QString result; ! int beg, end; ! unsigned int idx = 0; ! while ( idx < str.length() ) { ! if ( ( beg = str.find( '%', idx ) ) == -1 ) break; ! if ( ( end = str.find( '%', beg + 1 ) ) == -1 ) { ! kdWarning() << "Error: unterminated % in UserMenu::expand" << endl; ! return QString::null; ! } ! kdWarning() << str.mid( beg, end - beg + 1 ) << endl; ! idx = end + 1; ! } } ! UserMenu::UserMenu( QWidget *parent, const char *name ) : QWidget( parent, name ) {} ! UserMenu::~UserMenu() {} ! ////////////////////////////////////////////////////////////////////////////////////////////////////// ! ////////////////////////////////////////////////////////////////////////////////////////////////////// ! ////////////////////////////////////////////////////////////////////////////////////////////////////// ! UserMenuGui::UserMenuGui( QWidget *parent ) : KPopupMenu( parent ) { ! insertTitle( "User Menu" ); ! // read entries from config file. ! readEntries(); ! ! ! // fill popup menu. Note: this code assumes that the _entries list contains pairs ! // of {descripion, command}. If this is not the case, the code will fail. ! // However, it should have been checked above (read entries from file) ! int idx = 1; ! for ( QStringList::Iterator it = _entries.begin(); it != _entries.end(); ++it ) { ! insertItem( *it, idx++ ); ! ++it; ! } ! ! // add the "add new entry" command ! insertSeparator(); ! insertItem( "Add new entry", 0 ); } ! void UserMenuGui::readEntries() { ! // Note: entries are marked 1..n, so that entry 0 is always ! // available. It is used by the "add new entry" command. ! QString filename = locateLocal( "data", "krusader/krusermenu.dat" ); ! int i = 0; ! ! QFile file( filename ); ! if ( file.open( IO_ReadOnly ) ) { ! QTextStream stream( &file ); ! QString line; ! ! while ( !stream.atEnd() ) { ! line = stream.readLine(); ! _entries += line; ! ++i; ! } ! file.close(); ! } ! // do we need to remove last entry? ! if (i>0 && i%2 != 0) _entries.pop_back(); ! } + QString UserMenuGui::run() { + int idx = exec(); + if ( idx == -1 ) return QString::null; // nothing was selected + if ( idx == 0 ) return QString::null; // todo: insert gui here + + // idx is {1..n} while _entries is {0..n-1}X2 + // so, normalize idx to _entries, and add 1 since we want + // the command part of the {description,command} pair + return _entries[ ( idx -1 ) * 2 + 1 ]; + } |
From: <er...@us...> - 2003-12-09 21:26:26
|
Update of /cvsroot/krusader/krusader_kde3/krusader/UserMenu In directory sc8-pr-cvs1:/tmp/cvs-serv22999/krusader/UserMenu Modified Files: usermenu.h Log Message: Index: usermenu.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/UserMenu/usermenu.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** usermenu.h 6 Dec 2003 17:00:23 -0000 1.2 --- usermenu.h 9 Dec 2003 21:26:22 -0000 1.3 *************** *** 22,25 **** --- 22,41 ---- #include <kpopupmenu.h> #include <qstringlist.h> + #include <kaction.h> + + class UserMenuGui: public KPopupMenu { + Q_OBJECT + public: + UserMenuGui(QWidget *parent=0); + QString run(); + + protected: + void readEntries(); + + private: + QStringList _entries; + }; + + //////////////////////////////////////////////////////////////////////////////// // an expander is a function that receives a QString input, expands *************** *** 47,52 **** private: ! KPopupMenu _popup; ! QStringList _entries; static UMCmd _expressions[NUM_EXPS]; }; --- 63,67 ---- private: ! UserMenuGui _popup; static UMCmd _expressions[NUM_EXPS]; }; |
From: <er...@us...> - 2003-12-09 18:21:06
|
Update of /cvsroot/krusader/krusader_kde3/krusader In directory sc8-pr-cvs1:/tmp/cvs-serv17221/krusader Modified Files: Makefile.am Log Message: add usermenu Index: Makefile.am =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile.am 29 Nov 2003 11:09:24 -0000 1.9 --- Makefile.am 9 Dec 2003 18:21:02 -0000 1.10 *************** *** 5,11 **** krusader_SOURCES = paneltabbar.cpp panelmanager.cpp krservices.cpp main.cpp krusaderview.cpp krusader.cpp krslots.cpp kicons.cpp ! krusader_LDADD = ./BookMan/libBookMan.a ./Dialogs/libDialogs.a ./GUI/libGUI.a ./Konfigurator/libKonfigurator.a ./KViewer/libKViewer.a ./MountMan/libMountMan.a ./Panel/libPanel.a ./RemoteMan/libRemoteMan.a ./VFS/libVFS.a ./Search/libSearch.a ./Splitter/libSplitter.a VFS/libVFS.a KViewer/libKViewer.a Dialogs/libDialogs.a BookMan/libBookMan.a $(LIB_KPARTS) $(LIB_KFILE) $(LIB_KHTML) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) $(LIBSOCKET) ! SUBDIRS = BookMan Dialogs GUI Konfigurator KViewer MountMan Panel RemoteMan VFS Search Splitter EXTRA_DIST = krusader.desktop lo32-app-krusader.png lo16-app-krusader.png defaults.h kicons.cpp kicons.h krslots.cpp krslots.h krusader.cpp krusader.h krusaderui.rc krusaderview.cpp krusaderview.h lo32-app-krusader2.png main.cpp resources.h x-ace.desktop krservices.cpp krservices.h panelmanager.cpp panelmanager.h paneltabbar.cpp paneltabbar.h --- 5,11 ---- krusader_SOURCES = paneltabbar.cpp panelmanager.cpp krservices.cpp main.cpp krusaderview.cpp krusader.cpp krslots.cpp kicons.cpp ! krusader_LDADD = ./BookMan/libBookMan.a ./Dialogs/libDialogs.a ./GUI/libGUI.a ./Konfigurator/libKonfigurator.a ./KViewer/libKViewer.a ./MountMan/libMountMan.a ./Panel/libPanel.a ./RemoteMan/libRemoteMan.a ./VFS/libVFS.a ./Search/libSearch.a ./Splitter/libSplitter.a ./UserMenu/libUserMenu.a VFS/libVFS.a KViewer/libKViewer.a Dialogs/libDialogs.a BookMan/libBookMan.a UserMenu/libUserMenu.a $(LIB_KPARTS) $(LIB_KFILE) $(LIB_KHTML) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) $(LIBSOCKET) ! SUBDIRS = BookMan Dialogs GUI Konfigurator KViewer MountMan Panel RemoteMan VFS Search Splitter UserMenu EXTRA_DIST = krusader.desktop lo32-app-krusader.png lo16-app-krusader.png defaults.h kicons.cpp kicons.h krslots.cpp krslots.h krusader.cpp krusader.h krusaderui.rc krusaderview.cpp krusaderview.h lo32-app-krusader2.png main.cpp resources.h x-ace.desktop krservices.cpp krservices.h panelmanager.cpp panelmanager.h paneltabbar.cpp paneltabbar.h |
From: <er...@us...> - 2003-12-09 18:21:06
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1:/tmp/cvs-serv17221 Modified Files: krusader.kdevprj Log Message: add usermenu Index: krusader.kdevprj =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader.kdevprj,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** krusader.kdevprj 9 Dec 2003 16:54:20 -0000 1.38 --- krusader.kdevprj 9 Dec 2003 18:21:02 -0000 1.39 *************** *** 23,28 **** cppflags=-DKDE_NO_COMPAT -D_LARGEFILE64_SOURCE cxxflags=\s-O0 -Wall ! ldadd=VFS/libVFS.a KViewer/libKViewer.a Dialogs/libDialogs.a BookMan/libBookMan.a $(LIB_KPARTS) $(LIB_KFILE) $(LIB_KHTML) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) ! ldflags=\s \s [General] --- 23,28 ---- cppflags=-DKDE_NO_COMPAT -D_LARGEFILE64_SOURCE cxxflags=\s-O0 -Wall ! ldadd=VFS/libVFS.a KViewer/libKViewer.a Dialogs/libDialogs.a BookMan/libBookMan.a UserMenu/libUserMenu.a $(LIB_KPARTS) $(LIB_KFILE) $(LIB_KHTML) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) ! ldflags=\s \s [General] |
From: <kru...@us...> - 2003-12-09 16:54:52
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1:/tmp/cvs-serv32414 Modified Files: Krusader.kdevelop Log Message: Index: Krusader.kdevelop =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/Krusader.kdevelop,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Krusader.kdevelop 29 Sep 2003 19:34:44 -0000 1.16 --- Krusader.kdevelop 9 Dec 2003 16:54:48 -0000 1.17 *************** *** 3,21 **** <general> <author>Shie Erlich and Rafi Yanai</author> ! <email/> <version>1.20</version> <projectmanagement>KDevAutoProject</projectmanagement> <primarylanguage>C++</primarylanguage> <ignoreparts> <part>KDevClearCase</part> <part>KDevFileGroups</part> <part>KDevdistpart</part> <part>KDevPerforce</part> - <part>KDevBookmarks</part> - <part>KDevVisualBoyAdvance</part> </ignoreparts> <projectdirectory>.</projectdirectory> <absoluteprojectpath>false</absoluteprojectpath> ! <description/> </general> <kdevautoproject> --- 3,21 ---- <general> <author>Shie Erlich and Rafi Yanai</author> ! <email></email> <version>1.20</version> <projectmanagement>KDevAutoProject</projectmanagement> <primarylanguage>C++</primarylanguage> <ignoreparts> + <part>KDevBookmarks</part> <part>KDevClearCase</part> <part>KDevFileGroups</part> <part>KDevdistpart</part> <part>KDevPerforce</part> </ignoreparts> <projectdirectory>.</projectdirectory> <absoluteprojectpath>false</absoluteprojectpath> ! <description></description> ! <secondaryLanguages/> </general> <kdevautoproject> *************** *** 25,34 **** </general> <run> ! <mainprogram>./krusader/krusader</mainprogram> ! <programargs/> <terminal>false</terminal> <envvars/> <autocompile>true</autocompile> <directoryradio>executable</directoryradio> </run> <make> --- 25,35 ---- </general> <run> ! <mainprogram>krusader/krusader</mainprogram> ! <programargs></programargs> <terminal>false</terminal> <envvars/> <autocompile>true</autocompile> <directoryradio>executable</directoryradio> + <customdirectory>/</customdirectory> </run> <make> *************** *** 40,44 **** <numberofjobs>2</numberofjobs> <dontact>false</dontact> ! <makebin/> </make> </kdevautoproject> --- 41,45 ---- <numberofjobs>2</numberofjobs> <dontact>false</dontact> ! <makebin></makebin> </make> </kdevautoproject> *************** *** 46,55 **** <general> <dbgshell>libtool</dbgshell> ! <programargs/> ! <gdbpath/> <breakonloadinglibs>true</breakonloadinglibs> <separatetty>false</separatetty> <floatingtoolbar>false</floatingtoolbar> <runappinappdirectory>true</runappinappdirectory> </general> <display> --- 47,59 ---- <general> <dbgshell>libtool</dbgshell> ! <programargs></programargs> ! <gdbpath></gdbpath> <breakonloadinglibs>true</breakonloadinglibs> <separatetty>false</separatetty> <floatingtoolbar>false</floatingtoolbar> <runappinappdirectory>true</runappinappdirectory> + <configGdbScript></configGdbScript> + <runShellScript></runShellScript> + <runGdbScript></runGdbScript> </general> <display> *************** *** 68,74 **** <kdevdoctreeview> <projectdoc> ! <userdocDir>/home/shie/krusader_kde3/html/</userdocDir> ! <apidocDir>/home/shie/krusader_kde3/html/</apidocDir> </projectdoc> </kdevdoctreeview> <cppsupportpart> --- 72,83 ---- <kdevdoctreeview> <projectdoc> ! <userdocDir>html/</userdocDir> ! <apidocDir>html/</apidocDir> </projectdoc> + <ignoreqt_xml/> + <ignoredoxygen/> + <ignorekdocs/> + <ignoretocs/> + <ignoredevhelp/> </kdevdoctreeview> <cppsupportpart> *************** *** 124,128 **** <headerCompletionDelay>250</headerCompletionDelay> </codecompletion> ! <references/> </kdevcppsupport> </kdevelop> --- 133,141 ---- <headerCompletionDelay>250</headerCompletionDelay> </codecompletion> ! <references> ! <pcs>Qt</pcs> ! <pcs>krusader-source</pcs> ! <pcs>KDElibs</pcs> ! </references> </kdevcppsupport> </kdevelop> |
From: <kru...@us...> - 2003-12-09 16:54:23
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1:/tmp/cvs-serv32354 Modified Files: krusader.kdevprj Log Message: Index: krusader.kdevprj =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader.kdevprj,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** krusader.kdevprj 30 Nov 2003 13:14:26 -0000 1.37 --- krusader.kdevprj 9 Dec 2003 16:54:20 -0000 1.38 *************** *** 27,31 **** [General] ! AMChanged=false author=Shie Erlich & Rafi Yanai configure_args=\s--build=i386-linux --host=i386-linux --target=i386-linux --prefix=/usr\s --- 27,31 ---- [General] ! AMChanged=true author=Shie Erlich & Rafi Yanai configure_args=\s--build=i386-linux --host=i386-linux --target=i386-linux --prefix=/usr\s *************** *** 34,38 **** lfv_open_groups=Others,Sources make_options=\s-j1 ! makefiles=Makefile.am,krusader/Makefile.am,doc/Makefile.am,doc/en/Makefile.am,po/Makefile.am,pics/Makefile.am,doc/pics/Makefile.am,krusader/BookMan/Makefile.am,krusader/Dialogs/Makefile.am,krusader/GUI/Makefile.am,krusader/Konfigurator/Makefile.am,krusader/KViewer/Makefile.am,krusader/MountMan/Makefile.am,krusader/Panel/Makefile.am,krusader/RemoteMan/Makefile.am,krusader/VFS/Makefile.am,krusader/Search/Makefile.am,krusader/Splitter/Makefile.am modifyMakefiles=true project_name=Krusader --- 34,38 ---- lfv_open_groups=Others,Sources make_options=\s-j1 ! makefiles=Makefile.am,krusader/Makefile.am,doc/Makefile.am,doc/en/Makefile.am,po/Makefile.am,pics/Makefile.am,doc/pics/Makefile.am,krusader/BookMan/Makefile.am,krusader/Dialogs/Makefile.am,krusader/GUI/Makefile.am,krusader/Konfigurator/Makefile.am,krusader/KViewer/Makefile.am,krusader/MountMan/Makefile.am,krusader/Panel/Makefile.am,krusader/RemoteMan/Makefile.am,krusader/VFS/Makefile.am,krusader/Search/Makefile.am,krusader/Splitter/Makefile.am,krusader/UserMenu/Makefile.am modifyMakefiles=true project_name=Krusader *************** *** 730,734 **** [krusader/Makefile.am] files=krusader/krusader.desktop,krusader/lo32-app-krusader.png,krusader/lo16-app-krusader.png,krusader/defaults.h,krusader/kicons.cpp,krusader/kicons.h,krusader/krslots.cpp,krusader/krslots.h,krusader/krusader.cpp,krusader/krusader.h,krusader/krusaderui.rc,krusader/krusaderview.cpp,krusader/krusaderview.h,krusader/lo32-app-krusader2.png,krusader/main.cpp,krusader/resources.h,krusader/x-ace.desktop,krusader/krservices.cpp,krusader/krservices.h,krusader/panelmanager.cpp,krusader/panelmanager.h,krusader/paneltabbar.cpp,krusader/paneltabbar.h ! sub_dirs=BookMan,Dialogs,GUI,Konfigurator,KViewer,MountMan,Panel,RemoteMan,VFS,Search,Splitter type=prog_main --- 730,734 ---- [krusader/Makefile.am] files=krusader/krusader.desktop,krusader/lo32-app-krusader.png,krusader/lo16-app-krusader.png,krusader/defaults.h,krusader/kicons.cpp,krusader/kicons.h,krusader/krslots.cpp,krusader/krslots.h,krusader/krusader.cpp,krusader/krusader.h,krusader/krusaderui.rc,krusader/krusaderview.cpp,krusader/krusaderview.h,krusader/lo32-app-krusader2.png,krusader/main.cpp,krusader/resources.h,krusader/x-ace.desktop,krusader/krservices.cpp,krusader/krservices.h,krusader/panelmanager.cpp,krusader/panelmanager.h,krusader/paneltabbar.cpp,krusader/paneltabbar.h ! sub_dirs=BookMan,Dialogs,GUI,Konfigurator,KViewer,MountMan,Panel,RemoteMan,VFS,Search,Splitter,UserMenu type=prog_main *************** *** 987,990 **** --- 987,1009 ---- type=HEADER + [krusader/UserMenu/Makefile.am] + files=krusader/UserMenu/usermenu.cpp,krusader/UserMenu/usermenu.h + sharedlib_LDFLAGS=-version-info 0:0:0 + sharedlib_rootname=UserMenu + sub_dirs= + type=static_library + + [krusader/UserMenu/usermenu.cpp] + dist=true + install=false + install_location= + type=SOURCE + + [krusader/UserMenu/usermenu.h] + dist=true + install=false + install_location= + type=HEADER + [krusader/VFS/Makefile.am] files=krusader/VFS/arc_vfs.cpp,krusader/VFS/arc_vfs.h,krusader/VFS/ftp_vfs.cpp,krusader/VFS/ftp_vfs.h,krusader/VFS/krarchandler.cpp,krusader/VFS/krarchandler.h,krusader/VFS/krdirwatch.cpp,krusader/VFS/krdirwatch.h,krusader/VFS/krpermhandler.cpp,krusader/VFS/krpermhandler.h,krusader/VFS/normal_vfs.cpp,krusader/VFS/normal_vfs.h,krusader/VFS/temp_vfs.cpp,krusader/VFS/temp_vfs.h,krusader/VFS/vfile.cpp,krusader/VFS/vfile.h,krusader/VFS/vfs.cpp,krusader/VFS/vfs.h *************** *** 1488,1491 **** --- 1507,1528 ---- type=DATA + [pics/kr_combine16x16.png] + dist=true + install=true + install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_combine.png + type=DATA + + [pics/kr_combine22x22.png] + dist=true + install=true + install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_combine.png + type=DATA + + [pics/kr_combine32x32.png] + dist=true + install=true + install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_combine.png + type=DATA + [pics/kr_fullview16x16.png] dist=true *************** *** 1542,1545 **** --- 1579,1600 ---- type=DATA + [pics/kr_split16x16.png] + dist=true + install=true + install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_split.png + type=DATA + + [pics/kr_split22x22.png] + dist=true + install=true + install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_split.png + type=DATA + + [pics/kr_split32x32.png] + dist=true + install=true + install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_split.png + type=DATA + [pics/kr_treeview16x16.png] dist=true *************** *** 1684,1723 **** install=true install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_unselectall.png - type=DATA - - [pics/kr_split16x16.png] - dist=true - install=true - install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_split.png - type=DATA - - [pics/kr_split22x22.png] - dist=true - install=true - install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_split.png - type=DATA - - [pics/kr_split32x32.png] - dist=true - install=true - install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_split.png - type=DATA - - [pics/kr_combine16x16.png] - dist=true - install=true - install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_combine.png - type=DATA - - [pics/kr_combine22x22.png] - dist=true - install=true - install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_combine.png - type=DATA - - [pics/kr_combine32x32.png] - dist=true - install=true - install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_combine.png type=DATA --- 1739,1742 ---- |
From: <kru...@us...> - 2003-12-06 17:00:30
|
Update of /cvsroot/krusader/krusader_kde3/krusader/UserMenu In directory sc8-pr-cvs1:/tmp/cvs-serv5209/krusader/UserMenu Modified Files: usermenu.h Log Message: very basic mechanism is there Index: usermenu.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/UserMenu/usermenu.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** usermenu.h 6 Dec 2003 13:14:28 -0000 1.1 --- usermenu.h 6 Dec 2003 17:00:23 -0000 1.2 *************** *** 4,8 **** begin : Sat Dec 6 2003 copyright : (C) 2003 by Shie Erlich & Rafi Yanai ! email : ***************************************************************************/ --- 4,8 ---- begin : Sat Dec 6 2003 copyright : (C) 2003 by Shie Erlich & Rafi Yanai ! email : ***************************************************************************/ *************** *** 19,55 **** #define USERMENU_H ! /** ! ! Command: %xYYY% ! x - can be either 'a' for active panel, or 'o' for other panel ! YYY - the specific command ! ! For example: ! %ap% - active panel path ! %op% - other panel path ! ! In the following commands, we'll use '_' instead of 'a'/'o'. Please substitute as needed. ! ! %_p% - panel path ! %_c% - current file (or folder). Note: current != selected ! %_s% - selected files and folders ! %_cs% - selected files including current file (if it's not already selected) ! %_afd% - all files and folders ! %_af% - all files (not including folders) ! %_ad% - all folders (not including files) ! %_an% - number of files and folders ! %_anf% - number of files ! %_and% - number of folders ! %_fm% - filter mask (for example: *, *.cpp, *.h etc.) ! */ ! #include <qwidget.h> class UserMenu : public QWidget { Q_OBJECT public: ! UserMenu(QWidget *parent=0, const char *name=0); ~UserMenu(); }; --- 19,53 ---- #define USERMENU_H ! #include <qwidget.h> ! #include <kpopupmenu.h> ! #include <qstringlist.h> ! // an expander is a function that receives a QString input, expands ! // it and returns a new QString output containing the expanded expression ! typedef QString (EXPANDER)(const QString&); ! // a UMCmd is an entry containing the expression and its expanding function ! typedef struct UserMenuCmd { ! QString lc_expression; ! EXPANDER expFunc; ! } UMCmd; class UserMenu : public QWidget { + #define NUM_EXPS 1 + Q_OBJECT public: ! QString exec(); ! UserMenu(QWidget *parent=0, const char *name=0); ~UserMenu(); + + protected: + QString expand(QString str); + QString expPath(const QString& str); + + private: + KPopupMenu _popup; + QStringList _entries; + static UMCmd _expressions[NUM_EXPS]; }; |
From: <kru...@us...> - 2003-12-06 17:00:07
|
Update of /cvsroot/krusader/krusader_kde3/krusader/UserMenu In directory sc8-pr-cvs1:/tmp/cvs-serv5023/krusader/UserMenu Modified Files: usermenu.cpp Log Message: very basic mechanism is there Index: usermenu.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/UserMenu/usermenu.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** usermenu.cpp 6 Dec 2003 13:14:15 -0000 1.1 --- usermenu.cpp 6 Dec 2003 16:59:57 -0000 1.2 *************** *** 17,23 **** #include "usermenu.h" UserMenu::UserMenu(QWidget *parent, const char *name ) : QWidget(parent,name) { } ! UserMenu::~UserMenu(){ } --- 17,134 ---- #include "usermenu.h" + #include "../krusaderview.h" + #include "../krusader.h" + #include "../Panel/listpanel.h" + #include <kdebug.h> + + /** + + Command: %xYYY% + x - can be either 'a' for active panel, or 'o' for other panel + YYY - the specific command + + For example: + %ap% - active panel path + %op% - other panel path + + In the following commands, we'll use '_' instead of 'a'/'o'. Please substitute as needed. + + %_p% - panel path + %_c% - current file (or folder). Note: current != selected + %_s% - selected files and folders + %_cs% - selected files including current file (if it's not already selected) + %_afd% - all files and folders + %_af% - all files (not including folders) + %_ad% - all folders (not including files) + %_an% - number of files and folders + %_anf% - number of files + %_and% - number of folders + %_fm% - filter mask (for example: *, *.cpp, *.h etc.) + + */ + UMCmd UserMenu::_expressions[NUM_EXPS] = { + {"%_p%", expPath} + }; + + #define ACTIVE krApp->mainView->activePanel + #define OTHER krApp->mainView->activePanel->otherPanel + + QString UserMenu::expPath(const QString& str) { + if (str.lower() == "%ap%") { + return ACTIVE->virtualPath; + } else if (str.lower() == "%op%") { + return OTHER->virtualPath; + } else return QString::null; + } + + /** + * only interface function. Executes the menu, does the work and returns a QString + * containing a command to run. Run that command from a shell and that's it. + */ + QString UserMenu::exec() { + // execute menu and wait for selection + int idx = _popup.exec(); + if (idx == -1) return QString::null; // nothing was selected + if (idx == 0) return QString::null; // todo: insert gui here + + // idx is {1..n} while _entries is {0..n-1}X2 + // so, normalize idx to _entries, and add 1 since we want + // the command part of the {description,command} pair + QString cmd = _entries[(idx-1)*2 + 1]; + + // replace %% and prepare string + //cmd = expand(cmd); + //kdWarning() << "expanded " << cmd << endl; + + return cmd; + } + + /** + * cycle through the input line, replacing every %% expression with valid + * data from krusader. return the expanded string + */ + QString UserMenu::expand(QString str) { + QString result; + int beg, end; + unsigned int idx = 0; + while (idx < str.length()) { + if ((beg = str.find('%', idx)) == -1) break; + if ((end = str.find('%', beg+1)) == -1) { + kdWarning() << "Error: unterminated % in UserMenu::expand" << endl; + return QString::null; + } + kdWarning() << str.mid(beg, end-beg+1) << endl; + idx = end+1; + } + } UserMenu::UserMenu(QWidget *parent, const char *name ) : QWidget(parent,name) { + _popup.insertTitle("User Menu"); + + // read entries from config file. Note: entries are marked 1..n, so that entry 0 is always + // available. It is used by the "add new entry" command. + ///////// for now, create a dummy list + _entries += "ll in active"; + _entries += "ll %ap%"; + + _entries += "ll in active to file"; + _entries += "ll %ap% > /tmp/list.txt"; + + // fill popup menu. Note: this code assumes that the _entries list contains pairs + // of {descripion, command}. If this is not the case, the code will fail. + // However, it should have been checked above (read entries from file) + int idx = 1; + for ( QStringList::Iterator it = _entries.begin(); it != _entries.end(); ++it ) { + _popup.insertItem(*it, idx++); + ++it; + } + + // add the "add new entry" command + _popup.insertSeparator(); + _popup.insertItem("Add new entry", 0); } ! ! UserMenu::~UserMenu() { } + + |
From: <kru...@us...> - 2003-12-06 14:25:15
|
Update of /cvsroot/krusader/krusader_kde3/krusader In directory sc8-pr-cvs1:/tmp/cvs-serv12112/krusader Modified Files: krslots.cpp Log Message: Index: krslots.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krslots.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** krslots.cpp 6 Dec 2003 14:23:19 -0000 1.32 --- krslots.cpp 6 Dec 2003 14:25:11 -0000 1.33 *************** *** 602,606 **** void KRslots::userMenu() { ! QString cmd = (new UserMenu())->exec(); } --- 602,607 ---- void KRslots::userMenu() { ! UserMenu um; ! QString cmd = um.exec(); } |
From: <kru...@us...> - 2003-12-06 14:23:22
|
Update of /cvsroot/krusader/krusader_kde3/krusader In directory sc8-pr-cvs1:/tmp/cvs-serv11783/krusader Modified Files: krslots.cpp Log Message: Index: krslots.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krslots.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** krslots.cpp 6 Dec 2003 13:57:08 -0000 1.31 --- krslots.cpp 6 Dec 2003 14:23:19 -0000 1.32 *************** *** 602,609 **** void KRslots::userMenu() { ! UserMenu um(krApp); ! ! um.exec(); ! } --- 602,606 ---- void KRslots::userMenu() { ! QString cmd = (new UserMenu())->exec(); } |
From: <kru...@us...> - 2003-12-06 14:11:55
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Panel In directory sc8-pr-cvs1:/tmp/cvs-serv10094/krusader/Panel Modified Files: listpanel.cpp Log Message: fix: QPopupMenu-->KPopupMenu Index: listpanel.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Panel/listpanel.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** listpanel.cpp 24 Oct 2003 16:39:01 -0000 1.42 --- listpanel.cpp 6 Dec 2003 14:11:50 -0000 1.43 *************** *** 35,43 **** #include <qstrlist.h> #include <qdragobject.h> - #include <qpopupmenu.h> #include <qheader.h> #include <qtimer.h> #include <qregexp.h> // KDE includes #include <kmessagebox.h> #include <klocale.h> --- 35,43 ---- #include <qstrlist.h> #include <qdragobject.h> #include <qheader.h> #include <qtimer.h> #include <qregexp.h> // KDE includes + #include <kpopupmenu.h> #include <kmessagebox.h> #include <klocale.h> *************** *** 494,498 **** KrViewItem *item = items.first(); // create the menu ! QPopupMenu popup, openWith, linkPopup; // the OPEN option - open preferd service popup.insertItem( "Open/Run", OPEN_ID ); // create the open option --- 494,498 ---- KrViewItem *item = items.first(); // create the menu ! KPopupMenu popup, openWith, linkPopup; // the OPEN option - open preferd service popup.insertItem( "Open/Run", OPEN_ID ); // create the open option |
From: <kru...@us...> - 2003-12-06 13:57:11
|
Update of /cvsroot/krusader/krusader_kde3/krusader In directory sc8-pr-cvs1:/tmp/cvs-serv7690/krusader Modified Files: krslots.cpp Log Message: add: foundations for user menu Index: krslots.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krslots.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** krslots.cpp 30 Nov 2003 20:07:39 -0000 1.30 --- krslots.cpp 6 Dec 2003 13:57:08 -0000 1.31 *************** *** 70,73 **** --- 70,74 ---- #include "Splitter/splitter.h" #include "Splitter/combiner.h" + #include "UserMenu/usermenu.h" #define ACTIVE_PANEL (krApp->mainView->activePanel) *************** *** 598,601 **** --- 599,609 ---- if ( combineToOtherPanel ) ACTIVE_PANEL->otherPanel->func->refresh(); + } + + void KRslots::userMenu() { + UserMenu um(krApp); + + um.exec(); + } |
From: <kru...@us...> - 2003-12-06 13:56:54
|
Update of /cvsroot/krusader/krusader_kde3/krusader In directory sc8-pr-cvs1:/tmp/cvs-serv7509/krusader Modified Files: krusader.cpp Log Message: add: foundations for user menu Index: krusader.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krusader.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** krusader.cpp 30 Nov 2003 13:14:26 -0000 1.45 --- krusader.cpp 6 Dec 2003 13:56:51 -0000 1.46 *************** *** 110,113 **** --- 110,114 ---- KAction *Krusader::actSplit = 0; KAction *Krusader::actCombine = 0; + KAction *Krusader::actUserMenu = 0; KToggleAction *Krusader::actToggleTerminal = 0; *************** *** 422,425 **** --- 423,428 ---- actCloseTab = new KAction(i18n("Close tab"), ALT+CTRL+Key_C, SLOTS, SLOT(closeTab()), actionCollection(), "close tab"); + actUserMenu = new KAction(i18n("User Menu"), ALT+CTRL+Key_U, SLOTS, + SLOT(userMenu()), actionCollection(), "user menu"); // and at last we can set the tool-tips actSelect->setToolTip( i18n( "Highlight files by using a filter" ) ); |
From: <kru...@us...> - 2003-12-06 13:56:38
|
Update of /cvsroot/krusader/krusader_kde3/krusader In directory sc8-pr-cvs1:/tmp/cvs-serv7434/krusader Modified Files: krusader.h Log Message: add: foundations for user menu Index: krusader.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krusader.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** krusader.h 29 Nov 2003 12:05:30 -0000 1.15 --- krusader.h 6 Dec 2003 13:56:35 -0000 1.16 *************** *** 100,104 **** static KAction *actKonfigurator, *actToolsSetup, *actBack, *actRoot, *actFind, *actDirUp; static KAction *actSelectColorMask, *actMultiRename, *actAllFilter, *actOpenLeftBm, *actOpenRightBm; ! static KAction *actNewTab, *actDupTab, *actCloseTab, *actSplit, *actCombine; static KToggleAction *actToggleTerminal; KToggleAction *actToggleFnkeys, *actToggleCmdline, *actShowToolBar, *actToggleSwapPanels, --- 100,104 ---- static KAction *actKonfigurator, *actToolsSetup, *actBack, *actRoot, *actFind, *actDirUp; static KAction *actSelectColorMask, *actMultiRename, *actAllFilter, *actOpenLeftBm, *actOpenRightBm; ! static KAction *actNewTab, *actDupTab, *actCloseTab, *actSplit, *actCombine, *actUserMenu; static KToggleAction *actToggleTerminal; KToggleAction *actToggleFnkeys, *actToggleCmdline, *actShowToolBar, *actToggleSwapPanels, *************** *** 172,175 **** --- 172,176 ---- #define krSplit Krusader::App->actSplit #define krCombine Krusader::App->actCombine + #define krUserMenu Krusader::App->actUserMenu #endif |