From b3c8bdcc0d1e4b2ab298847a7902b6d60410a5bc Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Fri, 24 Nov 2017 23:24:09 +0000 Subject: New upstream version 1.2.3.6 --- patch/comercial/rsync-copy-engine.patch | 902 ------------------------------- patch/opensource/KDE-Ultracopier.patch | 290 ---------- patch/opensource/options-with-pass.patch | 336 ------------ 3 files changed, 1528 deletions(-) delete mode 100644 patch/comercial/rsync-copy-engine.patch delete mode 100644 patch/opensource/KDE-Ultracopier.patch delete mode 100644 patch/opensource/options-with-pass.patch (limited to 'patch') diff --git a/patch/comercial/rsync-copy-engine.patch b/patch/comercial/rsync-copy-engine.patch deleted file mode 100644 index f469d50..0000000 --- a/patch/comercial/rsync-copy-engine.patch +++ /dev/null @@ -1,902 +0,0 @@ -diff -U 3 -H -d -r -N -- Ultracopier-0.3/ListThread.cpp Rsync/ListThread.cpp ---- Ultracopier-0.3/ListThread.cpp 2012-06-26 14:12:53.082114806 +0200 -+++ Rsync/ListThread.cpp 2012-06-29 22:21:40.395733284 +0200 -@@ -28,6 +28,7 @@ - numberOfInodeOperation = 0; - maxSpeed = 0; - doRightTransfer = false; -+ rsync = false; - keepDate = false; - blockSize = 1024; - osBufferLimit = 512; -@@ -265,6 +266,21 @@ - this->autoStart=autoStart; - } - -+/// \brief set rsync -+void ListThread::setRsync(const bool rsync) -+{ -+ this->rsync=rsync; -+ int index=0; -+ loop_sub_size_transfer_thread_search=transferThreadList.size(); -+ while(indexsetRsync(rsync); -+ index++; -+ } -+ for(int i=0;isetRsync(rsync); -+} -+ - //set check destination folder - void ListThread::setCheckDestinationFolderExists(const bool checkDestinationFolderExists) - { -@@ -327,11 +343,13 @@ - #endif - connect(scanFileOrFolderThreadsPool.last(),SIGNAL(newFolderListing(QString)), this,SIGNAL(newFolderListing(QString))); - connect(scanFileOrFolderThreadsPool.last(),SIGNAL(addToRmPath(QString,int)), this,SLOT(addToRmPath(QString,int)), Qt::QueuedConnection); -+ connect(scanFileOrFolderThreadsPool.last(),SIGNAL(addToRmForRsync(QString)), this,SLOT(addToRmForRsync(QString)), Qt::QueuedConnection); - connect(scanFileOrFolderThreadsPool.last(),SIGNAL(addToMkPath(QString)), this,SLOT(addToMkPath(QString)), Qt::QueuedConnection); - - connect(scanFileOrFolderThreadsPool.last(),SIGNAL(errorOnFolder(QFileInfo,QString)), this,SLOT(errorOnFolder(QFileInfo,QString)), Qt::QueuedConnection); - connect(scanFileOrFolderThreadsPool.last(),SIGNAL(folderAlreadyExists(QFileInfo,QFileInfo,bool)), this,SLOT(folderAlreadyExists(QFileInfo,QFileInfo,bool)), Qt::QueuedConnection); - -+ scanFileOrFolderThreadsPool.last()->setRsync(rsync); - scanFileOrFolderThreadsPool.last()->setFilters(include,exclude); - scanFileOrFolderThreadsPool.last()->setCheckDestinationFolderExists(checkDestinationFolderExists && alwaysDoThisActionForFolderExists!=FolderExists_Merge); - if(scanFileOrFolderThreadsPool.size()==1) -@@ -761,6 +779,18 @@ - actionToDoListInode_afterTheTransfer << temp; - } - -+//rsync rm -+void ListThread::addToRmForRsync(const QString& inode) -+{ -+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"inode: "+inode); -+ actionToDoInode temp; -+ temp.type = ActionType_RmSync; -+ temp.id = generateIdNumber(); -+ temp.folder.setFile(inode); -+ temp.isRunning = false; -+ actionToDoListInode << temp; -+} -+ - //send action done - void ListThread::sendActionDone() - { -@@ -1526,7 +1556,7 @@ - loop_size=actionToDoListInode.size(); - while(int_for_loopset_osBuffer(osBuffer); - last->set_osBufferLimited(osBufferLimited); - last->set_osBufferLimit(osBufferLimit); -+ last->setRsync(rsync); - - #ifdef ULTRACOPIER_PLUGIN_DEBUG - connect(last,SIGNAL(debugInformation(DebugLevel,QString,QString,QString,int)),this,SIGNAL(debugInformation(DebugLevel,QString,QString,QString,int)), Qt::QueuedConnection); -@@ -1669,7 +1700,7 @@ - connect(last,SIGNAL(preOperationStopped()), this,SLOT(doNewActions_start_transfer()), Qt::QueuedConnection); - connect(last,SIGNAL(postOperationStopped()), this,SLOT(transferInodeIsClosed()), Qt::QueuedConnection); - connect(last,SIGNAL(checkIfItCanBeResumed()), this,SLOT(restartTransferIfItCan()), Qt::QueuedConnection); -- connect(last,SIGNAL(pushStat(TransferStat,quint64)), this,SLOT(newTransferStat(TransferStat,quint64)), Qt::QueuedConnection); -+ connect(last,SIGNAL(pushStat(TransferStat,quint64)), this,SLOT(newTransferStat(TransferStat,quint64)), Qt::QueuedConnection); - - connect(this,SIGNAL(send_sendNewRenamingRules(QString,QString)), last,SLOT(setRenamingRules(QString,QString)), Qt::QueuedConnection); - -diff -U 3 -H -d -r -N -- Ultracopier-0.3/ListThread.h Rsync/ListThread.h ---- Ultracopier-0.3/ListThread.h 2012-06-25 16:46:19.931261209 +0200 -+++ Rsync/ListThread.h 2012-06-29 21:53:37.495762350 +0200 -@@ -77,7 +77,8 @@ - enum ActionType - { - ActionType_MkPath=1, -- ActionType_RmPath=2 -+ ActionType_RmPath=2, -+ ActionType_RmSync=3 - }; - /// \brief to store one action to do - struct actionToDoInode -@@ -155,6 +156,8 @@ - void setBlockSize(const int blockSize); - /// \brief set auto start - void setAutoStart(const bool autoStart); -+ /// \brief set rsync -+ void setRsync(const bool rsync); - /// \brief set check destination folder - void setCheckDestinationFolderExists(const bool checkDestinationFolderExists); - /// \brief set data local to the thread -@@ -196,6 +199,7 @@ - quint64 bytesToTransfer; - quint64 bytesTransfered; - bool autoStart; -+ bool rsync; - bool putInPause; - QList actionDone;///< to action to send to the interface - quint64 idIncrementNumber;///< to store the last id returned -@@ -302,6 +306,8 @@ - quint64 addToMkPath(const QString& folder); - //add rm path to do - void addToRmPath(const QString& folder,const int& inodeToRemove); -+ //rsync rm -+ void addToRmForRsync(const QString& inode); - //send the progression, after full reset of the interface (then all is empty) - void syncTransferList_internal(); - signals: -diff -U 3 -H -d -r -N -- Ultracopier-0.3/ListThread_InodeAction.cpp Rsync/ListThread_InodeAction.cpp ---- Ultracopier-0.3/ListThread_InodeAction.cpp 2012-06-29 21:57:47.000000000 +0200 -+++ Rsync/ListThread_InodeAction.cpp 2012-06-29 22:19:11.515735854 +0200 -@@ -19,6 +19,14 @@ - if(numberOfInodeOperation>=ULTRACOPIER_PLUGIN_MAXPARALLELINODEOPT) - return; - break; -+case ActionType_RmSync: -+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("launch rm to sync: %1").arg(currentActionToDoInode.folder.absoluteFilePath())); -+ rmPathQueue.addPath(currentActionToDoInode.folder.absoluteFilePath(),true); -+ currentActionToDoInode.isRunning=true; -+ numberOfInodeOperation++; -+ if(numberOfInodeOperation>=ULTRACOPIER_PLUGIN_MAXPARALLELINODEOPT) -+ return; -+break; - case ActionType_RmPath: - /* What is this code? - if((int_for_loop+number_rm_path_moved)>=(loop_size-1)) -@@ -34,7 +42,7 @@ - if(numberOfTranferRuning>0) - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,QString("skipped because already inode = 0 and transfer is running: %1").arg(currentActionToDoInode.folder.absoluteFilePath())); - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("launch rmpath: %1").arg(currentActionToDoInode.folder.absoluteFilePath())); -- rmPathQueue.addPath(currentActionToDoInode.folder.absoluteFilePath()); -+ rmPathQueue.addPath(currentActionToDoInode.folder.absoluteFilePath(),false); - currentActionToDoInode.isRunning=true; - numberOfInodeOperation++; - if(numberOfInodeOperation>=ULTRACOPIER_PLUGIN_MAXPARALLELINODEOPT) -diff -U 3 -H -d -r -N -- Ultracopier-0.3/RmPath.cpp Rsync/RmPath.cpp ---- Ultracopier-0.3/RmPath.cpp 2012-06-29 22:37:41.715716675 +0200 -+++ Rsync/RmPath.cpp 2012-06-29 22:42:25.105711780 +0200 -@@ -16,12 +16,12 @@ - wait(); - } - --void RmPath::addPath(const QString &path) -+void RmPath::addPath(const QString &path,const bool &toSync) - { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start: "+path); - if(stopIt) - return; -- emit internalStartAddPath(path); -+ emit internalStartAddPath(path,toSync); - } - - void RmPath::skip() -@@ -38,7 +38,7 @@ - - void RmPath::run() - { -- connect(this,SIGNAL(internalStartAddPath(QString)),this,SLOT(internalAddPath(QString)),Qt::QueuedConnection); -+ connect(this,SIGNAL(internalStartAddPath(QString,bool)),this,SLOT(internalAddPath(QString,bool)),Qt::QueuedConnection); - connect(this,SIGNAL(internalStartDoThisPath()),this,SLOT(internalDoThisPath()),Qt::QueuedConnection); - connect(this,SIGNAL(internalStartSkip()),this,SLOT(internalSkip()),Qt::QueuedConnection); - connect(this,SIGNAL(internalStartRetry()),this,SLOT(internalRetry()),Qt::QueuedConnection); -@@ -50,23 +50,63 @@ - if(waitAction || pathList.isEmpty()) - return; - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start: "+pathList.first()); -- if(!rmpath(pathList.first())) -+ if(!toSyncList.first()) - { -- if(stopIt) -+ if(!rmpath(pathList.first(),false)) -+ { -+ if(stopIt) -+ return; -+ waitAction=true; -+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"Unable to remove the folder: "+pathList.first()); -+ emit errorOnFolder(pathList.first(),tr("Unable to remove the folder")); - return; -- waitAction=true; -- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"Unable to remove the folder: "+pathList.first()); -- emit errorOnFolder(pathList.first(),tr("Unable to remove the folder")); -- return; -+ } -+ } -+ else -+ { -+ if(QFileInfo(pathList.first()).isDir()) -+ { -+ if(!rmpath(pathList.first(),true)) -+ { -+ if(stopIt) -+ return; -+ waitAction=true; -+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"Unable to remove the folder: "+pathList.first()); -+ emit errorOnFolder(pathList.first(),tr("Unable to remove the folder")); -+ return; -+ } -+ } -+ else if(!rmfile(pathList.first())) -+ { -+ if(stopIt) -+ return; -+ waitAction=true; -+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"Unable to remove the file: "+pathList.first()); -+ emit errorOnFolder(pathList.first(),tr("Unable to remove the file")); -+ return; -+ } - } - pathList.removeFirst(); -+ toSyncList.removeFirst(); - emit firstFolderFinish(); - checkIfCanDoTheNext(); - } - -+bool RmPath::rmfile(QString filePath) -+{ -+ QFile file(filePath); -+ if(!file.remove()) -+ { -+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"unable to remove the file: "+file.fileName()+", error: "+file.errorString()); -+ return false; -+ } -+ else -+ return true; -+} -+ - /** remplace QDir::rmpath() because it return false if the folder not exists - and seam bug with parent folder */ --bool RmPath::rmpath(const QDir &dir) -+bool RmPath::rmpath(const QDir &dir,const bool &toSync) - { - if(!dir.exists()) - return true; -@@ -77,28 +117,40 @@ - QFileInfo fileInfo(list.at(i)); - if(!fileInfo.isDir()) - { -- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"found a file: "+fileInfo.fileName()); -- allHaveWork=false; -+ if(toSync) -+ { -+ if(!rmfile(fileInfo.absoluteFilePath())) -+ { -+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"unable to remove a file: "+fileInfo.fileName()); -+ allHaveWork=false; -+ } -+ } -+ else -+ { -+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"found a file: "+fileInfo.fileName()); -+ allHaveWork=false; -+ } - } - else - { - //return the fonction for scan the new folder -- if(!rmpath(dir.absolutePath()+'/'+fileInfo.fileName()+'/')) -+ if(!rmpath(dir.absolutePath()+'/'+fileInfo.fileName()+'/',toSync)) - allHaveWork=false; - } - } - if(!allHaveWork) -- return allHaveWork; -+ return false; - allHaveWork=dir.rmdir(dir.absolutePath()); - if(!allHaveWork) - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"unable to remove the folder: "+dir.absolutePath()); - return allHaveWork; - } - --void RmPath::internalAddPath(const QString &path) -+void RmPath::internalAddPath(const QString &path,const bool &toSync) - { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start: "+path); - pathList << path; -+ toSyncList << toSync; - if(!waitAction) - checkIfCanDoTheNext(); - } -diff -U 3 -H -d -r -N -- Ultracopier-0.3/RmPath.h Rsync/RmPath.h ---- Ultracopier-0.3/RmPath.h 2012-03-19 17:34:43.572371290 +0100 -+++ Rsync/RmPath.h 2012-06-29 22:36:02.135718395 +0200 -@@ -24,11 +24,11 @@ - explicit RmPath(); - ~RmPath(); - /// \brief add new path to remove -- void addPath(const QString &path); -+ void addPath(const QString &path,const bool &toSync); - signals: - void errorOnFolder(const QFileInfo &,const QString &); - void firstFolderFinish(); -- void internalStartAddPath(const QString &path); -+ void internalStartAddPath(const QString &path,const bool &toSync); - void internalStartDoThisPath(); - void internalStartSkip(); - void internalStartRetry(); -@@ -42,12 +42,14 @@ - bool stopIt; - bool skipIt; - QStringList pathList; -+ QList toSyncList; - void checkIfCanDoTheNext(); - QDir dir; -- bool rmpath(const QDir &dir); -+ bool rmpath(const QDir &dir,const bool &toSync); -+ bool rmfile(QString filePath); - private slots: - void internalDoThisPath(); -- void internalAddPath(const QString &path); -+ void internalAddPath(const QString &path,const bool &toSync); - void internalSkip(); - void internalRetry(); - }; -diff -U 3 -H -d -r -N -- Ultracopier-0.3/TransferThread.cpp Rsync/TransferThread.cpp ---- Ultracopier-0.3/TransferThread.cpp 2012-06-29 15:58:31.546130402 +0200 -+++ Rsync/TransferThread.cpp 2012-06-29 18:58:24.095943961 +0200 -@@ -26,6 +26,7 @@ - alwaysDoFileExistsAction= FileExists_NotSet; - readError = false; - writeError = false; -+ rsync = false; - this->mkpathTransfer = mkpathTransfer; - readThread.setWriteThread(&writeThread); - -@@ -278,7 +279,7 @@ - { - //check if destination exists - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"["+QString::number(id)+"] overwrite: "+QString::number(fileExistsAction)+", always action: "+QString::number(alwaysDoFileExistsAction)); -- if(alwaysDoFileExistsAction==FileExists_Overwrite || readError || writeError) -+ if(alwaysDoFileExistsAction==FileExists_Overwrite || rsync || readError || writeError) - return false; - if(destinationInfo.exists()) - { -@@ -1124,6 +1125,12 @@ - emit tryPutAtBottom(); - } - -+/// \brief set rsync -+void TransferThread::setRsync(const bool rsync) -+{ -+ this->rsync=rsync; -+} -+ - void TransferThread::set_osBufferLimit(unsigned int osBufferLimit) - { - this->osBufferLimit=osBufferLimit; -diff -U 3 -H -d -r -N -- Ultracopier-0.3/TransferThread.h Rsync/TransferThread.h ---- Ultracopier-0.3/TransferThread.h 2012-06-26 11:10:54.541994070 +0200 -+++ Rsync/TransferThread.h 2012-06-29 15:54:29.286134585 +0200 -@@ -113,6 +113,8 @@ - qint64 copiedSize(); - /// \brief put the current file at bottom - void putAtBottom(); -+ /// \brief set rsync -+ void setRsync(const bool rsync); - - void set_osBufferLimit(unsigned int osBufferLimit); - void setRenamingRules(QString firstRenamingRule,QString otherRenamingRule); -@@ -166,6 +168,7 @@ - bool readIsClosedVariable; - bool writeIsClosedVariable; - bool canBeMovedDirectlyVariable; -+ bool rsync; - QByteArray sourceChecksum,destinationChecksum; - volatile bool stopIt; - volatile bool canStartTransfer; -diff -U 3 -H -d -r -N -- Ultracopier-0.3/copyEngine.cpp Rsync/copyEngine.cpp ---- Ultracopier-0.3/copyEngine.cpp 2012-06-26 14:14:40.892116001 +0200 -+++ Rsync/copyEngine.cpp 2012-06-29 21:22:50.945794251 +0200 -@@ -186,6 +186,7 @@ - connect(ui->keepDate, SIGNAL(toggled(bool)), &threadOfTheTransfer, SLOT(setKeepDate(bool))); - connect(ui->blockSize, SIGNAL(valueChanged(int)), &threadOfTheTransfer, SLOT(setBlockSize(int)));*/ - connect(ui->autoStart, SIGNAL(toggled(bool)), this, SLOT(setAutoStart(bool))); -+ connect(ui->rsync, SIGNAL(toggled(bool)), this, SLOT(setRsync(bool))); - connect(ui->checkBoxDestinationFolderExists, SIGNAL(toggled(bool)), this, SLOT(setCheckDestinationFolderExists(bool))); - uiIsInstalled=true; - setRightTransfer(doRightTransfer); -@@ -193,6 +194,7 @@ - setSpeedLimitation(maxSpeed); - setBlockSize(blockSize); - setAutoStart(autoStart); -+ setRsync(rsync); - setCheckDestinationFolderExists(checkDestinationFolderExists); - set_doChecksum(doChecksum); - set_checksumIgnoreIfImpossible(checksumIgnoreIfImpossible); -@@ -216,6 +218,7 @@ - connect(ui->keepDate, SIGNAL(toggled(bool)), this,SLOT(setKeepDate(bool))); - connect(ui->blockSize, SIGNAL(valueChanged(int)), this,SLOT(setBlockSize(int))); - connect(ui->autoStart, SIGNAL(toggled(bool)), this,SLOT(setAutoStart(bool))); -+ connect(ui->rsync, SIGNAL(toggled(bool)), this,SLOT(setRsync(bool))); - connect(ui->doChecksum, SIGNAL(toggled(bool)), this,SLOT(doChecksum_toggled(bool))); - connect(ui->checksumIgnoreIfImpossible, SIGNAL(toggled(bool)), this,SLOT(checksumIgnoreIfImpossible_toggled(bool))); - connect(ui->checksumOnlyOnError, SIGNAL(toggled(bool)), this,SLOT(checksumOnlyOnError_toggled(bool))); -@@ -505,6 +508,13 @@ - /** \brief give the forced mode, to export/import transfer list */ - void copyEngine::forceMode(const CopyMode &mode) - { -+ if(mode==Move) -+ { -+ listThread->setRsync(false); -+ rsync=false; -+ } -+ if(uiIsInstalled) -+ ui->rsync->setEnabled(mode==Copy); - if(forcedMode) - { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,QString("Mode forced previously")); -@@ -617,6 +627,19 @@ - listThread->setAutoStart(autoStart); - } - -+/// \brief set rsync -+void copyEngine::setRsync(const bool rsync) -+{ -+ this->rsync=rsync; -+ if(uiIsInstalled) -+ { -+ ui->rsync->setChecked(rsync); -+ ui->rsync->setEnabled(forcedMode && mode==Copy); -+ ui->label_rsync->setEnabled(forcedMode && mode==Copy); -+ } -+ listThread->setRsync(rsync); -+} -+ - //set check destination folder - void copyEngine::setCheckDestinationFolderExists(const bool checkDestinationFolderExists) - { -diff -U 3 -H -d -r -N -- Ultracopier-0.3/copyEngine.h Rsync/copyEngine.h ---- Ultracopier-0.3/copyEngine.h 2012-06-25 16:50:12.191263770 +0200 -+++ Rsync/copyEngine.h 2012-06-29 15:49:45.856139485 +0200 -@@ -60,6 +60,7 @@ - bool keepDate; - int blockSize; - bool autoStart; -+ bool rsync; - bool checkDestinationFolderExists; - FileExistsAction alwaysDoThisActionForFileExists; - FileErrorAction alwaysDoThisActionForFileError; -@@ -273,6 +274,8 @@ - void setBlockSize(const int blockSize); - /// \brief set auto start - void setAutoStart(const bool autoStart); -+ /// \brief set rsync -+ void setRsync(const bool rsync); - /// \brief set if need check if the destination folder exists - void setCheckDestinationFolderExists(const bool checkDestinationFolderExists); - /// \brief reset widget -diff -U 3 -H -d -r -N -- Ultracopier-0.3/copyEngine.pro.user Rsync/copyEngine.pro.user ---- Ultracopier-0.3/copyEngine.pro.user 2012-06-26 15:50:53.722179836 +0200 -+++ Rsync/copyEngine.pro.user 2012-06-29 22:42:24.025711798 +0200 -@@ -1,6 +1,6 @@ - - -- -+ - - - ProjectExplorer.Project.ActiveTarget -@@ -163,7 +163,113 @@ - 2 - true - -- 2 -+ -+ ProjectExplorer.ToolChain.Gcc:{d6ee78f7-3364-4f54-a93f-b3c1e2a8c8c9} -+ -+ -+ true -+ qmake -+ -+ QtProjectManager.QMakeBuildStep -+ false -+ true -+ -+ false -+ -+ -+ true -+ Make -+ -+ Qt4ProjectManager.MakeStep -+ false -+ -+ -+ -+ 2 -+ Build -+ -+ ProjectExplorer.BuildSteps.Build -+ -+ -+ -+ true -+ Make -+ -+ Qt4ProjectManager.MakeStep -+ true -+ clean -+ -+ -+ 1 -+ Clean -+ -+ ProjectExplorer.BuildSteps.Clean -+ -+ 2 -+ false -+ -+ Qt 5.0.0 (qt-everywhere-opensource-src-5.0.0) Release -+ -+ Qt4ProjectManager.Qt4BuildConfiguration -+ 0 -+ /home/user/Desktop/ultracopier/sources/plugins/CopyEngine/copyEngine-build-desktop-Qt_5_0_0__qt-everywhere-opensource-src-5_0_0__Release -+ 3 -+ true -+ -+ -+ ProjectExplorer.ToolChain.Gcc:{d6ee78f7-3364-4f54-a93f-b3c1e2a8c8c9} -+ -+ -+ true -+ qmake -+ -+ QtProjectManager.QMakeBuildStep -+ false -+ true -+ -+ false -+ -+ -+ true -+ Make -+ -+ Qt4ProjectManager.MakeStep -+ false -+ -+ -+ -+ 2 -+ Build -+ -+ ProjectExplorer.BuildSteps.Build -+ -+ -+ -+ true -+ Make -+ -+ Qt4ProjectManager.MakeStep -+ true -+ clean -+ -+ -+ 1 -+ Clean -+ -+ ProjectExplorer.BuildSteps.Clean -+ -+ 2 -+ false -+ -+ Qt 5.0.0 (qt-everywhere-opensource-src-5.0.0) Debug -+ -+ Qt4ProjectManager.Qt4BuildConfiguration -+ 2 -+ /home/user/Desktop/ultracopier/sources/plugins/CopyEngine/copyEngine-build-desktop-Qt_5_0_0__qt-everywhere-opensource-src-5_0_0__Debug -+ 3 -+ true -+ -+ 4 - - - 0 -diff -U 3 -H -d -r -N -- Ultracopier-0.3/factory.cpp Rsync/factory.cpp ---- Ultracopier-0.3/factory.cpp 2012-06-26 14:10:39.972113336 +0200 -+++ Rsync/factory.cpp 2012-06-29 15:40:43.606148853 +0200 -@@ -35,6 +35,7 @@ - connect(ui->keepDate, SIGNAL(toggled(bool)), this,SLOT(setKeepDate(bool))); - connect(ui->blockSize, SIGNAL(valueChanged(int)), this,SLOT(setBlockSize(int))); - connect(ui->autoStart, SIGNAL(toggled(bool)), this,SLOT(setAutoStart(bool))); -+ connect(ui->rsync, SIGNAL(toggled(bool)), this,SLOT(setRsync(bool))); - connect(ui->doChecksum, SIGNAL(toggled(bool)), this,SLOT(doChecksum_toggled(bool))); - connect(ui->checksumIgnoreIfImpossible, SIGNAL(toggled(bool)), this,SLOT(checksumIgnoreIfImpossible_toggled(bool))); - connect(ui->checksumOnlyOnError, SIGNAL(toggled(bool)), this,SLOT(checksumOnlyOnError_toggled(bool))); -@@ -71,6 +72,7 @@ - realObject->setKeepDate( optionsEngine->getOptionValue("keepDate").toBool()); - realObject->setBlockSize( optionsEngine->getOptionValue("blockSize").toInt()); - realObject->setAutoStart( optionsEngine->getOptionValue("autoStart").toBool()); -+ realObject->setRsync( optionsEngine->getOptionValue("rsync").toBool()); - realObject->on_comboBoxFolderColision_currentIndexChanged(ui->comboBoxFolderColision->currentIndex()); - realObject->on_comboBoxFolderError_currentIndexChanged(ui->comboBoxFolderError->currentIndex()); - realObject->setCheckDestinationFolderExists( optionsEngine->getOptionValue("checkDestinationFolder").toBool()); -@@ -123,6 +125,7 @@ - KeysList.append(qMakePair(QString("keepDate"),QVariant(true))); - KeysList.append(qMakePair(QString("blockSize"),QVariant(1024)));//1024KB as default - KeysList.append(qMakePair(QString("autoStart"),QVariant(true))); -+ KeysList.append(qMakePair(QString("rsync"),QVariant(true))); - KeysList.append(qMakePair(QString("folderError"),QVariant(0))); - KeysList.append(qMakePair(QString("folderColision"),QVariant(0))); - KeysList.append(qMakePair(QString("checkDestinationFolder"),QVariant(true))); -@@ -151,6 +154,7 @@ - ui->keepDate->setChecked(optionsEngine->getOptionValue("keepDate").toBool()); - ui->blockSize->setValue(optionsEngine->getOptionValue("blockSize").toUInt()); - ui->autoStart->setChecked(optionsEngine->getOptionValue("autoStart").toBool()); -+ ui->rsync->setChecked(optionsEngine->getOptionValue("rsync").toBool()); - ui->comboBoxFolderError->setCurrentIndex(optionsEngine->getOptionValue("folderError").toUInt()); - ui->comboBoxFolderColision->setCurrentIndex(optionsEngine->getOptionValue("folderColision").toUInt()); - ui->checkBoxDestinationFolderExists->setChecked(optionsEngine->getOptionValue("checkDestinationFolder").toBool()); -@@ -287,6 +291,15 @@ - else - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"internal error, crash prevented"); - } -+ -+void Factory::setRsync(bool rsync) -+{ -+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"the checkbox have changed"); -+ if(optionsEngine!=NULL) -+ optionsEngine->setOptionValue("rsync",rsync); -+ else -+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"internal error, crash prevented"); -+} - - void Factory::newLanguageLoaded() - { -diff -U 3 -H -d -r -N -- Ultracopier-0.3/factory.h Rsync/factory.h ---- Ultracopier-0.3/factory.h 2012-05-19 15:44:05.354039716 +0200 -+++ Rsync/factory.h 2012-06-29 15:40:20.016149261 +0200 -@@ -71,6 +71,7 @@ - void setKeepDate(bool keepDate); - void setBlockSize(int blockSize); - void setAutoStart(bool autoStart); -+ void setRsync(bool rsync); - void showFilterDialog(); - void sendNewFilters(QStringList includeStrings,QStringList includeOptions,QStringList excludeStrings,QStringList excludeOptions); - void doChecksum_toggled(bool); -diff -U 3 -H -d -r -N -- Ultracopier-0.3/informations.xml Rsync/informations.xml ---- Ultracopier-0.3/informations.xml 2012-06-25 17:31:49.331291383 +0200 -+++ Rsync/informations.xml 2012-06-29 15:11:53.696178734 +0200 -@@ -1,7 +1,7 @@ - - -- <![CDATA[Copy engine of Ultracopier 0.3]]> -- <![CDATA[Moteur de copie d'ultracopier 0.3]]> -+ <![CDATA[Rsync copy engine]]> -+ <![CDATA[Moteur de copie rsync]]> - - CopyEngine - -@@ -14,12 +14,12 @@ - - linux-x86_64-pc - -- -- -+ -+ - - 0.3.0.10 - -- Ultracopier-0.3 -+ Rsync - - =ultracopier-0.3.0.10 -diff -U 3 -H -d -r -N -- Ultracopier-0.3/options.ui Rsync/options.ui ---- Ultracopier-0.3/options.ui 2012-06-20 14:56:21.509908805 +0200 -+++ Rsync/options.ui 2012-06-29 22:15:47.595739375 +0200 -@@ -6,8 +6,8 @@ - - 0 - 0 -- 356 -- 376 -+ 354 -+ 399 - - - -@@ -122,7 +122,7 @@ - - - -- -+ - - - Checksum -@@ -175,24 +175,24 @@ - - - -- -+ - - - Enable OS buffer - - - -- -+ - - -- -+ - - - OS buffer only if smaller than - - - -- -+ - - - KB -@@ -215,7 +215,7 @@ - - - -- -+ - - - Qt::Vertical -@@ -228,20 +228,34 @@ - - - -- -+ - - - Filters - - - -- -+ - - - Renaming rules - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ Rsync (only in copy mode) -+ -+ -+ - - - -diff -U 3 -H -d -r -N -- Ultracopier-0.3/scanFileOrFolder.cpp Rsync/scanFileOrFolder.cpp ---- Ultracopier-0.3/scanFileOrFolder.cpp 2012-05-23 11:06:25.001037392 +0200 -+++ Rsync/scanFileOrFolder.cpp 2012-06-29 21:54:15.555761695 +0200 -@@ -1,9 +1,10 @@ - #include "scanFileOrFolder.h" - --#include -+#include - - scanFileOrFolder::scanFileOrFolder(CopyMode mode) - { -+ rsync=false; - stopped = true; - stopIt = false; - this->mode=mode; -@@ -427,7 +428,17 @@ - if(!included) - {} - else -- emit fileTransfer(fileInfo.absoluteFilePath(),finalDest+fileName,mode); -+ { -+ bool sendToTransfer=false; -+ if(!rsync) -+ sendToTransfer=true; -+ else if(!QFile::exists(finalDest+fileName)) -+ sendToTransfer=true; -+ else if(fileInfo.lastModified()!=QFileInfo(finalDest+fileName).lastModified()) -+ sendToTransfer=true; -+ if(sendToTransfer) -+ emit fileTransfer(fileInfo.absoluteFilePath(),finalDest+fileName,mode); -+ } - } - } - } -@@ -437,9 +448,43 @@ - //listFolder(source,destination,suffixPath+fileInfo.fileName()+QDir::separator()); - listFolder(source,destination,sourceSuffixPath+fileInfo.fileName()+"/",destinationSuffixPath+fileInfo.fileName()+"/");//put unix separator because it's transformed into that's under windows too - else -- emit fileTransfer(fileInfo.absoluteFilePath(),finalDest+fileInfo.fileName(),mode); -+ { -+ bool sendToTransfer=false; -+ if(!rsync) -+ sendToTransfer=true; -+ else if(!QFile::exists(finalDest+fileInfo.fileName())) -+ sendToTransfer=true; -+ else if(fileInfo.lastModified()!=QFileInfo(finalDest+fileInfo.fileName()).lastModified()) -+ sendToTransfer=true; -+ if(sendToTransfer) -+ emit fileTransfer(fileInfo.absoluteFilePath(),finalDest+fileInfo.fileName(),mode); -+ } - } - } -+ if(rsync) -+ { -+ //check the reverse path here -+ QFileInfoList entryListDestination=QDir(finalDest).entryInfoList(QDir::AllEntries|QDir::NoDotAndDotDot|QDir::Hidden|QDir::System,QDir::DirsFirst|QDir::Name|QDir::IgnoreCase);//possible wait time here -+ int sizeEntryListDestination=entryListDestination.size(); -+ int index=0; -+ for (int indexDestination=0;indexDestinationfirstRenamingRule=firstRenamingRule; - this->otherRenamingRule=otherRenamingRule; - } -+ -+/// \brief set rsync -+void scanFileOrFolder::setRsync(const bool rsync) -+{ -+ this->rsync=rsync; -+} -diff -U 3 -H -d -r -N -- Ultracopier-0.3/scanFileOrFolder.h Rsync/scanFileOrFolder.h ---- Ultracopier-0.3/scanFileOrFolder.h 2012-05-20 20:32:43.695874620 +0200 -+++ Rsync/scanFileOrFolder.h 2012-06-29 21:51:45.235764294 +0200 -@@ -38,6 +38,8 @@ - /// \brief set if need check if the destination exists - void setCheckDestinationFolderExists(const bool checkDestinationFolderExists); - void setRenamingRules(QString firstRenamingRule,QString otherRenamingRule); -+ /// \brief set rsync -+ void setRsync(const bool rsync); - signals: - void fileTransfer(const QFileInfo &source,const QFileInfo &destination,const CopyMode &mode); - /// \brief To debug source -@@ -49,6 +51,7 @@ - void newFolderListing(const QString &path); - void addToMkPath(const QString& folder); - void addToRmPath(const QString& folder,const int& inodeToRemove); -+ void addToRmForRsync(const QString& inode); - public slots: - void addToList(const QStringList& sources,const QString& destination); - void setFilters(QList include,QList exclude); -@@ -69,6 +72,7 @@ - QString prefix; - QString suffix; - CopyMode mode; -+ bool rsync; - QList include,exclude; - QList include_send,exclude_send; - bool reloadTheNewFilters; diff --git a/patch/opensource/KDE-Ultracopier.patch b/patch/opensource/KDE-Ultracopier.patch deleted file mode 100644 index 4130c08..0000000 --- a/patch/opensource/KDE-Ultracopier.patch +++ /dev/null @@ -1,290 +0,0 @@ -diff -U 3 -H -d -r -N -- kde-baseapps-4.8.4/lib/konq/CMakeLists.txt kde-baseapps-4.8.4-ultracopier/lib/konq/CMakeLists.txt ---- kde-baseapps-4.8.4/lib/konq/CMakeLists.txt 2011-09-26 11:43:17.390868969 +0200 -+++ kde-baseapps-4.8.4-ultracopier/lib/konq/CMakeLists.txt 2012-06-27 09:54:15.909492978 +0200 -@@ -9,6 +9,7 @@ - include_directories( ${ZLIB_INCLUDE_DIR} ) - - set(konq_LIB_SRCS -+ ClientCatchcopy.cpp - konq_popupmenu.cpp # used by konqueror, kfind, folderview, kickoff - konq_popupmenuplugin.cpp # for KonqPopupMenu and its plugins - konq_dndpopupmenuplugin.cpp # for KonqDndPopupMenu and its plugins -@@ -53,6 +54,7 @@ - - install( FILES directory_bookmarkbar.desktop DESTINATION ${DATA_INSTALL_DIR}/kbookmark ) - install( FILES -+ ClientCatchcopy.h - konq_popupmenu.h - konq_popupmenuinformation.h - konq_popupmenuplugin.h -diff -U 3 -H -d -r -N -- kde-baseapps-4.8.4/lib/konq/ClientCatchcopy.cpp kde-baseapps-4.8.4-ultracopier/lib/konq/ClientCatchcopy.cpp ---- kde-baseapps-4.8.4/lib/konq/ClientCatchcopy.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ kde-baseapps-4.8.4-ultracopier/lib/konq/ClientCatchcopy.cpp 2012-06-27 10:28:25.049457581 +0200 -@@ -0,0 +1,142 @@ -+/** \file ClientCatchcopy.cpp -+\brief Define the catchcopy client -+\author alpha_one_x86 -+\version 0002 -+\date 2010 */ -+ -+#include "ClientCatchcopy.h" -+ -+ClientCatchcopy::ClientCatchcopy() -+{ -+ disconnectedFromSocket(); -+ connect(&socket, SIGNAL(disconnected()), this, SLOT(disconnectedFromSocket())); -+ connect(&socket, SIGNAL(readyRead()), this, SLOT(readyRead())); -+ connect(&socket, SIGNAL(connected()), this, SLOT(socketIsConnected())); -+} -+ -+void ClientCatchcopy::socketIsConnected() -+{ -+ sendProtocol(); -+} -+ -+void ClientCatchcopy::connectToServer() -+{ -+ socket.connectToServer(pathSocket()); -+ socket.waitForConnected(); -+} -+ -+const QString ClientCatchcopy::pathSocket() -+{ -+#ifdef Q_OS_UNIX -+ return "advanced-copier-"+QString::number(getuid()); -+#else -+ QString userName; -+ DWORD size=0; -+ if(GetUserNameW(NULL,&size) || (GetLastError()!=ERROR_INSUFFICIENT_BUFFER)) -+ { -+ } -+ else -+ { -+ WCHAR * userNameW=new WCHAR[size]; -+ if(GetUserNameW(userNameW,&size)) -+ { -+ userName.fromWCharArray(userNameW,size*2); -+ userName=QString(QByteArray((char*)userNameW,size*2-2).toHex()); -+ } -+ delete userNameW; -+ } -+ return "advanced-copier-"+userName; -+#endif -+} -+ -+void ClientCatchcopy::disconnectFromServer() -+{ -+ socket.abort(); -+ socket.disconnectFromServer(); -+} -+ -+/// \brief to send stream of string list -+quint32 ClientCatchcopy::sendRawOrderList(const QStringList & order) -+{ -+ if(!socket.isValid()) -+ return -1; -+ if(socket.state()!=QLocalSocket::ConnectedState) -+ return -1; -+ idNextOrder++; -+ if(idNextOrder>2000000000) -+ idNextOrder=0; -+ QByteArray block; -+ QDataStream out(&block, QIODevice::WriteOnly); -+ out.setVersion(QDataStream::Qt_4_4); -+ out << int(0); -+ out << idNextOrder; -+ out << order; -+ out.device()->seek(0); -+ out << block.size(); -+ do //cut string list and send it as block of 32KB -+ { -+ QByteArray blockToSend; -+ int byteWriten; -+ blockToSend=block.left(32*1024);//32KB -+ block.remove(0,blockToSend.size()); -+ byteWriten = socket.write(blockToSend); -+ if(!socket.isValid()) -+ return -1; -+ if(socket.errorString()!="Unknown error" && socket.errorString()!="") -+ return -1; -+ if(blockToSend.size()!=byteWriten) -+ return -1; -+ } -+ while(block.size()); -+ return idNextOrder; -+} -+ -+void ClientCatchcopy::readyRead() -+{ -+ while(socket.bytesAvailable()>0) -+ { -+ socket.readAll(); -+ } -+} -+ -+void ClientCatchcopy::disconnectedFromSocket() -+{ -+ idNextOrder = 0; -+} -+ -+/// \brief to send the protocol version used -+void ClientCatchcopy::sendProtocol() -+{ -+ sendRawOrderList(QStringList() << "protocol" << "0002"); -+} -+ -+void ClientCatchcopy::setClientName(const QString & name) -+{ -+ sendRawOrderList(QStringList() << "client" << name); -+} -+ -+bool ClientCatchcopy::addCopyWithDestination(const QStringList & sources,const QString & destination) -+{ -+ if(socket.state()==QLocalSocket::UnconnectedState) -+ connectToServer(); -+ if(socket.state()==QLocalSocket::ConnectedState) -+ { -+ sendRawOrderList(QStringList() << "cp" << sources << destination); -+ return true; -+ } -+ else -+ return false; -+} -+ -+bool ClientCatchcopy::addMoveWithDestination(const QStringList & sources,const QString & destination) -+{ -+ if(socket.state()==QLocalSocket::UnconnectedState) -+ connectToServer(); -+ if(socket.state()==QLocalSocket::ConnectedState) -+ { -+ sendRawOrderList(QStringList() << "mv" << sources << destination); -+ return true; -+ } -+ else -+ return false; -+} -diff -U 3 -H -d -r -N -- kde-baseapps-4.8.4/lib/konq/ClientCatchcopy.h kde-baseapps-4.8.4-ultracopier/lib/konq/ClientCatchcopy.h ---- kde-baseapps-4.8.4/lib/konq/ClientCatchcopy.h 1970-01-01 01:00:00.000000000 +0100 -+++ kde-baseapps-4.8.4-ultracopier/lib/konq/ClientCatchcopy.h 2012-06-27 10:28:52.169457112 +0200 -@@ -0,0 +1,58 @@ -+/** \file ClientCatchcopy.h -+\brief Define the catchcopy client -+\author alpha_one_x86 -+\version 0002 -+\date 2010 */ -+ -+#ifndef CLIENTCATCHCOPY_H -+#define CLIENTCATCHCOPY_H -+ -+#include -+#include -+#include -+#include -+#include -+ -+#ifdef Q_OS_UNIX -+ #include -+ #include -+#else -+ #include -+#endif -+ -+/// \brief Define the catchcopy client -+class ClientCatchcopy : public QObject -+{ -+ Q_OBJECT -+ public: -+ ClientCatchcopy(); -+ public slots: -+ void connectToServer(); -+ void disconnectFromServer(); -+ //to test and internal use -+ /// \brief set the client name -+ void setClientName(const QString & name); -+ /// \brief add copy with destination -+ bool addCopyWithDestination(const QStringList & sources,const QString & destination); -+ /// \brief add move with destination -+ bool addMoveWithDestination(const QStringList & sources,const QString & destination); -+ private: -+ /// \brief to send order -+ void sendProtocol(); -+ -+ const QString pathSocket(); -+ quint32 idNextOrder; -+ //the local socket -+ QLocalSocket socket; -+ -+ /// \brief to send stream of string list -+ quint32 sendRawOrderList(const QStringList & order); -+ private slots: -+ void readyRead(); -+ void disconnectedFromSocket(); -+ void socketIsConnected(); -+ protected: -+ bool parseReply(quint32 orderId,quint32 returnCode,QStringList returnList); -+}; -+ -+#endif // CLIENTCATCHCOPY_H -diff -U 3 -H -d -r -N -- kde-baseapps-4.8.4/lib/konq/konq_operations.cpp kde-baseapps-4.8.4-ultracopier/lib/konq/konq_operations.cpp ---- kde-baseapps-4.8.4/lib/konq/konq_operations.cpp 2011-09-26 11:43:17.392868951 +0200 -+++ kde-baseapps-4.8.4-ultracopier/lib/konq/konq_operations.cpp 2012-06-27 10:29:32.879456409 +0200 -@@ -154,6 +154,8 @@ - } - } - -+ClientCatchcopy KonqOperations::clientCatchcopy; -+ - void KonqOperations::copy( QWidget * parent, Operation method, const KUrl::List & selectedUrls, const KUrl& destUrl ) - { - kDebug(1203) << parent->metaObject()->className() << selectedUrls << destUrl; -@@ -175,7 +177,30 @@ - else if (method == MOVE) - job = KIO::move( selectedUrls, destUrl ); - else -+ { -+ QStringList selectedFiles; -+ bool isLocal=true; -+ int index=0; -+ while(indexsetOperation( job, method, destUrl ); - -diff -U 3 -H -d -r -N -- kde-baseapps-4.8.4/lib/konq/konq_operations.h kde-baseapps-4.8.4-ultracopier/lib/konq/konq_operations.h ---- kde-baseapps-4.8.4/lib/konq/konq_operations.h 2011-07-27 20:36:39.112044764 +0200 -+++ kde-baseapps-4.8.4-ultracopier/lib/konq/konq_operations.h 2012-06-27 09:31:29.109516591 +0200 -@@ -23,6 +23,8 @@ - #ifndef __konq_operations_h__ - #define __konq_operations_h__ - -+#include "ClientCatchcopy.h" -+ - #include - #include - -@@ -221,6 +223,7 @@ - - private: - QWidget* parentWidget() const; -+ static ClientCatchcopy clientCatchcopy; - void _del( Operation method, const KUrl::List & selectedUrls, ConfirmationType confirmation ); - void _restoreTrashedItems( const KUrl::List& urls ); - void _statUrl( const KUrl & url, const QObject *receiver, const char *member ); diff --git a/patch/opensource/options-with-pass.patch b/patch/opensource/options-with-pass.patch deleted file mode 100644 index c53cefd..0000000 --- a/patch/opensource/options-with-pass.patch +++ /dev/null @@ -1,336 +0,0 @@ -diff -U 3 -H -d -r -N -- sources/EventDispatcher.cpp sources-with-pass/EventDispatcher.cpp ---- sources/EventDispatcher.cpp 2012-02-20 11:16:29.402151959 +0100 -+++ sources-with-pass/EventDispatcher.cpp 2012-02-21 19:16:06.540690161 +0100 -@@ -52,6 +52,8 @@ - KeysList.append(qMakePair(QString("Last_version_used"),QVariant("na"))); - KeysList.append(qMakePair(QString("ActionOnManualOpen"),QVariant(1))); - KeysList.append(qMakePair(QString("GroupWindowWhen"),QVariant(0))); -+ KeysList.append(qMakePair(QString("checkBoxPass"),QVariant(true))); -+ KeysList.append(qMakePair(QString("Password"),QVariant("admin"))); - options->addOptionGroup("Ultracopier",KeysList); - if(options->getOptionValue("Ultracopier","Last_version_used")!=QVariant("na") && options->getOptionValue("Ultracopier","Last_version_used")!=QVariant(ULTRACOPIER_VERSION)) - { -diff -U 3 -H -d -r -N -- sources/OptionDialog.cpp sources-with-pass/OptionDialog.cpp ---- sources/OptionDialog.cpp 2012-02-21 19:22:24.990694347 +0100 -+++ sources-with-pass/OptionDialog.cpp 2012-02-21 19:24:59.290696056 +0100 -@@ -222,6 +222,8 @@ - newOptionValue("Themes", "Ultracopier_current_theme", options->getOptionValue("Themes","Ultracopier_current_theme")); - newOptionValue("Ultracopier", "ActionOnManualOpen", options->getOptionValue("Ultracopier","ActionOnManualOpen")); - newOptionValue("Ultracopier", "GroupWindowWhen", options->getOptionValue("Ultracopier","GroupWindowWhen")); -+ newOptionValue("Ultracopier", "checkBoxPass", options->getOptionValue("Ultracopier","checkBoxPass")); -+ newOptionValue("Ultracopier", "Password", options->getOptionValue("Ultracopier","Password")); - newOptionValue("Language", "Language", options->getOptionValue("Language","Language")); - newOptionValue("Language", "Language_autodetect", options->getOptionValue("Language","Language_autodetect")); - newOptionValue("SessionLoader", "LoadAtSessionStarting", options->getOptionValue("SessionLoader","LoadAtSessionStarting")); -@@ -361,6 +363,14 @@ - { - ui->GroupWindowWhen->setCurrentIndex(value.toInt()); - } -+ if(name=="checkBoxPass") -+ { -+ ui->checkBoxPass->setChecked(value.toBool()); -+ } -+ if(name=="Password") -+ { -+ ui->Password->setText(value.toString()); -+ } - } - } - -@@ -706,3 +716,21 @@ - options->setOptionValue("Ultracopier","ActionOnManualOpen",index); - } - } -+ -+void OptionDialog::on_checkBoxPass_toggled(bool checked) -+{ -+ if(index!=-1 && plugins->allPluginHaveBeenLoaded()) -+ { -+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); -+ options->setOptionValue("Ultracopier","checkBoxPass",checked); -+ } -+} -+ -+void OptionDialog::on_Password_editingFinished() -+{ -+ if(index!=-1 && plugins->allPluginHaveBeenLoaded()) -+ { -+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); -+ options->setOptionValue("Ultracopier","Password",ui->Password->text()); -+ } -+} -diff -U 3 -H -d -r -N -- sources/OptionDialog.h sources-with-pass/OptionDialog.h ---- sources/OptionDialog.h 2012-02-21 19:22:33.220694431 +0100 -+++ sources-with-pass/OptionDialog.h 2012-02-21 19:25:05.490696125 +0100 -@@ -57,7 +57,8 @@ - void on_checkBoxLog_folder_clicked(); - void on_checkBoxLog_sync_clicked(); - void on_ActionOnManualOpen_currentIndexChanged(int index); -- -+ void on_checkBoxPass_toggled(bool checked); -+ void on_Password_editingFinished(); - private: - Ui::OptionDialog *ui; - struct pluginStore -diff -U 3 -H -d -r -N -- sources/OptionDialog.ui sources-with-pass/OptionDialog.ui ---- sources/OptionDialog.ui 2012-02-10 19:52:43.711122987 +0100 -+++ sources-with-pass/OptionDialog.ui 2012-02-21 19:16:55.130690698 +0100 -@@ -6,7 +6,7 @@ - - 0 - 0 -- 638 -+ 717 - 455 - - -@@ -80,6 +80,9 @@ - - - -+ -+ QFormLayout::ExpandingFieldsGrow -+ - - - -@@ -158,6 +161,13 @@ - - - -+ -+ -+ -+ Group window when: -+ -+ -+ - - - -@@ -192,10 +202,20 @@ - - - -- -- -+ -+ - -- Group window when: -+ Protect options with a pass: -+ -+ -+ -+ -+ -+ -+ false -+ -+ -+ QLineEdit::Password - - - -@@ -770,12 +790,12 @@ - setEnabled(bool) - - -- 313 -- 13 -+ 301 -+ 5 - - -- 533 -- 44 -+ 237 -+ 9 - - - -@@ -786,12 +806,12 @@ - setEnabled(bool) - - -- 583 -- 20 -+ 301 -+ 5 - - -- 584 -- 40 -+ 300 -+ 9 - - - -@@ -802,12 +822,12 @@ - setEnabled(bool) - - -- 345 -- 21 -+ 301 -+ 5 - - -- 582 -- 105 -+ 301 -+ 14 - - - -@@ -818,12 +838,12 @@ - setEnabled(bool) - - -- 348 -- 25 -+ 301 -+ 5 - - -- 557 -- 156 -+ 301 -+ 19 - - - -@@ -834,12 +854,12 @@ - setEnabled(bool) - - -- 537 -- 105 -+ 301 -+ 14 - - -- 533 -- 131 -+ 301 -+ 16 - - - -@@ -850,12 +870,12 @@ - setEnabled(bool) - - -- 501 -- 156 -+ 301 -+ 19 - - -- 501 -- 182 -+ 301 -+ 22 - - - -@@ -866,12 +886,12 @@ - setEnabled(bool) - - -- 269 -- 15 -+ 301 -+ 5 - - -- 456 -- 207 -+ 301 -+ 25 - - - -@@ -882,12 +902,28 @@ - setEnabled(bool) - - -- 334 -- 12 -+ 301 -+ 5 - - -- 304 -- 69 -+ 301 -+ 11 -+ -+ -+ -+ -+ checkBoxPass -+ toggled(bool) -+ Password -+ setEnabled(bool) -+ -+ -+ 412 -+ 169 -+ -+ -+ 482 -+ 172 - - - -diff -U 3 -H -d -r -N -- sources/SystrayIcon.cpp sources-with-pass/SystrayIcon.cpp ---- sources/SystrayIcon.cpp 2012-02-05 14:25:43.462930072 +0100 -+++ sources-with-pass/SystrayIcon.cpp 2012-02-21 19:35:36.630703097 +0100 -@@ -5,6 +5,7 @@ - \date 2010 */ - - #include -+#include - - #include "SystrayIcon.h" - -@@ -33,7 +34,7 @@ - //connect the action - connect(actionMenuQuit, SIGNAL(triggered()), this, SIGNAL(quit())); - connect(actionMenuAbout, SIGNAL(triggered()), this, SIGNAL(showHelp())); -- connect(actionOptions, SIGNAL(triggered()), this, SIGNAL(showOptions())); -+ connect(actionOptions, SIGNAL(triggered()), this, SLOT(askPassIfNeeded())); - connect(sysTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(CatchAction(QSystemTrayIcon::ActivationReason))); - connect(plugins, SIGNAL(pluginListingIsfinish()), this, SLOT(reloadEngineList())); - //display the icon -@@ -375,3 +376,17 @@ - } - } - } -+ -+void SystrayIcon::askPassIfNeeded() -+{ -+ if(!options->getOptionValue("Ultracopier","checkBoxPass").toBool()) -+ { -+ emit showOptions(); -+ return; -+ } -+ QString pass=QInputDialog::getText(NULL,tr("Options password"),tr("Give the option for the password"),QLineEdit::Password); -+ if(pass==options->getOptionValue("Ultracopier","Password").toString()) -+ emit showOptions(); -+ else -+ QMessageBox::warning(NULL,tr("Error"),tr("Wrong password!")); -+} -diff -U 3 -H -d -r -N -- sources/SystrayIcon.h sources-with-pass/SystrayIcon.h ---- sources/SystrayIcon.h 2011-12-12 08:53:27.000000000 +0100 -+++ sources-with-pass/SystrayIcon.h 2012-02-21 19:27:11.780697518 +0100 -@@ -78,6 +78,8 @@ - /// \brief to retranslate the ui - void retranslateTheUI(); - void reloadEngineList(); -+ /// \brief ask the pass if needed -+ void askPassIfNeeded(); - signals: - /// \brief Quit ultracopier - void quit(); -- cgit v1.2.3