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
|
From: <ya...@us...> - 2003-11-29 17:10:44
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Panel In directory sc8-pr-cvs1:/tmp/cvs-serv20663/krusader/Panel Modified Files: panelfunc.cpp panelfunc.h Log Message: Removed all the code that used arc_vfs, urls with "\\" and integrated all the archive types that are supported by the KrArc slave. Index: panelfunc.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Panel/panelfunc.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** panelfunc.cpp 2 Nov 2003 22:57:03 -0000 1.43 --- panelfunc.cpp 29 Nov 2003 17:10:41 -0000 1.44 *************** *** 54,58 **** #include "../VFS/normal_vfs.h" #include "../VFS/ftp_vfs.h" - #include "../VFS/arc_vfs.h" #include "../VFS/temp_vfs.h" #include "../VFS/vfile.h" --- 54,57 ---- *************** *** 201,205 **** } ! void ListPanelFunc::openUrl( const QString& path) { panel->slotFocusOnMe(); --- 200,204 ---- } ! void ListPanelFunc::openUrl( const QString& path,const QString& nameToMakeCurrent) { panel->slotFocusOnMe(); *************** *** 207,244 **** // clear the view - to avoid a repaint crash ! panel->view->clear(); ! // make sure local urls are handles ok if ( mypath.lower().startsWith( "file:" ) ) mypath = mypath.mid( 5 ); - // check for archive: - if ( mypath.contains( '\\' ) ) { - // do we need to change VFS ? - QString archive = mypath.left( mypath.find( '\\' ) ); - QString directory = mypath.mid( mypath.findRev( '\\' ) + 1 ); - // find the archive type - QString type; - QString mime = KMimeType::findByURL( archive ) ->name(); - type = mime.right( 4 ); - if ( type == "-rpm" ) type = "+rpm"; // open the rpm as normal archive - if ( mime.contains( "-rar" ) ) type = "-rar"; - changeVFS( type, archive ); - // add warning to the backStack - if ( backStack.last() != "//WARNING//" ) - backStack.append( "//WARNING//" ); - - if ( !directory.isEmpty() ) { - panel->view->setNameToMakeCurrent( directory.mid( directory.findRev( '/' ) + 1 ) ); - directory = directory.left( directory.findRev( '/' ) ); - refresh( archive + "\\" + directory ); - } - } // remote file systems ! else if ( mypath.contains( ":/" ) ) { // first close all open archives / remote connections ! while ( files() ->vfs_getType() != "normal" ) ! vfsStack.remove(); ! changeVFS( "ftp", mypath ); } else { // local directories // first close all open archives / remote connections --- 206,231 ---- // clear the view - to avoid a repaint crash ! panel->view->clear(); ! if( !nameToMakeCurrent.isEmpty() ){ ! 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(); ! return ; ! } ! // save the current vfs ! files() ->blockSignals( true ); ! vfsStack.push( v ); } else { // local directories // first close all open archives / remote connections *************** *** 696,706 **** } else if ( KRarcHandler::arcHandled( type ) && !origin.contains(":/")) { QString path = files()->vfs_getFile(vf->vfile_getName()); ! if( type == "-zip" || type.contains("rar") || type == "-rpm" ){ ! path = "krarc:"+path; ! } else if ( type == "-tbz" || type == "-tgz" || type == "tarz" || type == "-tar" ){ ! path = "tar:"+path; } else { ! path = path+"\\"; ! } openUrl( path ); } else { --- 683,691 ---- } 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 { *************** *** 719,727 **** // Do we need to change vfs ? bool changeVFS = files()->vfs_error(); - if ( origin.right( 1 ) == "\\" && dynamic_cast<arc_vfs *>(files()) ) { // leaving arc_vfs - changeVFS = true; - // make the current archive the current item on the new list - panel->view->setNameToMakeCurrent(origin.mid(origin.findRev('/')+1,origin.length()-origin.findRev('/')-2) ); - } if( origin.contains(":/") ){ // ftp_vfs --- 704,707 ---- *************** *** 757,794 **** } - void ListPanelFunc::changeVFS( QString type, QString origin ) { - panel->view->setNameToMakeCurrent( QString::null ); - vfs* v; - if ( type == "ftp" ) - v = new ftp_vfs( origin, panel ); - else if ( type == "-ace" || type == "-arj" || type == "-rpm" ) - v = new temp_vfs( origin, type, panel, files() ->vfs_isWritable() ); - else - v = new arc_vfs( origin, type, panel, files() ->vfs_isWritable() ); - - if ( v->vfs_error() ) { - kdWarning() << "Failed to create vfs: " << origin.local8Bit() << endl; - delete v; - refresh(); - return ; - } - - // save the current vfs - files() ->blockSignals( true ); - vfsStack.push( v ); - - while ( origin.right( 1 ) == "/" ) - origin.truncate( origin.length() - 1 ); - - if ( type != "ftp" ) { - // refresh our newly created vfs - QString path = panel->virtualPath; - while ( path.right( 1 ) == "/" ) - path.truncate( path.length() - 1 ); - QString name = origin.mid( origin.findRev( '/' ) ); - files() ->vfs_refresh( path + name + "\\" ); - } - } - void ListPanelFunc::pack() { QStringList fileNames; --- 737,740 ---- *************** *** 802,806 **** // choose the default name QString defaultName = panel->virtualPath.right( panel->virtualPath.length() - panel->virtualPath.findRev( '/' ) - 1 ); ! if ( defaultName == "" || defaultName.right( 1 ) == "\\" ) defaultName = "pack"; if ( fileNames.count() == 1 ) --- 748,752 ---- // choose the default name QString defaultName = panel->virtualPath.right( panel->virtualPath.length() - panel->virtualPath.findRev( '/' ) - 1 ); ! if ( defaultName == "" ) defaultName = "pack"; if ( fileNames.count() == 1 ) *************** *** 813,823 **** bool packToOtherPanel = ( PackGUI::destination == panel->otherPanel->virtualPath ); - if ( PackGUI::destination.contains( '\\' ) ) // packing into archive - if ( !packToOtherPanel ) { - KMessageBox::sorry( krApp, i18n( "When Packing into archive - you must use the active directory" ) ); - return ; - } else - PackGUI::destination = otherFunc() ->files() ->vfs_workingDir(); - QString arcFile = PackGUI::destination + "/" + PackGUI::filename + "." + PackGUI::type; --- 759,762 ---- *************** *** 895,905 **** bool packToOtherPanel = ( dest == panel->otherPanel->virtualPath ); - if ( dest.contains( '\\' ) ) // unpacking into archive - if ( !packToOtherPanel ) { - KMessageBox::sorry( krApp, i18n( "When unpacking into archive - you must use the active directory" ) ); - return ; - } else - dest = otherFunc() ->files() ->vfs_workingDir(); - for ( unsigned int i = 0; i < fileNames.count(); ++i ) { QString arcName = fileNames[ i ]; --- 834,837 ---- *************** *** 960,972 **** } ! void ListPanelFunc::newFTPconnection( QString host ) { ! if ( host == QString::null ) { ! host = KRSpWidgets::newFTP(); ! // if the user canceled - quit ! if ( host == QString::null ) ! return ; ! } krFTPDiss->setEnabled( true ); ! changeVFS( "ftp", host ); } --- 892,902 ---- } ! void ListPanelFunc::newFTPconnection() { ! QString url; ! url = KRSpWidgets::newFTP(); ! // if the user canceled - quit ! if ( url.isEmpty() ) return ; krFTPDiss->setEnabled( true ); ! openUrl(url ); } Index: panelfunc.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Panel/panelfunc.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** panelfunc.h 19 Sep 2003 22:35:32 -0000 1.14 --- panelfunc.h 29 Nov 2003 17:10:41 -0000 1.15 *************** *** 99,103 **** public slots: void execute(QString&); ! void openUrl(const QString& path); void refresh(){ refresh(panel->virtualPath); } // re-read the files void rename(const QString &oldname, const QString &newname); --- 99,103 ---- public slots: void execute(QString&); ! void openUrl(const QString& path, const QString& nameToMakeCurrent = QString::null); void refresh(){ refresh(panel->virtualPath); } // re-read the files void rename(const QString &oldname, const QString &newname); *************** *** 133,138 **** bool calcSpace(QStringList & names,KIO::filesize_t & totalSize,unsigned long & totalFiles,unsigned long & totalDirs); void FTPDisconnect(); ! void newFTPconnection(QString host=QString::null); ! void changeVFS(QString type, QString origin); inline ListPanelFunc* otherFunc(){ return panel->otherPanel->func; } --- 133,137 ---- bool calcSpace(QStringList & names,KIO::filesize_t & totalSize,unsigned long & totalFiles,unsigned long & totalDirs); void FTPDisconnect(); ! void newFTPconnection(); inline ListPanelFunc* otherFunc(){ return panel->otherPanel->func; } |
From: <ya...@us...> - 2003-11-29 17:06:56
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Panel In directory sc8-pr-cvs1:/tmp/cvs-serv19703/krusader/Panel Modified Files: krdetailedview.cpp Log Message: Fixed compile time warnings Index: krdetailedview.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Panel/krdetailedview.cpp,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** krdetailedview.cpp 24 Oct 2003 16:58:02 -0000 1.50 --- krdetailedview.cpp 29 Nov 2003 17:06:53 -0000 1.51 *************** *** 726,730 **** } ! void KrDetailedView::slotMouseClicked( int button, QListViewItem * item, const QPoint & pos, int c ) { if (button == Qt::MidButton) emit middleButtonClicked(item); --- 726,730 ---- } ! void KrDetailedView::slotMouseClicked( int button, QListViewItem * item, const QPoint&,int) { if (button == Qt::MidButton) emit middleButtonClicked(item); |
From: <ya...@us...> - 2003-11-29 17:04:21
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Search In directory sc8-pr-cvs1:/tmp/cvs-serv19296/krusader/Search Modified Files: krsearchdialog.cpp krsearchmod.cpp krsearchmod.h Log Message: Replaced arc_vfs with ftp_vfs when scanning archives Index: krsearchdialog.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchdialog.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** krsearchdialog.cpp 1 Oct 2003 13:17:50 -0000 1.11 --- krsearchdialog.cpp 29 Nov 2003 17:04:18 -0000 1.12 *************** *** 553,557 **** void KrSearchDialog::resultClicked(QListViewItem* i) { ! krApp->mainView->activePanel->func->openUrl((i->text(1)).replace(QRegExp("#"),"\\")+"/"+i->text(0)); showMinimized(); } --- 553,557 ---- void KrSearchDialog::resultClicked(QListViewItem* i) { ! krApp->mainView->activePanel->func->openUrl((i->text(1)),i->text(0)); showMinimized(); } *************** *** 571,575 **** QListBoxItem *item; ! while( item = list_box->item(i) ) { if( item->isSelected() ) --- 571,575 ---- QListBoxItem *item; ! while( (item = list_box->item(i)) ) { if( item->isSelected() ) Index: krsearchmod.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchmod.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** krsearchmod.cpp 1 Oct 2003 13:17:50 -0000 1.6 --- krsearchmod.cpp 29 Nov 2003 17:04:18 -0000 1.7 *************** *** 33,37 **** #include "../krusader.h" #include "../resources.h" ! #include "../VFS/arc_vfs.h" #include "../VFS/vfile.h" #include "../VFS/krpermhandler.h" --- 33,37 ---- #include "../krusader.h" #include "../resources.h" ! #include "../VFS/ftp_vfs.h" #include "../VFS/vfile.h" #include "../VFS/krpermhandler.h" *************** *** 227,233 **** // ace and rar archives are currently not suported if (type == "-arj" || type == "-ace" ) return; ! ! vfs *v = new arc_vfs(archive,type,0,true); ! if ( v->vfs_error() ){ kdWarning() << "Failed to open vfs: " << archive.local8Bit() << endl; --- 227,241 ---- // ace and rar archives are currently not suported if (type == "-arj" || type == "-ace" ) return; ! ! QString url; ! ! if ( type == "-tbz" || type == "-tgz" || type == "tarz" || type == "-tar" ){ ! url = "tar:"+archive; ! } else { ! url = "krarc:"+archive; ! } ! ! ftp_vfs *v = new ftp_vfs(url,0); ! if ( v->vfs_error() ){ kdWarning() << "Failed to open vfs: " << archive.local8Bit() << endl; *************** *** 236,251 **** } emit searching(archive); ! qApp->processEvents(); ! scanVfsDir(v,"\\",archive); delete v; } ! void KRSearchMod::scanVfsDir( vfs* v, QString dir, QString archive ){ ! v->vfs_refresh(dir); for( vfile* vf=v->vfs_getFirstFile(); vf != 0 ; vf=v->vfs_getNextFile() ){ QString name = vf->vfile_getName(); if ( vf->vfile_isDir() ){ ! scanVfsDir(v,dir+"/"+name,archive); ! v->vfs_refresh(dir); } // see if the name matches --- 244,267 ---- } emit searching(archive); ! while(v->isBusy()) qApp->processEvents(); ! ! unScanedUrls.push(v->vfs_getOrigin()); ! while( !unScanedUrls.isEmpty() ) scanURL(v,unScanedUrls.pop()); delete v; } ! 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() ){ QString name = vf->vfile_getName(); + if ( vf->vfile_isDir() ){ ! unScanedUrls.append(v->vfs_getOrigin()+"/"+name); } // see if the name matches *************** *** 269,274 **** // if we got here - we got a winner ! results.append(dir+name); ! emit found(name, archive+dir, size, vf->vfile_getTime_t(),vf->vfile_getPerm()); qApp->processEvents(); } --- 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(); } Index: krsearchmod.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchmod.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** krsearchmod.h 20 Sep 2003 10:17:08 -0000 1.3 --- krsearchmod.h 29 Nov 2003 17:04:18 -0000 1.4 *************** *** 35,38 **** --- 35,39 ---- #include <qobject.h> + #include <qvaluestack.h> #include <qstringlist.h> #include <time.h> *************** *** 40,44 **** class KRQuery; ! class vfs; class KRSearchMod : public QObject { --- 41,45 ---- class KRQuery; ! class ftp_vfs; class KRSearchMod : public QObject { *************** *** 50,54 **** void scanDir( QString dir); void scanArchive( QString archive, QString type ); ! void scanVfsDir( vfs* v, QString dir,QString Archive ); void start(); void stop(); --- 51,55 ---- void scanDir( QString dir); void scanArchive( QString archive, QString type ); ! void scanURL( ftp_vfs* v, QString url ); void start(); void stop(); *************** *** 65,68 **** --- 66,70 ---- bool fileMatch(QString name); QStringList scanedDirs; + QValueStack<QString> unScanedUrls; KRQuery *query; QStringList results; |
From: <ya...@us...> - 2003-11-29 17:00:54
|
Update of /cvsroot/krusader/krusader_kde3/krusader/VFS In directory sc8-pr-cvs1:/tmp/cvs-serv18631/krusader/VFS Modified Files: ftp_vfs.cpp ftp_vfs.h Log Message: Added a isBusy() function which return true when the KIO::Slave is working in the background Index: ftp_vfs.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/ftp_vfs.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** ftp_vfs.cpp 2 Nov 2003 22:57:03 -0000 1.20 --- ftp_vfs.cpp 29 Nov 2003 17:00:50 -0000 1.21 *************** *** 58,62 **** } ! ftp_vfs::ftp_vfs(QString origin,QWidget* panel):vfs(panel){ // set the writable attribute isWritable = true; --- 58,62 ---- } ! ftp_vfs::ftp_vfs(QString origin,QWidget* panel):vfs(panel),busy(false){ // set the writable attribute isWritable = true; *************** *** 170,182 **** vfs_url = vfs_url_backup; } return; } // if we got so far - so good notConnected = false; // tell the panel to get ready if (!quietMode) { emit startUpdate(); ! endUpdate(); } } --- 170,184 ---- vfs_url = vfs_url_backup; } + busy = false; return; } // if we got so far - so good notConnected = false; + busy = false; // tell the panel to get ready if (!quietMode) { emit startUpdate(); ! emit endUpdate(); } } *************** *** 197,200 **** --- 199,204 ---- return false; } + + busy = true; if( !loginName.isEmpty()) url.setUser(loginName); Index: ftp_vfs.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/ftp_vfs.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ftp_vfs.h 6 Oct 2003 15:57:22 -0000 1.6 --- ftp_vfs.h 29 Nov 2003 17:00:51 -0000 1.7 *************** *** 59,62 **** --- 59,64 ---- // not implemented for ftp ! void vfs_calcSpace(QString ,KIO::filesize_t *,unsigned long *,unsigned long *,bool*){} + + inline bool isBusy(){ return busy; } public slots: *************** *** 84,89 **** int port; - private: KURL separateUserAndPassword( QString origin ); }; --- 86,91 ---- int port; KURL separateUserAndPassword( QString origin ); + bool busy; }; |
From: <ya...@us...> - 2003-11-29 16:58:27
|
Update of /cvsroot/krusader/krusader_kde3/krusader In directory sc8-pr-cvs1:/tmp/cvs-serv18218/krusader Modified Files: krslots.cpp krslots.h Log Message: Removed newFTPconnection(host) - openUrl do the same thing and more... Index: krslots.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krslots.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** krslots.cpp 29 Nov 2003 12:05:30 -0000 1.28 --- krslots.cpp 29 Nov 2003 16:58:23 -0000 1.29 *************** *** 282,288 **** void KRslots::calcSpace() { ACTIVE_FUNC->calcSpace(); } void KRslots::FTPDisconnect() { ACTIVE_FUNC->FTPDisconnect(); } ! void KRslots::newFTPconnection(){ newFTPconnection(QString::null); } ! void KRslots::newFTPconnection(QString host) ! { ACTIVE_FUNC->newFTPconnection(host); } // run external modules / programs void KRslots::runKonfigurator(bool firstTime) { delete new Konfigurator(firstTime); } --- 282,287 ---- void KRslots::calcSpace() { ACTIVE_FUNC->calcSpace(); } void KRslots::FTPDisconnect() { ACTIVE_FUNC->FTPDisconnect(); } ! void KRslots::newFTPconnection(){ newFTPconnection(); } ! // run external modules / programs void KRslots::runKonfigurator(bool firstTime) { delete new Konfigurator(firstTime); } *************** *** 321,325 **** if (host==QString::null) return; // otherwise, attempt a connection ! newFTPconnection(host); } --- 320,324 ---- if (host==QString::null) return; // otherwise, attempt a connection ! ACTIVE_FUNC->openUrl(host); } Index: krslots.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krslots.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** krslots.h 29 Nov 2003 12:05:30 -0000 1.16 --- krslots.h 29 Nov 2003 16:58:23 -0000 1.17 *************** *** 92,96 **** void customFilter(); void newFTPconnection(); - void newFTPconnection( QString host ); void runKonfigurator( bool firstTime = false ); void startKonfigurator() { runKonfigurator( false ); } --- 92,95 ---- |
From: <ya...@us...> - 2003-11-29 16:52:18
|
Update of /cvsroot/krusader/krusader_kde3/krArc In directory sc8-pr-cvs1:/tmp/cvs-serv17139/krArc Modified Files: krarc.cpp Log Message: Added support for bzip2 and gzip archives Index: krarc.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krArc/krarc.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** krarc.cpp 12 Nov 2003 16:43:42 -0000 1.11 --- krarc.cpp 29 Nov 2003 16:52:03 -0000 1.12 *************** *** 18,21 **** --- 18,22 ---- #include <sys/stat.h> #include <fcntl.h> + #include <time.h> *************** *** 462,474 **** // no need to rescan the archive if it's not changed if( !archiveChanged && !forced ) return true; // write the temp file KShellProcess proc; KTempFile temp("krarc","tmp"); temp.setAutoDelete(true); ! ! proc << listCmd << "\""+arcFile->url().path()+"\"" <<" > " << temp.name(); ! proc.start(KProcess::Block); ! if( !proc.normalExit() || !proc.exitStatus() == 0 ) return false; ! // clear the dir dictionary dirDict.clear(); --- 463,476 ---- // no need to rescan the archive if it's not changed if( !archiveChanged && !forced ) return true; + // write the temp file KShellProcess proc; KTempFile temp("krarc","tmp"); temp.setAutoDelete(true); ! if( arcType != "bzip2" ){ ! proc << listCmd << "\""+arcFile->url().path()+"\"" <<" > " << temp.name(); ! proc.start(KProcess::Block); ! if( !proc.normalExit() || !proc.exitStatus() == 0 ) return false; ! } // clear the dir dictionary dirDict.clear(); *************** *** 493,496 **** --- 495,504 ---- root->append(entry); + if( arcType == "bzip2" ){ + KRDEBUG("Got me here..."); + parseLine(0,"",temp.file()); + return true; + } + // parse the temp file temp.file()->open(IO_ReadOnly); *************** *** 648,652 **** } ! void kio_krarcProtocol::parseLine(int, QString line, QFile*){ UDSEntryList* dir; UDSEntry entry; --- 656,660 ---- } ! void kio_krarcProtocol::parseLine(int lineNo, QString line, QFile*){ UDSEntryList* dir; UDSEntry entry; *************** *** 716,725 **** // symlink destination if( S_ISLNK(mode) ){ ! // ignore the next 3 fields ! nextWord(line); nextWord(line); nextWord(line); ! symlinkDest = nextWord(line); } } ! if( fullName.right(1) == "/" ) fullName = fullName.left(fullName.length()-1); if( !fullName.startsWith("/") ) fullName = "/"+fullName; --- 724,752 ---- // symlink destination if( S_ISLNK(mode) ){ ! // ignore the next 3 fields ! nextWord(line); nextWord(line); nextWord(line); ! symlinkDest = nextWord(line); } } ! if( arcType == "gzip" ){ ! if( !lineNo ) return; //ignore the first line ! // first field is uncompressed size - ignore it ! nextWord(line); ! // size ! size = nextWord(line).toULong(); ! // ignore the next field ! nextWord(line); ! // full name ! fullName = nextWord(line); ! fullName = fullName.mid(fullName.findRev("/")+1); ! } ! if( arcType == "bzip2" ){ ! // There is no way to list bzip2 files, so we take our information from ! // the archive itself... ! fullName = arcFile->name(); ! if( fullName.endsWith("bz2") ) fullName.truncate(fullName.length()-4); ! mode = arcFile->mode(); ! size = arcFile->size(); ! } if( fullName.right(1) == "/" ) fullName = fullName.left(fullName.length()-1); if( !fullName.startsWith("/") ) fullName = "/"+fullName; *************** *** 767,770 **** --- 794,799 ---- bool kio_krarcProtocol::initArcParameters(){ + KRDEBUG("arcType: "<<arcType); + if(arcType == "zip"){ cmd = "unzip"; *************** *** 785,788 **** --- 814,829 ---- delCmd = QString::null; putCmd = QString::null; + } else if(arcType == "gzip"){ + cmd = "gzip"; + listCmd = "gzip -l"; + getCmd = "gzip -dc"; + delCmd = QString::null; + putCmd = QString::null; + } else if(arcType == "bzip2"){ + cmd = "bzip2" ; + listCmd = "bzip2"; + getCmd = "bzip2 -dc"; + delCmd = QString::null; + putCmd = QString::null; } else { cmd = QString::null; *************** *** 797,800 **** --- 838,842 ---- cmd+ i18n("\nMake sure that the %1 binary are installed properly on your system.").arg(cmd)); + KRDEBUG("Failed to find cmd: " << cmd); return false; } |
From: <ya...@us...> - 2003-11-29 16:48:02
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1:/tmp/cvs-serv16518 Modified Files: krusader.kdevprj Log Message: Added the Splitter folder Index: krusader.kdevprj =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader.kdevprj,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** krusader.kdevprj 29 Nov 2003 11:09:24 -0000 1.35 --- krusader.kdevprj 29 Nov 2003 16:47:58 -0000 1.36 *************** *** 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 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 *************** *** 942,945 **** --- 942,985 ---- [krusader/Search/krsearchmod.h] + dist=true + install=false + install_location= + type=HEADER + + [krusader/Splitter/Makefile.am] + files=krusader/Splitter/combiner.cpp,krusader/Splitter/combiner.h,krusader/Splitter/splitter.cpp,krusader/Splitter/splitter.h,krusader/Splitter/splittergui.cpp,krusader/Splitter/splittergui.h + type=static_library + + [krusader/Splitter/combiner.cpp] + dist=true + install=false + install_location= + type=SOURCE + + [krusader/Splitter/combiner.h] + dist=true + install=false + install_location= + type=HEADER + + [krusader/Splitter/splitter.cpp] + dist=true + install=false + install_location= + type=SOURCE + + [krusader/Splitter/splitter.h] + dist=true + install=false + install_location= + type=HEADER + + [krusader/Splitter/splittergui.cpp] + dist=true + install=false + install_location= + type=SOURCE + + [krusader/Splitter/splittergui.h] dist=true install=false |
From: <ck...@us...> - 2003-11-29 12:05:33
|
Update of /cvsroot/krusader/krusader_kde3/krusader In directory sc8-pr-cvs1:/tmp/cvs-serv5962/krusader_kde3/krusader Modified Files: krslots.cpp krslots.h krusader.cpp krusader.h krusaderui.rc Log Message: ADDED: file splitter Index: krslots.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krslots.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** krslots.cpp 24 Oct 2003 16:37:03 -0000 1.27 --- krslots.cpp 29 Nov 2003 12:05:30 -0000 1.28 *************** *** 67,70 **** --- 67,73 ---- #include "VFS/vfs.h" #include "panelmanager.h" + #include "Splitter/splittergui.h" + #include "Splitter/splitter.h" + #include "Splitter/combiner.h" #define ACTIVE_PANEL (krApp->mainView->activePanel) *************** *** 493,496 **** --- 496,602 ---- void KRslots::closeTab() { ACTIVE_PANEL_MANAGER->slotCloseTab(); + } + + void KRslots::slotSplit() + { + QStringList list; + QString name; + + ((ListPanel*)ACTIVE_PANEL)->getSelectedNames(&list); + + // first, see if we've got exactly 1 selected file, if not, try the current one + if (list.count() == 1) name = list[0]; + + if ( name.isEmpty() ) { + // if we got here, then one of the panel can't be sure what file to diff + KMessageBox::error(0,i18n("Don't know which file to split.")); + return; + } + + QString fileName = ACTIVE_FUNC->files()->vfs_getFile(name); + if( fileName == QString::null ) + return; + + if ( ACTIVE_FUNC->files()->vfs_search( name )->vfile_isDir() ) { + KMessageBox::sorry( krApp, i18n( "You can't split a directory!" ) ); + return ; + } + + QString destDir = ACTIVE_PANEL->otherPanel->func->files()->vfs_getOrigin(); + + SplitterGUI splitterGUI( MAIN_VIEW, fileName, destDir ); + + if( splitterGUI.result() == QDialog::Accepted ) + { + bool splitToOtherPanel = ( splitterGUI.getDestinationDir() == ACTIVE_PANEL->otherPanel->virtualPath ); + + Splitter split( MAIN_VIEW, fileName, splitterGUI.getDestinationDir() ); + split.split( splitterGUI.getSplitSize() ); + + if ( splitToOtherPanel ) + ACTIVE_PANEL->otherPanel->func->refresh(); + } + } + + void KRslots::slotCombine() + { + QStringList list; + QString fileName; + + ((ListPanel*)ACTIVE_PANEL)->getSelectedNames(&list); + if ( list.isEmpty() ) + { + KMessageBox::error(0,i18n("Don't know which files to combine.")); + return; + } + + for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) + { + QString name = ACTIVE_FUNC->files()->vfs_getFile(*it); + if( name == QString::null ) + return; + + if ( ACTIVE_FUNC->files()->vfs_search( *it )->vfile_isDir() ) { + KMessageBox::sorry( krApp, i18n( "You can't combine a directory!" ) ); + return ; + } + + int extPos = name.findRev( '.' ); + + QString ext = name.mid( extPos + 1 ); + bool isExtInt; + ext.toInt( &isExtInt, 10 ); + + if( extPos < 1 || ext.isEmpty() || ( ext != "spl" && !isExtInt ) ) + { + KMessageBox::error(0,i18n("Not a splitted file %1!").arg( name )); + return; + } + + name.truncate( extPos ); + + if( fileName.isEmpty() ) + fileName = name; + else if( fileName != name ) + { + KMessageBox::error(0,i18n("Select only one splitted file!")); + return; + } + } + + // ask the user for the copy dest + KChooseDir *chooser = new KChooseDir( 0, i18n( "Combining %1.* to directory:" ).arg( fileName ), + ACTIVE_PANEL->otherPanel->getPath() ); + QString dest = chooser->dest; + if ( dest == QString::null ) + return ; // the usr canceled + + bool combineToOtherPanel = ( dest == ACTIVE_PANEL->otherPanel->virtualPath ); + + Combiner combine( MAIN_VIEW, fileName, dest ); + combine.combine(); + + if ( combineToOtherPanel ) + ACTIVE_PANEL->otherPanel->func->refresh(); } Index: krslots.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krslots.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** krslots.h 24 Oct 2003 16:38:03 -0000 1.15 --- krslots.h 29 Nov 2003 12:05:30 -0000 1.16 *************** *** 113,116 **** --- 113,118 ---- void newTab(QListViewItem *item); void closeTab(); + void slotSplit(); + void slotCombine(); // F2 Index: krusader.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krusader.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** krusader.cpp 18 Oct 2003 12:39:46 -0000 1.43 --- krusader.cpp 29 Nov 2003 12:05:30 -0000 1.44 *************** *** 108,111 **** --- 108,113 ---- KAction *Krusader::actDupTab = 0; KAction *Krusader::actCloseTab = 0; + KAction *Krusader::actSplit = 0; + KAction *Krusader::actCombine = 0; KToggleAction *Krusader::actToggleTerminal = 0; *************** *** 368,371 **** --- 370,377 ---- actUnpack = new KAction( i18n( "&Unpack" ), "kr_arc_unpack", ALT + Key_U, SLOTS, SLOT( slotUnpack() ), actionCollection() , "unpack" ); + actSplit = new KAction( i18n( "Sp&lit file" ), 0, CTRL + Key_P, + SLOTS, SLOT( slotSplit() ), actionCollection(), "split" ); + actCombine = new KAction( i18n( "Com&bine files" ), 0, CTRL + Key_B, + SLOTS, SLOT( slotCombine() ), actionCollection() , "combine" ); actSelect = new KAction( i18n( "Select &Group" ), "kr_select", CTRL + Key_Plus, SLOTS, SLOT( markGroup() ), actionCollection(), "select group" ); Index: krusader.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krusader.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** krusader.h 18 Oct 2003 12:39:46 -0000 1.14 --- krusader.h 29 Nov 2003 12:05:30 -0000 1.15 *************** *** 100,104 **** static KAction *actKonfigurator, *actToolsSetup, *actBack, *actRoot, *actFind, *actDirUp; static KAction *actSelectColorMask, *actMultiRename, *actAllFilter, *actOpenLeftBm, *actOpenRightBm; ! static KAction *actNewTab, *actDupTab, *actCloseTab; 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; static KToggleAction *actToggleTerminal; KToggleAction *actToggleFnkeys, *actToggleCmdline, *actShowToolBar, *actToggleSwapPanels, *************** *** 170,173 **** --- 170,175 ---- #define krDupTab Krusader::App->actDupTab #define krCloseTab Krusader::App->actCloseTab + #define krSplit Krusader::App->actSplit + #define krCombine Krusader::App->actCombine #endif Index: krusaderui.rc =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krusaderui.rc,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** krusaderui.rc 3 Oct 2003 18:20:50 -0000 1.14 --- krusaderui.rc 29 Nov 2003 12:05:30 -0000 1.15 *************** *** 13,16 **** --- 13,19 ---- <Action name="std_print" /> <Separator/> + <Action name="split" /> + <Action name="combine" /> + <Separator/> <Action name="std_quit" /> </Menu> |
From: <ck...@us...> - 2003-11-29 12:05:32
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1:/tmp/cvs-serv5962/krusader_kde3 Modified Files: ChangeLog Log Message: ADDED: file splitter Index: ChangeLog =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/ChangeLog,v retrieving revision 1.140 retrieving revision 1.141 diff -C2 -d -r1.140 -r1.141 *** ChangeLog 28 Nov 2003 17:06:35 -0000 1.140 --- ChangeLog 29 Nov 2003 12:05:30 -0000 1.141 *************** *** 1,2 **** --- 1,3 ---- + ADDED: file splitter FIXED: crash at closing the progressbar window at packing FIXED: no or uninformative error message at packing to a readonly directory |
From: <ck...@us...> - 2003-11-29 11:09:27
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Splitter In directory sc8-pr-cvs1:/tmp/cvs-serv29941/krusader_kde3/krusader/Splitter Added Files: Makefile.am Log Message: Inserting the Splitter files into the build --- NEW FILE: Makefile.am --- ####### kdevelop will overwrite this part!!! (begin)########## noinst_LIBRARIES = libSplitter.a INCLUDES = $(all_includes) libSplitter_a_METASOURCES = AUTO libSplitter_a_SOURCES = splittergui.cpp splitter.cpp combiner.cpp EXTRA_DIST = combiner.cpp combiner.h splitter.cpp splitter.h splittergui.cpp splittergui.h ####### kdevelop will overwrite this part!!! (end)############ |
From: <ck...@us...> - 2003-11-29 11:09:27
|
Update of /cvsroot/krusader/krusader_kde3/krusader In directory sc8-pr-cvs1:/tmp/cvs-serv29941/krusader_kde3/krusader Modified Files: Makefile.am Log Message: Inserting the Splitter files into the build Index: Makefile.am =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile.am 20 Sep 2003 20:18:56 -0000 1.8 --- Makefile.am 29 Nov 2003 11:09:24 -0000 1.9 *************** *** 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 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 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 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 |
From: <ck...@us...> - 2003-11-29 11:09:27
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1:/tmp/cvs-serv29941/krusader_kde3 Modified Files: krusader.kdevprj Log Message: Inserting the Splitter files into the build Index: krusader.kdevprj =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader.kdevprj,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** krusader.kdevprj 14 Nov 2003 16:22:21 -0000 1.34 --- krusader.kdevprj 29 Nov 2003 11:09:24 -0000 1.35 *************** *** 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 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 modifyMakefiles=true project_name=Krusader |
Update of /cvsroot/krusader/krusader_kde3/krusader/Splitter In directory sc8-pr-cvs1:/tmp/cvs-serv14140/krusader_kde3/krusader/Splitter Added Files: combiner.cpp combiner.h splitter.cpp splitter.h splittergui.cpp splittergui.h Log Message: ADDED: splitter files --- NEW FILE: combiner.cpp --- /*************************************************************************** combiner.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 "combiner.h" #include <klocale.h> #include <kmessagebox.h> #include <kfileitem.h> #include <kio/job.h> #include <qfileinfo.h> Combiner::Combiner( QWidget* parent, QString fileNameIn, QString destinationDirIn ) : QProgressDialog( parent, "Krusader::Combiner", true, 0 ), hasValidSplitFile( false ), fileCounter ( 0 ), permissions( -1 ), receivedSize( 0 ), combineWriteJob( 0 ) { fileName = fileNameIn; destinationDir = destinationDirIn; if( !destinationDir.endsWith("/") ) destinationDir += "/"; md5Context = new KMD5( "" ); md5Context->reset(); splitFile = ""; setTotalSteps( 100 ); setAutoClose( false ); /* don't close or reset the dialog automatically */ setAutoReset( false ); } Combiner::~Combiner() { combineAbortJobs(); delete md5Context; } void Combiner::combine() { setCaption( i18n("Krusader::Combining...") ); setLabelText( i18n("Combining the file %1...").arg( fileName )); /* check whether the .spl file exists */ splURL = KURL::fromPathOrURL( fileName + ".spl" ); KFileItem file(KFileItem::Unknown, KFileItem::Unknown, splURL ); file.refresh(); if( !file.isReadable() ) { int ret = KMessageBox::questionYesNo(0, i18n("The SPL information file (%1) is missing!\n" "Validity checking is impossible without it. Continue combining?").arg( splURL.path() ) ); if( ret == KMessageBox::No ) { emit reject(); return; } openNextFile(); } else { permissions = file.permissions() | QFileInfo::WriteUser; combineReadJob = KIO::get( splURL, false, false ); connect(combineReadJob, SIGNAL(data(KIO::Job *, const QByteArray &)), this, SLOT(combineSplitFileDataReceived(KIO::Job *, const QByteArray &))); connect(combineReadJob, SIGNAL(result(KIO::Job*)), this, SLOT(combineSplitFileFinished(KIO::Job *))); } exec(); } void Combiner::combineSplitFileDataReceived(KIO::Job *, const QByteArray &byteArray) { splitFile += QString( byteArray ); } void Combiner::combineSplitFileFinished(KIO::Job *job) { combineReadJob = 0; QString error; if( job->error() ) error = i18n("Error at reading the split file (%1)!").arg( splURL.path() ); else { QStringList splitFileContent = QStringList::split( '\n', splitFile ); if( splitFileContent.count() != 4 || splitFileContent[0] != "[Krusader splitfile]" || !splitFileContent[1].startsWith("filename=") || !splitFileContent[2].startsWith("size=") || !splitFileContent[3].startsWith("md5sum=") ) error = i18n("Not a valid Krusader splitfile!"); else { hasValidSplitFile = true; expectedFileName = splitFileContent[1].mid( 9 ); expectedMd5Sum = splitFileContent[3].mid( 7 ); QString size = splitFileContent[2].mid( 5 ); sscanf( size.ascii(), "%llu", &expectedSize ); } } if( !error.isEmpty() ) { int ret = KMessageBox::questionYesNo( 0, error+ "\n" + i18n("Validity checking is impossible without a good spl file. Continue combining?") ); if( ret == KMessageBox::No ) { emit reject(); return; } } openNextFile(); } void Combiner::openNextFile() { QString index( "%1" ); /* determining the filename */ index = index.arg(++fileCounter).rightJustify( 3, '0' ); QString readFileName = fileName + "." + index; readURL = KURL::fromPathOrURL( readFileName ); /* creating a write job */ combineReadJob = KIO::get( readURL, false, false ); connect(combineReadJob, SIGNAL(data(KIO::Job *, const QByteArray &)), this, SLOT(combineDataReceived(KIO::Job *, const QByteArray &))); connect(combineReadJob, SIGNAL(result(KIO::Job*)), this, SLOT(combineReceiveFinished(KIO::Job *))); if( hasValidSplitFile ) connect(combineReadJob, SIGNAL(percent (KIO::Job *, unsigned long)), this, SLOT(combineWritePercent(KIO::Job *, unsigned long))); } void Combiner::combineDataReceived(KIO::Job *, const QByteArray &byteArray) { if( byteArray.size() == 0 ) return; md5Context->update( byteArray ); transferArray = byteArray.copy(); receivedSize += byteArray.size(); if( combineWriteJob == 0 ) { writeURL = KURL::fromPathOrURL(destinationDir + KURL::fromPathOrURL( fileName ).fileName() ); combineWriteJob = KIO::put( writeURL, permissions, true, false, false ); connect(combineWriteJob, SIGNAL(dataReq(KIO::Job *, QByteArray &)), this, SLOT(combineDataSend(KIO::Job *, QByteArray &))); connect(combineWriteJob, SIGNAL(result(KIO::Job*)), this, SLOT(combineSendFinished(KIO::Job *))); } if( combineWriteJob ) { if( combineReadJob ) combineReadJob->suspend(); /* start writing */ combineWriteJob->resume(); } } void Combiner::combineReceiveFinished(KIO::Job *job) { combineReadJob = 0; /* KIO automatically deletes the object after Finished signal */ if( job->error() ) { if( combineWriteJob ) /* write out the remaining part of the file */ combineWriteJob->resume(); if( fileCounter == 1 ) { combineAbortJobs(); KMessageBox::questionYesNo(0, i18n("Can't open the first splitted file of %1!") .arg( fileName ) ); emit reject(); return; } if( hasValidSplitFile ) { if( receivedSize != expectedSize ) error = i18n("Incorrect filesize! The file might have been corrupted!"); else if( KURL::fromPathOrURL( fileName ).fileName() != expectedFileName ) error = i18n("Incorrect filename! The file might have been corrupted!"); else if ( QString( md5Context->hexDigest() ) != expectedMd5Sum ) error = i18n("Incorrect file digest! The file might have been corrupted!"); } return; } openNextFile(); } void Combiner::combineDataSend(KIO::Job *, QByteArray &byteArray) { byteArray = transferArray; transferArray = QByteArray(); if( combineReadJob ) { combineReadJob->resume(); /* start reading */ combineWriteJob->suspend(); } } void Combiner::combineSendFinished(KIO::Job *job) { combineWriteJob = 0; /* KIO automatically deletes the object after Finished signal */ if( job->error() ) /* any error occurred? */ { combineAbortJobs(); KMessageBox::error(0, i18n("Error at writing file %1!").arg( writeURL.path() ) ); emit reject(); return; } if( !error.isEmpty() ) /* was any error message at reading ? */ { combineAbortJobs(); /* we cannot write out it in combineReceiveFinished */ KMessageBox::error(0, error ); /* because emit accept closes it in this function */ emit reject(); return; } emit accept(); } void Combiner::combineAbortJobs() { if( combineReadJob ) combineReadJob->kill(); if( combineWriteJob ) combineWriteJob->kill(); combineReadJob = combineWriteJob = 0; } void Combiner::combineWritePercent(KIO::Job *, unsigned long) { int percent = (int)((((double)receivedSize / expectedSize ) * 100. ) + 0.5 ); setProgress( percent ); } --- NEW FILE: combiner.h --- /*************************************************************************** combiner.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 __COMBINER_H__ #define __COMBINER_H__ #include <qstring.h> #include <qprogressdialog.h> #include <kurl.h> #include <kio/jobclasses.h> #include <kmdcodec.h> class Combiner : public QProgressDialog { Q_OBJECT private: KURL splURL; KURL readURL; KURL writeURL; QString fileName; QString destinationDir; KMD5 *md5Context; QByteArray transferArray; QString splitFile; QString error; bool hasValidSplitFile; QString expectedFileName; KIO::filesize_t expectedSize; QString expectedMd5Sum; int fileCounter; int permissions; KIO::filesize_t receivedSize; KIO::TransferJob *combineReadJob; KIO::TransferJob *combineWriteJob; public: Combiner( QWidget* parent, QString fileNameIn, QString destinationDirIn ); ~Combiner(); void combine(); public slots: void combineSplitFileDataReceived(KIO::Job *, const QByteArray &byteArray); void combineSplitFileFinished(KIO::Job *job); void combineDataReceived(KIO::Job *, const QByteArray &); void combineReceiveFinished(KIO::Job *); void combineDataSend(KIO::Job *, QByteArray &); void combineSendFinished(KIO::Job *); void combineWritePercent(KIO::Job *, unsigned long); private: void openNextFile(); void combineAbortJobs(); }; #endif /* __COMBINER_H__ */ --- NEW FILE: splitter.cpp --- /*************************************************************************** splitter.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 "splitter.h" #include <qlayout.h> #include <klocale.h> #include <kmessagebox.h> #include <kio/job.h> #include <kfileitem.h> #include <qfileinfo.h> Splitter::Splitter( QWidget* parent, QString fileNameIn, QString destinationDirIn ) : QProgressDialog( parent, "Krusader::Splitter", true, 0 ), splitSize( 0 ) { fileName = KURL::fromPathOrURL( fileNameIn ); destinationDir = destinationDirIn; if( !destinationDir.endsWith("/") ) destinationDir += "/"; md5Context = new KMD5( "" ); md5Context->reset(); setTotalSteps( 100 ); setAutoClose( false ); /* don't close or reset the dialog automatically */ setAutoReset( false ); } Splitter::~Splitter() { splitAbortJobs(); delete md5Context; } void Splitter::split( int splitSizeIn ) { KFileItem file(KFileItem::Unknown, KFileItem::Unknown, fileName ); file.refresh(); permissions = file.permissions() | QFileInfo::WriteUser; splitSize = splitSizeIn; setCaption( i18n("Krusader::Splitting...") ); setLabelText( i18n("Splitting the file %1...").arg( fileName.path() )); if( file.isDir() ) { KMessageBox::error(0, i18n("Can't split a directory!")); return; } fileSize = 0; fileNumber = 0; splitReadJob = KIO::get( fileName, false, false ); connect(splitReadJob, SIGNAL(data(KIO::Job *, const QByteArray &)), this, SLOT(splitDataReceived(KIO::Job *, const QByteArray &))); connect(splitReadJob, SIGNAL(result(KIO::Job*)), this, SLOT(splitReceiveFinished(KIO::Job *))); connect(splitReadJob, SIGNAL(percent (KIO::Job *, unsigned long)), this, SLOT(splitReceivePercent(KIO::Job *, unsigned long))); splitWriteJob = 0; noValidWriteJob = true; exec(); } void Splitter::splitDataReceived(KIO::Job *, const QByteArray &byteArray) { if( byteArray.size() == 0 ) return; md5Context->update( byteArray ); fileSize += byteArray.size(); if( noValidWriteJob ) splitCreateWriteJob(); transferArray = byteArray.copy(); if(splitWriteJob) { splitReadJob->suspend(); /* start writing */ splitWriteJob->resume(); } } void Splitter::splitReceiveFinished(KIO::Job *job) { splitReadJob = 0; /* KIO automatically deletes the object after Finished signal */ if( splitWriteJob ) /* write out the end of the file */ splitWriteJob->resume(); if( job->error() ) /* any error occurred? */ { splitAbortJobs(); KMessageBox::error(0, i18n("Error at reading file %1!").arg( fileName.path() ) ); emit reject(); return; } char buf[50]; /* creating the content of the split information file */ sprintf(buf,"%llu",fileSize); splitFile = QString( "[Krusader splitfile]\nfilename=" ) + fileName.fileName() + QString( "\nsize=%1" ).arg( buf )+ "\nmd5sum="+ QString( md5Context->hexDigest() )+"\n"; } void Splitter::splitReceivePercent (KIO::Job *, unsigned long percent) { setProgress( percent ); } void Splitter::splitCreateWriteJob() { QString index( "%1" ); /* making the splitted filename */ index = index.arg(++fileNumber).rightJustify( 3, '0' ); QString outFileName = fileName.fileName() + "." + index; writeURL = KURL::fromPathOrURL( destinationDir + outFileName ); /* creating a write job */ splitWriteJob = KIO::put( writeURL, permissions, true, false, false ); outputFileSize = 0; connect(splitWriteJob, SIGNAL(dataReq(KIO::Job *, QByteArray &)), this, SLOT(splitDataSend(KIO::Job *, QByteArray &))); connect(splitWriteJob, SIGNAL(result(KIO::Job*)), this, SLOT(splitSendFinished(KIO::Job *))); noValidWriteJob = false; } void Splitter::splitDataSend(KIO::Job *, QByteArray &byteArray) { int bufferLen = transferArray.size(); if( noValidWriteJob ) /* splitted file should be closed ? */ { byteArray = QByteArray(); /* giving empty buffer which indicates closing */ } else if( outputFileSize + bufferLen > splitSize ) /* maximum length reached? */ { int shortLen = splitSize - outputFileSize; byteArray.duplicate( transferArray.data(), shortLen ); transferArray.duplicate( transferArray.data() + shortLen, bufferLen - shortLen ); noValidWriteJob = true; /* close the current segment */ } else { outputFileSize += bufferLen; /* write the whole buffer out to the split file */ byteArray = transferArray; transferArray = QByteArray(); if(splitReadJob) { splitReadJob->resume(); /* start reading */ splitWriteJob->suspend(); } } } void Splitter::splitSendFinished(KIO::Job *job) { splitWriteJob = 0; /* KIO automatically deletes the object after Finished signal */ if( job->error() ) /* any error occurred? */ { splitAbortJobs(); KMessageBox::error(0, i18n("Error at writing file %1!").arg( writeURL.path() ) ); emit reject(); return; } if( transferArray.size() ) /* any data remained in the transfer buffer? */ splitCreateWriteJob(); /* create a new write job */ else { /* writing the split information file out */ writeURL = KURL::fromPathOrURL( destinationDir + fileName.fileName() + ".spl" ); splitWriteJob = KIO::put( writeURL, permissions, true, false, false ); connect(splitWriteJob, SIGNAL(dataReq(KIO::Job *, QByteArray &)), this, SLOT(splitFileSend(KIO::Job *, QByteArray &))); connect(splitWriteJob, SIGNAL(result(KIO::Job*)), this, SLOT(splitFileFinished(KIO::Job *))); } } void Splitter::splitAbortJobs() { if( splitReadJob ) splitReadJob->kill(); if( splitWriteJob ) splitWriteJob->kill(); splitReadJob = splitWriteJob = 0; } void Splitter::splitFileSend(KIO::Job *, QByteArray &byteArray) { const char *content = splitFile.ascii(); byteArray.duplicate( content, strlen ( content ) ); splitFile = ""; } void Splitter::splitFileFinished(KIO::Job *job) { splitWriteJob = 0; /* KIO automatically deletes the object after Finished signal */ if( job->error() ) /* any error occurred? */ { KMessageBox::error(0, i18n("Error at writing file %1!").arg( writeURL.path() ) ); emit reject(); return; } emit accept(); } --- NEW FILE: splitter.h --- /*************************************************************************** splitter.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 __SPLITTER_H__ #define __SPLITTER_H__ #include <qstring.h> #include <qprogressdialog.h> #include <kurl.h> #include <kio/jobclasses.h> #include <kmdcodec.h> class Splitter : public QProgressDialog { Q_OBJECT private: KURL fileName; QString destinationDir; KIO::filesize_t splitSize; KIO::filesize_t fileSize; int permissions; QString splitFile; KURL writeURL; int fileNumber; KIO::filesize_t outputFileSize; bool noValidWriteJob; KMD5 *md5Context; QByteArray transferArray; KIO::TransferJob *splitReadJob; KIO::TransferJob *splitWriteJob; public: Splitter( QWidget* parent, QString fileNameIn, QString destinationDirIn ); ~Splitter(); void split( int splitSizeIn ); private: void splitCreateWriteJob(); void splitAbortJobs(); public slots: void splitDataReceived(KIO::Job *, const QByteArray &); void splitDataSend(KIO::Job *, QByteArray &); void splitSendFinished(KIO::Job *); void splitReceiveFinished(KIO::Job *); void splitReceivePercent (KIO::Job *, unsigned long); void splitFileSend(KIO::Job *, QByteArray &); void splitFileFinished(KIO::Job *); }; #endif /* __SPLITTER_H__ */ --- NEW FILE: splittergui.cpp --- /*************************************************************************** splittergui.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 "splittergui.h" #include <klocale.h> #include <qlayout.h> #include <qlabel.h> #include <kmessagebox.h> PredefinedDevice SplitterGUI::predefinedDevices[] = { {i18n( "1.44 MB (3.5\")" ), 1457664}, {i18n( "1.2 MB (5.25\")" ), 1213952}, {i18n( "720 kB (3.5\")" ), 730112}, {i18n( "360 kB (5.25\")" ), 362496}, {i18n( "100 MB (ZIP)" ), 100431872}, {i18n( "250 MB (ZIP)" ), 250331136}}; SplitterGUI::SplitterGUI( QWidget* parent, QString fileName, QString defaultDir ) : QDialog( parent, "Krusader::SplitterGUI", true, 0 ), splittedFileSize( 0 ), userDefinedSize ( 0x100000 ), lastSelectedDevice( 0 ), resultCode( QDialog::Rejected ) { fileToSplit = fileName; predefinedDeviceNum = sizeof( predefinedDevices ) / sizeof( PredefinedDevice ); QGridLayout *grid = new QGridLayout( this ); grid->setSpacing( 6 ); grid->setMargin( 11 ); QLabel *splitterLabel = new QLabel( this, "SplitterLabel" ); splitterLabel->setText( i18n( "Split the file %1 to directory:" ).arg( fileName ) ); splitterLabel->setMinimumWidth( 400 ); grid->addWidget( splitterLabel,0 ,0 ); urlReq = new KURLRequester( this, "DestinationDirectory" ); urlReq->setURL( defaultDir ); urlReq->setMode( KFile::Directory ); grid->addWidget( urlReq, 1 ,0 ); QHBox *splitSizeLine = new QHBox( this, "splitSizeLine" ); deviceCombo = new QComboBox( splitSizeLine, "deviceCombo" ); for( int i=0; i != predefinedDeviceNum; i++ ) deviceCombo->insertItem( predefinedDevices[i].name ); deviceCombo->insertItem( i18n( "User Defined" ) ); QLabel *spacer = new QLabel( splitSizeLine ); spacer->setText( " " ); spacer->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ); QLabel *bytesPerFile = new QLabel( splitSizeLine, "BytesPerFile" ); bytesPerFile->setText( i18n( "Max file size:" ) ); spinBox = new SplitterSpinBox( splitSizeLine, "spinbox" ); spinBox->setMinimumWidth( 85 ); spinBox->setEnabled( false ); sizeCombo = new QComboBox( splitSizeLine, "sizeCombo" ); sizeCombo->insertItem( i18n( "Byte" ) ); sizeCombo->insertItem( i18n( "kByte" ) ); sizeCombo->insertItem( i18n( "MByte" ) ); sizeCombo->insertItem( i18n( "GByte" ) ); grid->addWidget( splitSizeLine,2 ,0 ); QFrame *separator = new QFrame( this, "separatorLine" ); separator->setFrameStyle( QFrame::HLine | QFrame::Sunken ); separator->setFixedHeight( separator->sizeHint().height() ); grid->addWidget( separator,3 ,0 ); QHBoxLayout *splitButtons = new QHBoxLayout; splitButtons->setSpacing( 6 ); splitButtons->setMargin( 0 ); QSpacerItem* spacer2 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ); splitButtons->addItem( spacer2 ); QPushButton *splitBtn = new QPushButton( this, "splitBtn" ); splitBtn->setText( i18n("&Split") ); splitButtons->addWidget( splitBtn ); QPushButton *cancelBtn = new QPushButton( this, "cancelBtn" ); cancelBtn->setText( i18n("&Cancel") ); splitButtons->addWidget( cancelBtn ); grid->addLayout( splitButtons,4 ,0 ); setCaption(i18n("Krusader::Splitter")); connect( sizeCombo, SIGNAL( activated(int) ), this, SLOT( sizeComboActivated( int ) ) ); connect( deviceCombo, SIGNAL( activated(int) ), this, SLOT( predefinedComboActivated( int ) ) ); connect( cancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) ); connect( splitBtn , SIGNAL( clicked() ), this, SLOT( splitPressed() ) ); predefinedComboActivated( 0 ); resultCode = exec(); } void SplitterGUI::sizeComboActivated( int item ) { switch ( item ) { case 0: spinBox->setDivision( 1 ); /* byte */ break; case 1: spinBox->setDivision( 0x400 ); /* kbyte */ break; case 2: spinBox->setDivision( 0x100000 ); /* Mbyte */ break; case 3: spinBox->setDivision( 0x40000000 ); /* Gbyte */ break; } } void SplitterGUI::predefinedComboActivated( int item ) { int capacity = userDefinedSize; if( item < predefinedDeviceNum ) { if( lastSelectedDevice == predefinedDeviceNum ) userDefinedSize = spinBox->value(); spinBox->setEnabled( false ); capacity = predefinedDevices[item].capacity; } else spinBox->setEnabled( true ); spinBox->setValue( capacity ); if( capacity >= 0x40000000 ) /* Gbyte */ { sizeCombo->setCurrentItem( 3 ); spinBox->setDivision( 0x40000000 ); } else if( capacity >= 0x100000 ) /* Mbyte */ { sizeCombo->setCurrentItem( 2 ); spinBox->setDivision( 0x100000 ); } else if( capacity >= 0x400 ) /* kbyte */ { sizeCombo->setCurrentItem( 1 ); spinBox->setDivision( 0x400 ); } else { sizeCombo->setCurrentItem( 0 ); /* byte */ spinBox->setDivision( 1 ); } lastSelectedDevice = item; } void SplitterGUI::splitPressed() { if( KURL::fromPathOrURL( urlReq->url() ).isMalformed() ) { KMessageBox::error( this, i18n("The directory path URL is malformed!") ); return; } emit accept(); } void SplitterGUI::keyPressEvent( QKeyEvent *e ) { switch ( e->key() ) { case Key_Enter : case Key_Return : emit splitPressed(); return; default: QDialog::keyPressEvent( e ); } } --- NEW FILE: splittergui.h --- /*************************************************************************** splittergui.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 __SPLITTERGUI_H__ #define __SPLITTERGUI_H__ #include <qdialog.h> #include <qstring.h> #include <qspinbox.h> #include <qvalidator.h> #include <qcombobox.h> #include <kurlrequester.h> struct PredefinedDevice { QString name; int capacity; }; class SplitterGUI : QDialog { Q_OBJECT public: class SplitterSpinBox; private: int predefinedDeviceNum; int splittedFileSize; int userDefinedSize; int lastSelectedDevice; int resultCode; static PredefinedDevice predefinedDevices[]; QString fileToSplit; SplitterSpinBox *spinBox; QComboBox *deviceCombo; QComboBox *sizeCombo; KURLRequester *urlReq; public: SplitterGUI( QWidget* parent, QString fileName, QString defaultDir ); QString getDestinationDir() {return urlReq->url();} int getSplitSize() {return spinBox->value();} int result() {return resultCode;} public slots: virtual void sizeComboActivated( int item ); virtual void predefinedComboActivated( int item ); virtual void splitPressed(); protected: virtual void keyPressEvent( QKeyEvent *e ); public: class SplitterSpinBox : public QSpinBox { private: int division; public: SplitterSpinBox ( QWidget * parent = 0, const char * name = 0 ) : QSpinBox( parent, name ), division( 1 ) { setMaxValue( 0x7FFFFFFF ); /* setting the minimum and maximum values */ setMinValue( 1 ); QDoubleValidator *dval = new QDoubleValidator( this ); setValidator ( dval ); } QString mapValueToText( int value ) { QString frac(""); int int_part = value / division; int frac_mod = value % division; if( frac_mod ) { int frac_part = (int)((1000. * frac_mod) /division + 0.5); if( frac_part ) { frac = QString( "%1" ).arg( frac_part ).rightJustify( 3, '0' ); frac = "." + frac; while( frac.endsWith("0") ) frac.truncate( frac.length() - 1 ); } } return QString( "%1%2" ).arg( int_part ).arg( frac ); } int mapTextToValue( bool * ) { return (int) ( division * text().toDouble() + 0.5 ) ; } void setDivision( int div ) { division = div; setLineStep( div ); updateDisplay(); } }; }; #endif /* __SPLITTERGUI_H__ */ |
From: <ck...@us...> - 2003-11-29 09:03:03
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Splitter In directory sc8-pr-cvs1:/tmp/cvs-serv13535/Splitter Log Message: Directory /cvsroot/krusader/krusader_kde3/krusader/Splitter added to the repository |
From: <ck...@us...> - 2003-11-28 17:06:38
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Dialogs In directory sc8-pr-cvs1:/tmp/cvs-serv19125/krusader_kde3/krusader/Dialogs Modified Files: krpleasewait.cpp krpleasewait.h Log Message: FIXED: crash at closing the progressbar window at packing Index: krpleasewait.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Dialogs/krpleasewait.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** krpleasewait.cpp 15 Apr 2002 18:48:09 -0000 1.1.1.1 --- krpleasewait.cpp 28 Nov 2003 17:06:35 -0000 1.2 *************** *** 60,67 **** setCancelButton(btn); ! btn->setEnabled(cancel); setLabelText(msg); show(); } --- 60,75 ---- setCancelButton(btn); ! btn->setEnabled(canClose = cancel); setLabelText(msg); show(); + } + + void KRPleaseWait::closeEvent ( QCloseEvent * e ) + { + if( canClose ) + e->accept(); + else /* if cancel is not allowed, we disable */ + e->ignore(); /* the window closing [x] also */ } Index: krpleasewait.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Dialogs/krpleasewait.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** krpleasewait.h 15 Apr 2002 18:48:09 -0000 1.1.1.1 --- krpleasewait.h 28 Nov 2003 17:06:35 -0000 1.2 *************** *** 67,70 **** --- 67,72 ---- bool inc; QTimer* timer; + virtual void closeEvent ( QCloseEvent * e ); + bool canClose; }; |
From: <ck...@us...> - 2003-11-28 17:06:38
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1:/tmp/cvs-serv19125/krusader_kde3 Modified Files: ChangeLog Log Message: FIXED: crash at closing the progressbar window at packing Index: ChangeLog =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/ChangeLog,v retrieving revision 1.139 retrieving revision 1.140 diff -C2 -d -r1.139 -r1.140 *** ChangeLog 27 Nov 2003 23:26:35 -0000 1.139 --- ChangeLog 28 Nov 2003 17:06:35 -0000 1.140 *************** *** 1,2 **** --- 1,3 ---- + FIXED: crash at closing the progressbar window at packing FIXED: no or uninformative error message at packing to a readonly directory FIXED: crash at middle clicking on the last tab |
From: <ck...@us...> - 2003-11-27 23:26:39
|
Update of /cvsroot/krusader/krusader_kde3/krusader/VFS In directory sc8-pr-cvs1:/tmp/cvs-serv10567/krusader_kde3/krusader/VFS Modified Files: krarchandler.cpp Log Message: FIXED: no or uninformative error message at packing to a readonly directory Index: krarchandler.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/krarchandler.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** krarchandler.cpp 29 Oct 2002 22:49:44 -0000 1.3 --- krarchandler.cpp 27 Nov 2003 23:26:35 -0000 1.4 *************** *** 287,292 **** // check the return value ! if( !proc.normalExit() ){ ! KMessageBox::error(krApp,i18n("Error"),i18n("Failed to pack: ")+dest.latin1() ); return false; } --- 287,292 ---- // check the return value ! if( !proc.normalExit() || proc.exitStatus() != 0 ){ ! KMessageBox::error(krApp,i18n("Failed to pack: ")+dest.latin1(),i18n("Error") ); return false; } *************** *** 295,299 **** if ( krConfig->readBoolEntry( "Test Archives",_TestArchives ) && !test(dest,type,count) ){ ! KMessageBox::error(krApp,i18n("Error"),i18n("Failed to pack")+dest.latin1() ); return false; } --- 295,299 ---- if ( krConfig->readBoolEntry( "Test Archives",_TestArchives ) && !test(dest,type,count) ){ ! KMessageBox::error(krApp,i18n("Failed to pack")+dest.latin1(),i18n("Error") ); return false; } |
From: <ck...@us...> - 2003-11-27 23:26:39
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1:/tmp/cvs-serv10567/krusader_kde3 Modified Files: ChangeLog Log Message: FIXED: no or uninformative error message at packing to a readonly directory Index: ChangeLog =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/ChangeLog,v retrieving revision 1.138 retrieving revision 1.139 diff -C2 -d -r1.138 -r1.139 *** ChangeLog 26 Nov 2003 17:45:47 -0000 1.138 --- ChangeLog 27 Nov 2003 23:26:35 -0000 1.139 *************** *** 1,2 **** --- 1,3 ---- + FIXED: no or uninformative error message at packing to a readonly directory FIXED: crash at middle clicking on the last tab FIXED: KrSearch permissions panel placing bug |
From: <ck...@us...> - 2003-11-26 17:45:51
|
Update of /cvsroot/krusader/krusader_kde3/krusader In directory sc8-pr-cvs1:/tmp/cvs-serv20378/krusader_kde3/krusader Modified Files: panelmanager.cpp Log Message: FIXED: crash at middle clicking on the last tab. Index: panelmanager.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/panelmanager.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** panelmanager.cpp 18 Oct 2003 12:39:46 -0000 1.4 --- panelmanager.cpp 26 Nov 2003 17:45:48 -0000 1.5 *************** *** 99,102 **** --- 99,105 ---- void PanelManager::slotCloseTab() { + if ( _tabbar->count() <= 1 ) /* if this is the last tab don't close it */ + return; + // setup current one ListPanel * oldp; |
From: <ck...@us...> - 2003-11-26 17:45:51
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1:/tmp/cvs-serv20378/krusader_kde3 Modified Files: ChangeLog Log Message: FIXED: crash at middle clicking on the last tab. Index: ChangeLog =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/ChangeLog,v retrieving revision 1.137 retrieving revision 1.138 diff -C2 -d -r1.137 -r1.138 *** ChangeLog 25 Nov 2003 21:51:27 -0000 1.137 --- ChangeLog 26 Nov 2003 17:45:47 -0000 1.138 *************** *** 1,2 **** --- 1,3 ---- + FIXED: crash at middle clicking on the last tab FIXED: KrSearch permissions panel placing bug FIXED: ftp port limit changed from 999 to 65535 |
From: <ck...@us...> - 2003-11-25 21:51:31
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Search In directory sc8-pr-cvs1:/tmp/cvs-serv648/krusader_kde3/krusader/Search Modified Files: krsearchdialogbase.cpp Log Message: FIXED: KrSearch permissions panel placing bug Index: krsearchdialogbase.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchdialogbase.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** krsearchdialogbase.cpp 13 Oct 2003 14:24:16 -0000 1.5 --- krsearchdialogbase.cpp 25 Nov 2003 21:51:27 -0000 1.6 *************** *** 279,283 **** searchIn = new QListBox( GroupBox1, "searchIn" ); searchIn->setSelectionMode( QListBox::Extended ); ! GroupBox1Layout->addMultiCellWidget( searchIn, 1, 1, 0, 2 ); --- 279,283 ---- searchIn = new QListBox( GroupBox1, "searchIn" ); searchIn->setSelectionMode( QListBox::Extended ); ! GroupBox1Layout->addMultiCellWidget( searchIn, 1, 1, 0, 2 ); *************** *** 688,694 **** TextLabel4->setText( i18n( "Note: a '?' is a wildcard" ) ); ! GroupBox181Layout->addWidget( TextLabel4, 2, 3 ); ! QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); ! GroupBox181Layout->addMultiCell( spacer_4, 2, 2, 0, 2 ); tabLayout_2->addWidget( GroupBox181, 2, 0 ); --- 688,692 ---- TextLabel4->setText( i18n( "Note: a '?' is a wildcard" ) ); ! GroupBox181Layout->addMultiCellWidget( TextLabel4, 2, 2, 0, 3, Qt::AlignRight ); tabLayout_2->addWidget( GroupBox181, 2, 0 ); |
From: <ck...@us...> - 2003-11-25 21:51:30
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1:/tmp/cvs-serv648/krusader_kde3 Modified Files: ChangeLog Log Message: FIXED: KrSearch permissions panel placing bug Index: ChangeLog =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/ChangeLog,v retrieving revision 1.136 retrieving revision 1.137 diff -C2 -d -r1.136 -r1.137 *** ChangeLog 25 Nov 2003 07:44:46 -0000 1.136 --- ChangeLog 25 Nov 2003 21:51:27 -0000 1.137 *************** *** 1,2 **** --- 1,3 ---- + FIXED: KrSearch permissions panel placing bug FIXED: ftp port limit changed from 999 to 65535 UPDATED: Czech translation (thanks to Martin Sixta) |
From: <ck...@us...> - 2003-11-25 07:47:32
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Dialogs In directory sc8-pr-cvs1:/tmp/cvs-serv7473/krusader_kde3/krusader/Dialogs Modified Files: newftpgui.cpp Log Message: FIXED: ftp port limit change from 999 to 65535 Index: newftpgui.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Dialogs/newftpgui.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** newftpgui.cpp 13 Oct 2003 17:23:00 -0000 1.4 --- newftpgui.cpp 25 Nov 2003 07:44:47 -0000 1.5 *************** *** 724,728 **** port = new QSpinBox( this, "port" ); port->setGeometry( QRect( 280, 70, 50, 21 ) ); ! port->setMaxValue( 999 ); #if QT_VERSION < 300 port->setFrameShadow( QSpinBox::Sunken ); --- 724,728 ---- port = new QSpinBox( this, "port" ); port->setGeometry( QRect( 280, 70, 50, 21 ) ); ! port->setMaxValue( 65535 ); #if QT_VERSION < 300 port->setFrameShadow( QSpinBox::Sunken ); |
From: <ck...@us...> - 2003-11-25 07:47:32
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1:/tmp/cvs-serv7473/krusader_kde3 Modified Files: ChangeLog Log Message: FIXED: ftp port limit change from 999 to 65535 Index: ChangeLog =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/ChangeLog,v retrieving revision 1.135 retrieving revision 1.136 diff -C2 -d -r1.135 -r1.136 *** ChangeLog 23 Nov 2003 13:42:57 -0000 1.135 --- ChangeLog 25 Nov 2003 07:44:46 -0000 1.136 *************** *** 1,2 **** --- 1,3 ---- + FIXED: ftp port limit changed from 999 to 65535 UPDATED: Czech translation (thanks to Martin Sixta) |
From: <des...@us...> - 2003-11-23 13:43:01
|
Update of /cvsroot/krusader/krusader_kde3/po In directory sc8-pr-cvs1:/tmp/cvs-serv4779/po Modified Files: cs.po Log Message: Index: cs.po =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/po/cs.po,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** cs.po 15 Apr 2002 18:53:34 -0000 1.1.1.1 --- cs.po 23 Nov 2003 13:42:57 -0000 1.2 *************** *** 1,275 **** ! # SOME DESCRIPTIVE TITLE. ! # Copyright (C) YEAR Free Software Foundation, Inc. ! # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # msgid "" msgstr "" ! "Project-Id-Version: PACKAGE VERSION\n" ! "POT-Creation-Date: 2002-01-01 17:11+0200\n" ! "PO-Revision-Date: 2001-12-07 20:07GMT\n" ! "Last-Translator: \n" [...4793 lines suppressed...] #~ msgid "Can't read" *************** *** 2564,2579 **** #~ msgstr "NaÄÃst/Uložit" - #~ msgid "%1 ZB" - #~ msgstr "%1 ZB" - - #~ msgid "%1 TB" - #~ msgstr "%1 TB" - - #~ msgid "%1 GB" - #~ msgstr "%1 GB" - - #~ msgid "%1 MB" - #~ msgstr "%1 MB" - - #~ msgid "%1 KB" - #~ msgstr "%1 KB" --- 2894,2895 ---- |