[zypp-commit] r6409 - in /trunk/updater-kde/updater: MainWindow.cpp TrayIcon.cpp zypp/ZYppUpdater.cpp
Author: tgoettlicher Date: Thu Aug 2 20:03:20 2007 New Revision: 6409 URL: http://svn.opensuse.org/viewcvs/zypp?rev=6409&view=rev Log: progress works Modified: trunk/updater-kde/updater/MainWindow.cpp trunk/updater-kde/updater/TrayIcon.cpp trunk/updater-kde/updater/zypp/ZYppUpdater.cpp Modified: trunk/updater-kde/updater/MainWindow.cpp URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-kde/updater/MainWindow.cpp?rev=6409&r1=6408&r2=6409&view=diff ============================================================================== --- trunk/updater-kde/updater/MainWindow.cpp (original) +++ trunk/updater-kde/updater/MainWindow.cpp Thu Aug 2 20:03:20 2007 @@ -197,7 +197,7 @@ buttonsLayout = new QHBoxLayout(mainBox); - configureButton = new KPushButton(i18n("Add/Remove Update Sources..."), centralWidget); + configureButton = new KPushButton(i18n("Add/Remove Update Repositories..."), centralWidget); cancelButton = new KPushButton(KStdGuiItem::cancel(), centralWidget); installButton = new KPushButton(KStdGuiItem::ok(), centralWidget); installButton->setText(i18n("Install")); Modified: trunk/updater-kde/updater/TrayIcon.cpp URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-kde/updater/TrayIcon.cpp?rev=6409&r1=6408&r2=6409&view=diff ============================================================================== --- trunk/updater-kde/updater/TrayIcon.cpp (original) +++ trunk/updater-kde/updater/TrayIcon.cpp Thu Aug 2 20:03:20 2007 @@ -86,10 +86,15 @@ break; case APPLET_UPDATES: + QToolTip::add(this, i18n("New software updates are available.")); + setPixmap(loadIcon(TRAY_ICON_YELLOW)); + showPopup(); + break; + case APPLET_PKGMGR_UPDATES: case APPLET_CRITICAL_UPDATES: QToolTip::add(this, i18n("New software updates are available.")); - setPixmap(loadIcon(TRAY_ICON_YELLOW)); + setPixmap(loadIcon(TRAY_ICON_RED)); showPopup(); break; Modified: trunk/updater-kde/updater/zypp/ZYppUpdater.cpp URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-kde/updater/zypp/ZYppUpdater.cpp?rev=6409&r1=6408&r2=6409&view=diff ============================================================================== --- trunk/updater-kde/updater/zypp/ZYppUpdater.cpp (original) +++ trunk/updater-kde/updater/zypp/ZYppUpdater.cpp Thu Aug 2 20:03:20 2007 @@ -124,6 +124,7 @@ _install_stderr_buffer.truncate(0); _install_stdout_buffer.truncate(0); delete p; + _process = 0L; } @@ -242,16 +243,19 @@ void ZYppUpdater::slotReceivedStdout(KProcess *proc, char *buffer, int buflen) { + + kdDebug() << buffer ; + if ( buflen <= 0 ) { kdDebug() << "got empty buffer. Buffer stays at " << _xml_source.data().length() << endl; return; } - kdDebug() << "got data... Xml buffer size (before): " << _xml_source.data().length() << endl; +// kdDebug() << "got data... Xml buffer size (before): " << _xml_source.data().length() << endl; // refill the xml data _xml_source.setData( QString::fromUtf8(buffer, buflen) ); - kdDebug() << "Xml buffer size (after): " << _xml_source.data().length() << endl; +// kdDebug() << "Xml buffer size (after): " << _xml_source.data().length() << endl; // continue incremental parsing @@ -261,7 +265,7 @@ { kdDebug() << "Incremental parsing error. should we reset the Xml source? buffer size: " << _xml_source.data().length() << endl; kdDebug() << errorString() << endl; - resetXmlStream(); +// resetXmlStream(); } } @@ -373,7 +377,6 @@ } - resetXmlStream(); if (!_patchList || !_packageList) { @@ -434,6 +437,7 @@ item = (QCheckListItem*)item->nextSibling(); } + resetXmlStream(); kdDebug() << "_process" << endl; _process = new KProcess; @@ -444,7 +448,7 @@ QObject::connect( _process, SIGNAL( processExited( KProcess * ) ), - SLOT( slotProcessExited( KProcess * ) ) ); + SLOT( slotInstallProcessExited( KProcess * ) ) ); QObject::connect( _process, SIGNAL( receivedStdout(KProcess *, char *, int ) ), SLOT( slotReceivedStdout(KProcess *, char *, int ) ) ); QObject::connect( _process, SIGNAL( receivedStderr(KProcess *, char *, int ) ), @@ -523,10 +527,7 @@ { // here we have to allocate a patch or source in the stack kdDebug() << "xml..." << qName << endl; -// if ( qName == "update-status" ) -// { -// _found_update_status_tag = true; -// } + if ( qName == "errors") { _state = Errors; @@ -582,7 +583,6 @@ { if ( _state == Update ) _state = UpdateSummary; - // ignore sources for now return true; } if ( qName == "license" ) @@ -597,10 +597,6 @@ { _current_resolvable->source = atts.value("alias"); } - else - { - } - // ignore sources for now return true; } return true; @@ -635,8 +631,6 @@ if ( ( qName == "progress" )) { _state = Unknown; - _xml_source.setData(QString()); - _last_xml_parse_code = true; } if ( (qName == "errors") ) { @@ -650,7 +644,6 @@ if ( qName == "summary" ) { _state = Update; - // ignore sources for now return true; } if ( qName == "update" ) @@ -658,10 +651,8 @@ _state = Unknown; kdDebug() << _current_resolvable->name << " appended" << endl; _resolvables.append(_current_resolvable); - // ignore sources for now kdDebug() << _current_resolvable->name << endl; - kdDebug() << _current_resolvable->summary << endl; return true; } -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org
participants (1)
-
tgoettlicher@svn.opensuse.org