CVS commit by mornfall: - implement automatic tab switching on commit (d/l progress and konsole) - fix the annoying ::download bug with "Not locked" error
M +11 -0 kapture/kapture.cpp 1.35 M +3 -0 kapture/kapture.h 1.16 M +2 -1 libcapture/pkgmanager.cpp 1.46 M +8 -3 libkapture/commitstatus.h 1.3 M +2 -0 libkapture/kapturemanager.cpp 1.33 M +2 -0 libkapture/kapturemanager.h 1.16 --- kdenonbeta/kdedebian/kapture/kapture/kapture.cpp #1.34:1.35 @@ -104,4 +104,6 @@ Kapture::Kapture() connect (KaptureManager::inst (), SIGNAL (sigShowElem (capture::CElemPtr)), this, SLOT (showElem (capture::CElemPtr))); + connect (KaptureManager::inst (), SIGNAL (downloadStarting ()), this, SLOT (showProgress ())); + connect (KaptureManager::inst (), SIGNAL (installStarting ()), this, SLOT (tryShowKonsole ())); v1 -> makeTree (); @@ -157,4 +159,13 @@ void Kapture::showElem (CElemPtr e) } /* }}} */ +void Kapture::tryShowKonsole () +{ + if (m_progressDock -> isVisible ()) + m_konsoleDock -> makeDockVisible (); +} +void Kapture::showProgress () +{ + m_progressDock -> makeDockVisible (); +} /* {{{ */ void Kapture::closeNodeView () --- kdenonbeta/kdedebian/kapture/kapture/kapture.h #1.15:1.16 @@ -43,4 +43,7 @@ class Kapture : public KDockMainWindow void closeNodeView (); + protected slots: + void tryShowKonsole (); + void showProgress (); protected: virtual void dragEnterEvent(QDragEnterEvent *event); --- kdenonbeta/kdedebian/kapture/libcapture/pkgmanager.cpp #1.45:1.46 @@ -685,4 +685,5 @@ bool PkgManager::doCommit (CommitStatus } + if (_config->FindB("APT::Get::Download-Only",false) == false) _system->UnLock(); --- kdenonbeta/kdedebian/kapture/libkapture/commitstatus.h #1.2:1.3 @@ -14,4 +14,5 @@ #include <qstringlist.h> #include <libcapture/pkgmanager.h> +#include <qobject.h> namespace kapture { @@ -20,6 +21,7 @@ namespace kapture { class AcqStatusDialog; - class CommitStatus : public capture::PkgManager::CommitStatus + class CommitStatus : public QObject, public capture::PkgManager::CommitStatus { + Q_OBJECT protected: AcqStatus *m_acqSt; @@ -32,7 +34,10 @@ namespace kapture { // void showList (std::string title, std::vector <pkgCache::PkgIterator> pkgs) {}; pkgAcquireStatus *acqStatus (); - virtual void preDownload () {}; - virtual void preInstall () {}; + virtual void preDownload () { emit downloadStarting (); }; + virtual void preInstall () { emit installStarting (); }; virtual void installPulse () {}; + signals: + void downloadStarting (); + void installStarting (); }; --- kdenonbeta/kdedebian/kapture/libkapture/kapturemanager.cpp #1.32:1.33 @@ -69,4 +69,6 @@ void KaptureManager::commit (void) PkgManager::cache () -> applyAWanted (); CommitStatus *st = new CommitStatus; + connect (st, SIGNAL (downloadStarting ()), this, SIGNAL (downloadStarting ())); + connect (st, SIGNAL (installStarting ()), this, SIGNAL (installStarting ())); bool res = PkgManager::commit (st); delete st; --- kdenonbeta/kdedebian/kapture/libkapture/kapturemanager.h #1.15:1.16 @@ -65,4 +65,6 @@ namespace kapture { void setBackEnabled (bool); void setForwardEnabled (bool); + void downloadStarting (); + void installStarting (); protected: KaptureManager (int);