Hello community,
here is the log from the commit of package yast2-qt-pkg
checked in at Thu Oct 9 19:09:18 CEST 2008.
--------
--- yast2-qt-pkg/yast2-qt-pkg.changes 2008-09-26 16:59:10.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-qt-pkg/yast2-qt-pkg.changes 2008-10-09 18:21:45.036827000 +0200
@@ -1,0 +2,34 @@
+Thu Oct 9 18:20:07 CEST 2008 - sh@suse.de
+
+- Fixed bnc #433914: YQPkgDiskUsageWarningDialog too wide
+- V 2.17.11
+
+-------------------------------------------------------------------
+Thu Oct 9 17:35:47 CEST 2008 - sh@suse.de
+
+- Fixed bnc #382202: WM_CLOSE closes window, but leaves y2base
+ process running in undefined state
+- V 2.17.10
+
+-------------------------------------------------------------------
+Tue Oct 7 18:41:47 CEST 2008 - sh@suse.de
+
+- Fixed bnc #429030: "Configuration" menu present in installation
+- V 2.17.9
+
+-------------------------------------------------------------------
+Tue Oct 7 15:04:28 CEST 2008 - sh@suse.de
+
+- Fixed bnc #421267: Missing newline in exported conflicts list
+
+-------------------------------------------------------------------
+Thu Oct 2 13:20:46 CEST 2008 - sh@suse.de
+
+- Fixed bnc #430392: Typo in error message
+
+-------------------------------------------------------------------
+Wed Oct 1 13:59:45 CEST 2008 - tgoettlicher@suse.de
+
+- Fixed bnc #418279: export list to text file fails
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-qt-pkg-2.17.8.tar.bz2
New:
----
yast2-qt-pkg-2.17.11.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-qt-pkg.spec ++++++
--- /var/tmp/diff_new_pack.N21477/_old 2008-10-09 19:09:00.000000000 +0200
+++ /var/tmp/diff_new_pack.N21477/_new 2008-10-09 19:09:00.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-qt-pkg (Version 2.17.8)
+# spec file for package yast2-qt-pkg (Version 2.17.11)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -18,18 +18,18 @@
Name: yast2-qt-pkg
-Version: 2.17.8
+Version: 2.17.11
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-qt-pkg-2.17.8.tar.bz2
+Source0: yast2-qt-pkg-2.17.11.tar.bz2
BuildRequires: docbook-xsl-stylesheets doxygen libdrm-devel libjpeg-devel libxcrypt-devel
BuildRequires: libqt4-devel libxslt perl-XML-Writer sgml-skel update-desktop-files
Summary: YaST2 - Graphical User Interface
BuildRequires: yast2-devtools >= 2.16.3
-Requires: yast2-qt >= 2.16.25
-BuildRequires: yast2-qt-devel >= 2.16.25
+Requires: yast2-qt >= 2.17.13
+BuildRequires: yast2-qt-devel >= 2.17.13
BuildRequires: libzypp-devel >= 4.7.0
BuildRequires: yast2-libyui-devel >= 2.16.47
Requires: libzypp >= 4.7.0
@@ -85,6 +85,22 @@
%_prefix/share/YaST2/images/*
%changelog
+* Thu Oct 09 2008 sh@suse.de
+- Fixed bnc #433914: YQPkgDiskUsageWarningDialog too wide
+- V 2.17.11
+* Thu Oct 09 2008 sh@suse.de
+- Fixed bnc #382202: WM_CLOSE closes window, but leaves y2base
+ process running in undefined state
+- V 2.17.10
+* Tue Oct 07 2008 sh@suse.de
+- Fixed bnc #429030: "Configuration" menu present in installation
+- V 2.17.9
+* Tue Oct 07 2008 sh@suse.de
+- Fixed bnc #421267: Missing newline in exported conflicts list
+* Thu Oct 02 2008 sh@suse.de
+- Fixed bnc #430392: Typo in error message
+* Wed Oct 01 2008 tgoettlicher@suse.de
+- Fixed bnc #418279: export list to text file fails
* Fri Sep 26 2008 kmachalkova@suse.cz
- Fixed crash in Languages filter: redefined sort function for
languages so that it does not refer to zypp::ResObjects
++++++ yast2-qt-pkg-2.17.8.tar.bz2 -> yast2-qt-pkg-2.17.11.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.8/package/yast2-qt-pkg.changes new/yast2-qt-pkg-2.17.11/package/yast2-qt-pkg.changes
--- old/yast2-qt-pkg-2.17.8/package/yast2-qt-pkg.changes 2008-09-26 17:23:24.000000000 +0200
+++ new/yast2-qt-pkg-2.17.11/package/yast2-qt-pkg.changes 2008-10-09 18:21:16.000000000 +0200
@@ -1,4 +1,38 @@
-------------------------------------------------------------------
+Thu Oct 9 18:20:07 CEST 2008 - sh@suse.de
+
+- Fixed bnc #433914: YQPkgDiskUsageWarningDialog too wide
+- V 2.17.11
+
+-------------------------------------------------------------------
+Thu Oct 9 17:35:47 CEST 2008 - sh@suse.de
+
+- Fixed bnc #382202: WM_CLOSE closes window, but leaves y2base
+ process running in undefined state
+- V 2.17.10
+
+-------------------------------------------------------------------
+Tue Oct 7 18:41:47 CEST 2008 - sh@suse.de
+
+- Fixed bnc #429030: "Configuration" menu present in installation
+- V 2.17.9
+
+-------------------------------------------------------------------
+Tue Oct 7 15:04:28 CEST 2008 - sh@suse.de
+
+- Fixed bnc #421267: Missing newline in exported conflicts list
+
+-------------------------------------------------------------------
+Thu Oct 2 13:20:46 CEST 2008 - sh@suse.de
+
+- Fixed bnc #430392: Typo in error message
+
+-------------------------------------------------------------------
+Wed Oct 1 13:59:45 CEST 2008 - tgoettlicher@suse.de
+
+- Fixed bnc #418279: export list to text file fails
+
+-------------------------------------------------------------------
Fri Sep 26 16:53:35 CEST 2008 - kmachalkova@suse.cz
- Fixed crash in Languages filter: redefined sort function for
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.8/src/YQPackageSelectorBase.cc new/yast2-qt-pkg-2.17.11/src/YQPackageSelectorBase.cc
--- old/yast2-qt-pkg-2.17.8/src/YQPackageSelectorBase.cc 2008-09-26 17:23:24.000000000 +0200
+++ new/yast2-qt-pkg-2.17.11/src/YQPackageSelectorBase.cc 2008-10-09 18:21:16.000000000 +0200
@@ -48,6 +48,7 @@
using std::string;
+
YQPackageSelectorBase::YQPackageSelectorBase( YWidget * parent,
long modeFlags )
: QFrame( (QWidget *) parent->widgetRep() )
@@ -55,6 +56,7 @@
{
setWidgetRep( this );
+ _wmCloseHandler = 0;
_showChangesDialog = false;
_pkgConflictDialog = 0;
_diskUsageList = 0;
@@ -79,9 +81,7 @@
zyppPool().saveState();
zyppPool().saveState();
-
- // Install event handler to handle WM_CLOSE like "Cancel"
- topLevelWidget()->installEventFilter( this );
+ _wmCloseHandler = new YQPkgSelWmCloseHandler( this );
yuiMilestone() << "PackageSelectorBase init done" << endl;
}
@@ -90,6 +90,9 @@
YQPackageSelectorBase::~YQPackageSelectorBase()
{
yuiMilestone() << "Destroying PackageSelector" << endl;
+
+ if ( _wmCloseHandler )
+ delete _wmCloseHandler;
}
@@ -163,7 +166,6 @@
return YQPkgDiskUsageWarningDialog::diskUsageWarning( msg,
100, _( "C&ontinue Anyway" ), _( "&Cancel" ) );
-
}
@@ -190,7 +192,7 @@
-void
+bool
YQPackageSelectorBase::reject()
{
bool changes =
@@ -210,14 +212,21 @@
yuiMilestone() << "diffState() reports changed patches" << endl;
}
- if ( ! changes ||
- ( QMessageBox::warning( this, "",
- _( "Abandon all changes?" ),
- _( "&Abandon" ), _( "&Cancel" ), "",
- 1, // defaultButtonNumber (from 0)
- 1 ) // escapeButtonNumber
- == 0 ) // Proceed upon button #0 ( OK )
- )
+ bool confirm = false;
+
+ if ( changes )
+ {
+ int result =
+ QMessageBox::warning( this, "",
+ _( "Abandon all changes?" ),
+ _( "&Abandon" ), _( "&Cancel" ), "",
+ 1, // defaultButtonNumber (from 0)
+ 1 ); // escapeButtonNumber
+
+ confirm = ( result == 0 );
+ }
+
+ if ( ! changes || confirm )
{
zyppPool().restoreState();
zyppPool().restoreState();
@@ -225,6 +234,14 @@
yuiMilestone() << "Closing PackageSelector with \"Cancel\"" << endl;
YQUI::ui()->sendEvent( new YCancelEvent() );
+
+ return true; // Really reject
+ }
+ else
+ {
+ yuiMilestone() << "Returning to package selector" << endl;
+
+ return false; // User changed his mind - don't reject
}
}
@@ -405,20 +422,6 @@
}
-bool YQPackageSelectorBase::eventFilter( QObject * obj, QEvent * event )
-{
- if ( event->type() == QEvent::Close )
- {
- // Handle WM_CLOSE like "Cancel"
- reject();
-
- return true; // Stop processing this event
- }
-
- return false; // Don't stop processing this event
-}
-
-
int YQPackageSelectorBase::preferredWidth()
{
return max( 640, sizeHint().width() );
@@ -454,4 +457,31 @@
}
+YEvent *
+YQPkgSelWmCloseHandler::filter( YEvent * event )
+{
+ if ( event && event->eventType() == YEvent::CancelEvent // WM_CLOSE
+ && ! _inReject ) // prevent recursion
+ {
+ // Handle WM_CLOSE like "Cancel"
+ yuiMilestone() << "Caught WM_CLOSE from package selector dialog" << endl;
+
+ YUI::app()->normalCursor();
+ YUI_CHECK_WIDGET( _pkgSel );
+
+ _inReject = true; // reject() might send a CancelEvent, too
+ bool reallyReject = _pkgSel->reject();
+ _inReject = false;
+
+ if ( ! reallyReject )
+ {
+ event = 0; // Stop processing this event
+ yuiMilestone() << "User changed his mind - discarding CancelEvent" << endl;
+ }
+ }
+
+ return event; // Don't stop processing this event
+}
+
+
#include "YQPackageSelectorBase.moc"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.8/src/YQPackageSelectorBase.cc.bak new/yast2-qt-pkg-2.17.11/src/YQPackageSelectorBase.cc.bak
--- old/yast2-qt-pkg-2.17.8/src/YQPackageSelectorBase.cc.bak 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-qt-pkg-2.17.11/src/YQPackageSelectorBase.cc.bak 2008-10-09 18:21:16.000000000 +0200
@@ -0,0 +1,488 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: YQPackageSelectorBase.cc
+
+ Author: Stefan Hundhammer
+
+ Textdomain "qt-pkg"
+
+/-*/
+
+#include <QMessageBox>
+#include <QKeyEvent>
+
+#define YUILogComponent "qt-pkg"
+#include "YUILog.h"
+
+#include <QAction>
+#include <QVBoxLayout>
+#include <QHBoxLayout>
+#include "QY2LayoutUtils.h"
+
+#include "YQPackageSelectorBase.h"
+#include "YQPkgChangesDialog.h"
+#include "YQPkgConflictDialog.h"
+#include "YQPkgDiskUsageList.h"
+#include "YQPkgDiskUsageWarningDialog.h"
+#include "YQPkgTextDialog.h"
+#include "YQPkgObjList.h"
+
+#include "YQDialog.h"
+#include "utf8.h"
+#include "YQApplication.h"
+#include "YQUI.h"
+#include "YEvent.h"
+#include "YQi18n.h"
+
+using std::max;
+using std::string;
+
+
+
+YQPackageSelectorBase::YQPackageSelectorBase( YWidget * parent,
+ long modeFlags )
+ : QFrame( (QWidget *) parent->widgetRep() )
+ , YPackageSelector( parent, modeFlags )
+{
+ setWidgetRep( this );
+
+ _wmCloseHandler = 0;
+ _showChangesDialog = false;
+ _pkgConflictDialog = 0;
+ _diskUsageList = 0;
+ _pkgConflictDialog = 0;
+
+ YQUI::setTextdomain( "qt-pkg" );
+ setFont( YQUI::yqApp()->currentFont() );
+
+ _pkgConflictDialog = new YQPkgConflictDialog( this );
+ Q_CHECK_PTR( _pkgConflictDialog );
+
+ QString label = _( "Reset &Ignored Dependency Conflicts" );
+ _actionResetIgnoredDependencyProblems = new QAction( label, this);
+ _actionResetIgnoredDependencyProblems->setShortcut((QKeySequence) 0);
+ //_actionResetIgnoredDependencyProblems->setMenuRole(QAction::TextHeuristicRole);
+ Q_CHECK_PTR( _actionResetIgnoredDependencyProblems );
+
+ connect( _actionResetIgnoredDependencyProblems, SIGNAL( activated() ),
+ this, SLOT ( resetIgnoredDependencyProblems() ) );
+
+ zyppPool().saveState();
+ zyppPool().saveState();
+ zyppPool().saveState();
+
+ _wmCloseHandler = new YQPkgSelWmCloseHandler( this );
+
+ yuiMilestone() << "PackageSelectorBase init done" << endl;
+}
+
+
+YQPackageSelectorBase::~YQPackageSelectorBase()
+{
+ yuiMilestone() << "Destroying PackageSelector" << endl;
+
+ if ( _wmCloseHandler )
+ delete _wmCloseHandler;
+}
+
+
+int
+YQPackageSelectorBase::resolveDependencies()
+{
+ if ( ! _pkgConflictDialog )
+ {
+ yuiError() << "No package conflict dialog existing" << endl;
+ return QDialog::Accepted;
+ }
+
+
+ YQUI::ui()->busyCursor();
+ emit resolvingStarted();
+
+ int result = _pkgConflictDialog->solveAndShowConflicts();
+
+ emit resolvingFinished();
+ YQUI::ui()->normalCursor();
+
+ return result;
+}
+
+
+int
+YQPackageSelectorBase::verifySystem()
+{
+ if ( ! _pkgConflictDialog )
+ {
+ yuiError() << "No package conflict dialog existing" << endl;
+ return QDialog::Accepted;
+ }
+
+
+ YQUI::ui()->busyCursor();
+ int result = _pkgConflictDialog->verifySystem();
+ YQUI::ui()->normalCursor();
+
+ if ( result == QDialog::Accepted )
+ {
+ QMessageBox::information( this, "",
+ _( "System dependencies verify OK." ),
+ QMessageBox::Ok );
+ }
+
+ return result;
+}
+
+
+int
+YQPackageSelectorBase::checkDiskUsage()
+{
+ if ( ! _diskUsageList )
+ {
+ return QDialog::Accepted;
+ }
+
+ if ( ! _diskUsageList->overflowWarning.inRange() )
+ return QDialog::Accepted;
+
+ QString msg =
+ // Translators: RichText ( HTML-like ) format
+ "<p><b>" + _( "Error: Out of disk space!" ) + "</b></p>"
+ + _( "<p>"
+ "You can choose to install anyway if you know what you are doing, "
+ "but you risk getting a corrupted system that requires manual repairs. "
+ "If you are not absolutely sure how to handle such a case, "
+ "press <b>Cancel</b> now and deselect some packages."
+ "</p>" );
+
+ return YQPkgDiskUsageWarningDialog::diskUsageWarning( msg,
+ 100, _( "C&ontinue Anyway" ), _( "&Cancel" ) );
+
+}
+
+
+
+void
+YQPackageSelectorBase::showAutoPkgList()
+{
+ resolveDependencies();
+
+ // Show which packages are installed/deleted
+ QString msg =
+ // Detailed explanation ( automatic word wrap! )
+ + "<p>"
+ + _( "The following items will be changed:"
+ " " )
+ + "<p>";
+
+ YQPkgChangesDialog::showChangesDialog( this,
+ msg,
+ _( "&OK" ),
+ QString::null, // rejectButtonLabel
+ true ); // showIfEmpty
+}
+
+
+
+bool
+YQPackageSelectorBase::reject()
+{
+ bool changes =
+ zyppPool().diffState() ||
+ zyppPool().diffState() ||
+ zyppPool().diffState();
+
+ if ( changes )
+ {
+ if ( zyppPool().diffStatezypp::Package() )
+ yuiMilestone() << "diffState() reports changed packages" << endl;
+
+ if ( zyppPool().diffStatezypp::Pattern() )
+ yuiMilestone() << "diffState() reports changed patterns" << endl;
+
+ if ( zyppPool().diffStatezypp::Patch() )
+ yuiMilestone() << "diffState() reports changed patches" << endl;
+ }
+
+ bool confirm = false;
+
+ if ( changes )
+ {
+ int result =
+ QMessageBox::warning( this, "",
+ _( "Abandon all changes?" ),
+ _( "&Abandon" ), _( "&Cancel" ), "",
+ 1, // defaultButtonNumber (from 0)
+ 1 ); // escapeButtonNumber
+
+ confirm = ( result == 0 );
+ }
+
+ if ( ! changes || confirm )
+ {
+ zyppPool().restoreState();
+ zyppPool().restoreState();
+ zyppPool().restoreState();
+
+ yuiMilestone() << "Closing PackageSelector with \"Cancel\"" << endl;
+ YQUI::ui()->sendEvent( new YCancelEvent() );
+
+ return true; // Really reject
+ }
+ else
+ {
+ yuiMilestone() << "Returning to package selector" << endl;
+
+ return false; // User changed his mind - don't reject
+ }
+}
+
+
+void
+YQPackageSelectorBase::accept()
+{
+ bool confirmedAllLicenses;
+
+ do
+ {
+ // Force final dependency resolving
+ if ( resolveDependencies() == QDialog::Rejected )
+ return;
+
+ confirmedAllLicenses = showPendingLicenseAgreements();
+
+ } while ( ! confirmedAllLicenses ); // Some packages will be set to S_TABOO - need another solver run
+
+ if ( _showChangesDialog )
+ {
+ // Show which packages are installed/deleted automatically
+ QString msg =
+ "<p><b>"
+ // Dialog header
+ + _( "Automatic Changes" )
+ + "</b></p>"
+ // Detailed explanation ( automatic word wrap! )
+ + "<p>"
+ + _( "In addition to your manual selections, the following packages"
+ " have been changed to resolve dependencies:" )
+ + "<p>";
+
+ if ( YQPkgChangesDialog::showChangesDialog( this, msg, _( "C&ontinue" ), _( "&Cancel" ) )
+ == QDialog::Rejected )
+ return;
+ }
+
+#ifdef YPKG_QT_CONFIRM_UNSUPPORTED_PACKAGES
+ // Show which packages are unsupported
+ QString msg =
+ "<p><b>"
+ // Dialog header
+ + _( "Unsupported Packages" )
+ + "</b></p>"
+ // Detailed explanation ( automatic word wrap! )
+ + "<p>"
+ + _( "Please realize that the following selected software is either unsupported or"
+ " requires an additional customer contract for support." )
+ + "<p>";
+
+ if ( YQPkgUnsupportedPackagesDialog::showChangesDialog( this, msg, _( "C&ontinue" ), _( "&Cancel" ) )
+ == QDialog::Rejected )
+ return;
+#endif
+
+
+ // Check disk usage
+ if ( checkDiskUsage() == QDialog::Rejected )
+ return;
+
+ yuiMilestone() << "Closing PackageSelector with \"Accept\"" << endl;
+ YQUI::ui()->sendEvent( new YMenuEvent( "accept" ) );
+}
+
+void
+YQPackageSelectorBase::repoManager()
+{
+ yuiMilestone() << "Closing PackageSelector with \"RepoManager\"" << endl;
+ YQUI::ui()->sendEvent( new YMenuEvent( "repo_mgr" ) );
+}
+
+void
+YQPackageSelectorBase::onlineUpdateConfiguration()
+{
+ yuiMilestone() << "Closing PackageSelector with \"OnlineUpdateConfiguration\"" << endl;
+ YQUI::ui()->sendEvent( new YMenuEvent( "online_update_configuration" ) );
+}
+
+bool
+YQPackageSelectorBase::showPendingLicenseAgreements()
+{
+ yuiMilestone() << "Showing all pending license agreements" << endl;
+
+ bool allConfirmed = true;
+
+ if ( onlineUpdateMode() )
+ allConfirmed = showPendingLicenseAgreements( zyppPatchesBegin(), zyppPatchesEnd() );
+
+ allConfirmed = showPendingLicenseAgreements( zyppPkgBegin(), zyppPkgEnd() ) && allConfirmed;
+
+ return allConfirmed;
+}
+
+
+bool
+YQPackageSelectorBase::showPendingLicenseAgreements( ZyppPoolIterator begin, ZyppPoolIterator end )
+{
+ bool allConfirmed = true;
+
+ for ( ZyppPoolIterator it = begin; it != end; ++it )
+ {
+ ZyppSel sel = (*it);
+
+ switch ( sel->status() )
+ {
+ case S_Install:
+ case S_AutoInstall:
+ case S_Update:
+ case S_AutoUpdate:
+
+ if ( sel->candidateObj() )
+ {
+ string licenseText = sel->candidateObj()->licenseToConfirm();
+
+ if ( ! licenseText.empty() )
+ {
+ yuiMilestone() << "Resolvable " << sel->name() << " has a license agreement" << endl;
+
+ if( ! sel->hasLicenceConfirmed() )
+ {
+ yuiDebug() << "Showing license agreement for resolvable " << sel->name() << endl;
+ allConfirmed = YQPkgObjListItem::showLicenseAgreement( sel ) && allConfirmed;
+ }
+ else
+ {
+ yuiMilestone() << "Resolvable " << sel->name()
+ << "'s license is already confirmed" << endl;
+ }
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return allConfirmed;
+}
+
+
+void
+YQPackageSelectorBase::notImplemented()
+{
+ QMessageBox::information( this, "",
+ _( "Not implemented yet. Sorry." ),
+ QMessageBox::Ok );
+}
+
+
+void
+YQPackageSelectorBase::resetIgnoredDependencyProblems()
+{
+ YQPkgConflictDialog::resetIgnoredDependencyProblems();
+}
+
+
+void
+YQPackageSelectorBase::keyPressEvent( QKeyEvent * event )
+{
+ if ( event )
+ {
+ Qt::KeyboardModifiers special_combo = ( Qt::ControlModifier | Qt::ShiftModifier | Qt::AltModifier );
+
+ if ( ( event->modifiers() & special_combo ) == special_combo )
+ {
+ if ( event->key() == Qt::Key_A )
+ {
+ showAutoPkgList();
+ event->accept();
+ return;
+ }
+ }
+ }
+
+ QWidget::keyPressEvent( event );
+}
+
+
+int YQPackageSelectorBase::preferredWidth()
+{
+ return max( 640, sizeHint().width() );
+}
+
+
+int YQPackageSelectorBase::preferredHeight()
+{
+ return max( 480, sizeHint().height() );
+}
+
+
+void
+YQPackageSelectorBase::setSize( int newWidth, int newHeight )
+{
+ resize( newWidth, newHeight );
+}
+
+
+void
+YQPackageSelectorBase::setEnabling( bool enabled )
+{
+ QWidget::setEnabled( enabled );
+}
+
+
+bool
+YQPackageSelectorBase::setKeyboardFocus()
+{
+ setFocus();
+
+ return true;
+}
+
+
+YEvent *
+YQPkgSelWmCloseHandler::filter( YEvent * event )
+{
+ if ( event && event->eventType() == YEvent::CancelEvent // WM_CLOSE
+ && ! _inReject ) // prevent recursion
+ {
+ // Handle WM_CLOSE like "Cancel"
+ yuiMilestone() << "Caught WM_CLOSE from package selector dialog" << endl;
+
+ YUI::app()->normalCursor();
+ YUI_CHECK_WIDGET( _pkgSel );
+
+ _inReject = true; // reject() might send a CancelEvent, too
+ bool reallyReject = _pkgSel->reject();
+ _inReject = false;
+
+ if ( ! reallyReject )
+ {
+ event = 0; // Stop processing this event
+ yuiMilestone() << "User changed his mind - discarding CancelEvent" << endl;
+ }
+ }
+
+ return event; // Don't stop processing this event
+}
+
+
+#include "YQPackageSelectorBase.moc"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.8/src/YQPackageSelectorBase.h new/yast2-qt-pkg-2.17.11/src/YQPackageSelectorBase.h
--- old/yast2-qt-pkg-2.17.8/src/YQPackageSelectorBase.h 2008-09-26 17:23:24.000000000 +0200
+++ new/yast2-qt-pkg-2.17.11/src/YQPackageSelectorBase.h 2008-10-09 18:21:16.000000000 +0200
@@ -22,6 +22,8 @@
#include <QEvent>
#include <QFrame>
+#include
+
#include "YPackageSelector.h"
#include "YQZypp.h"
@@ -31,6 +33,7 @@
class YQPkgConflictDialog;
class YQPkgDiskUsageList;
+class YQPkgSelWmCloseHandler;
/**
@@ -92,13 +95,6 @@
**/
virtual bool setKeyboardFocus();
- /**
- * Event filter to handle WM_CLOSE like "Cancel"
- *
- * Reimplemented from QObject.
- **/
- virtual bool eventFilter( QObject * obj, QEvent * event );
-
public slots:
@@ -132,9 +128,13 @@
void showAutoPkgList();
/**
- * Close processing and abandon changes
+ * Close processing and abandon changes.
+ * If there were changes, this will post an "Abandon all changes?" pop-up.
+ *
+ * Return 'true' if the user really wants to reject (or if there were no
+ * changes anyway), 'false' if not.
**/
- void reject();
+ bool reject();
/**
* Close processing and accept changes
@@ -211,6 +211,8 @@
// Data members
+ YQPkgSelWmCloseHandler * _wmCloseHandler;
+
bool _showChangesDialog;
YQPkgConflictDialog * _pkgConflictDialog;
YQPkgDiskUsageList * _diskUsageList;
@@ -219,4 +221,33 @@
+/**
+ * Helper class: Event filter for the WM_CLOSE event
+ **/
+class YQPkgSelWmCloseHandler: public YEventFilter
+{
+public:
+ YQPkgSelWmCloseHandler( YQPackageSelectorBase * pkgSel )
+ : YEventFilter()
+ , _pkgSel( pkgSel )
+ , _inReject( false )
+ {}
+
+ virtual ~YQPkgSelWmCloseHandler() {};
+
+ /**
+ * The filter method: This is what this class is all about.
+ * Check for Cancel events (WM_CLOSE).
+ **/
+ virtual YEvent * filter( YEvent * event );
+
+ YQPackageSelectorBase * pkgSel() const { return _pkgSel; }
+
+private:
+
+ YQPackageSelectorBase * _pkgSel;
+ bool _inReject;
+};
+
+
#endif // YQPackageSelectorBase_h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.8/src/YQPackageSelector.cc new/yast2-qt-pkg-2.17.11/src/YQPackageSelector.cc
--- old/yast2-qt-pkg-2.17.8/src/YQPackageSelector.cc 2008-09-26 17:23:24.000000000 +0200
+++ new/yast2-qt-pkg-2.17.11/src/YQPackageSelector.cc 2008-10-09 18:21:16.000000000 +0200
@@ -716,16 +716,21 @@
//
// Configuration menu
//
- _configMenu = new QMenu( _menuBar );
- Q_CHECK_PTR( _configMenu );
- action = _menuBar->addMenu( _configMenu );
- action->setText(_( "&Configuration" ));
- _configMenu->addAction( _( "&Repositories..." ), this, SLOT( repoManager() ), Qt::CTRL + Qt::Key_R );
- _configMenu->addAction( _( "&Online Update..." ), this, SLOT( onlineUpdateConfiguration() ), Qt::CTRL + Qt::Key_O );
+
+ if ( repoMgrEnabled() )
+ {
+ _configMenu = new QMenu( _menuBar );
+ Q_CHECK_PTR( _configMenu );
+ action = _menuBar->addMenu( _configMenu );
+ action->setText(_( "&Configuration" ));
+ _configMenu->addAction( _( "&Repositories..." ), this, SLOT( repoManager() ), Qt::CTRL + Qt::Key_R );
+ _configMenu->addAction( _( "&Online Update..." ), this, SLOT( onlineUpdateConfiguration() ), Qt::CTRL + Qt::Key_O );
+ }
//
// Dependency menu
//
+
_dependencyMenu = new QMenu( _menuBar );
Q_CHECK_PTR( _dependencyMenu );
action = _menuBar->addMenu( _dependencyMenu );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.8/src/YQPkgConflictList.cc new/yast2-qt-pkg-2.17.11/src/YQPkgConflictList.cc
--- old/yast2-qt-pkg-2.17.8/src/YQPkgConflictList.cc 2008-09-26 17:23:24.000000000 +0200
+++ new/yast2-qt-pkg-2.17.11/src/YQPkgConflictList.cc 2008-10-09 18:21:16.000000000 +0200
@@ -195,6 +195,7 @@
file.write(header.toUtf8());
YQPkgConflict * conflict;
+
foreach( conflict, _conflicts )
{
conflict->saveToFile( file );
@@ -373,8 +374,10 @@
zypp::ProblemSolution_Ptr solution = it.value();
buffer.sprintf( " [%c] %s\n", button->isChecked() ? 'x' : ' ', qPrintable( fromUTF8( solution->description() ) ) );
buffer += fromUTF8( solution->details() );
+ buffer += "\n";
file.write(buffer.toUtf8());
}
+
file.write( "\n\n" );
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.8/src/YQPkgDiskUsageWarningDialog.cc new/yast2-qt-pkg-2.17.11/src/YQPkgDiskUsageWarningDialog.cc
--- old/yast2-qt-pkg-2.17.8/src/YQPkgDiskUsageWarningDialog.cc 2008-09-26 17:23:24.000000000 +0200
+++ new/yast2-qt-pkg-2.17.11/src/YQPkgDiskUsageWarningDialog.cc 2008-10-09 18:21:16.000000000 +0200
@@ -83,13 +83,14 @@
Q_CHECK_PTR( label );
hbox->addWidget(label);
label->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); // hor/vert
+ label->setTextFormat( Qt::RichText );
+ label->setWordWrap( true );
// Disk usage list
YQPkgDiskUsageList * duList = new YQPkgDiskUsageList( this, thresholdPercent );
Q_CHECK_PTR( duList );
-
layout->addWidget( duList );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.8/src/YQPkgDiskUsageWarningDialog.cc.bak new/yast2-qt-pkg-2.17.11/src/YQPkgDiskUsageWarningDialog.cc.bak
--- old/yast2-qt-pkg-2.17.8/src/YQPkgDiskUsageWarningDialog.cc.bak 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-qt-pkg-2.17.11/src/YQPkgDiskUsageWarningDialog.cc.bak 2008-10-09 18:21:16.000000000 +0200
@@ -0,0 +1,161 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: YQPkgDiskUsageWarningDialog.cc
+
+ Author: Stefan Hundhammer
+
+ Textdomain "qt-pkg"
+
+/-*/
+
+#define YUILogComponent "qt-pkg"
+#include "YUILog.h"
+
+#include <QApplication>
+#include <QLabel>
+#include <QLayout>
+#include <QPushButton>
+#include <QStyle>
+#include <QBoxLayout>
+
+#include "YQPkgDiskUsageWarningDialog.h"
+#include "YQPkgDiskUsageList.h"
+#include "QY2LayoutUtils.h"
+#include "YQUI.h"
+#include "YQi18n.h"
+
+
+#define SPACING 2 // between subwidgets
+#define MARGIN 4 // around the widget
+
+
+YQPkgDiskUsageWarningDialog::YQPkgDiskUsageWarningDialog( QWidget * parent,
+ const QString & message,
+ int thresholdPercent,
+ const QString & acceptButtonLabel,
+ const QString & rejectButtonLabel )
+ : QDialog( parent )
+{
+ // Dialog title
+ setWindowTitle( _( "Disk Space Warning" ) );
+
+ // Enable dialog resizing even without window manager
+ setSizeGripEnabled( true );
+
+ // Layout for the dialog ( can't simply insert a QVBox )
+
+ QVBoxLayout * layout = new QVBoxLayout();
+ Q_CHECK_PTR( layout );
+ layout->setSpacing( SPACING );
+ layout->setMargin ( MARGIN );
+ setLayout(layout);
+
+ // HBox for icon and message
+ QHBoxLayout * hbox = new QHBoxLayout();
+ Q_CHECK_PTR( hbox );
+ layout->addLayout( hbox );
+
+
+ // Icon
+
+ //addHSpacing( hbox );
+ QLabel * iconLabel = new QLabel( this );
+ Q_CHECK_PTR( iconLabel );
+ hbox->addWidget(iconLabel);
+#ifdef FIXME
+ iconLabel->setPixmap( QApplication::style().stylePixmap( QStyle::SP_MessageBoxWarning ) );
+#endif
+ iconLabel->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); // hor/vert
+
+ // Label for the message
+
+ QLabel * label = new QLabel( message, this);
+ Q_CHECK_PTR( label );
+ hbox->addWidget(label);
+ label->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); // hor/vert
+
+
+ // Disk usage list
+
+ YQPkgDiskUsageList * duList = new YQPkgDiskUsageList( this, thresholdPercent );
+ Q_CHECK_PTR( duList );
+
+ layout->addWidget( duList );
+
+
+ // Button box
+
+ hbox = new QHBoxLayout();
+ Q_CHECK_PTR( hbox );
+ hbox->setSpacing( SPACING );
+ hbox->setMargin ( MARGIN );
+ layout->addLayout( hbox );
+
+ //addHStretch( hbox );
+
+
+ // Accept button - usually "OK" or "Continue"
+
+ QPushButton * button = new QPushButton( acceptButtonLabel, this );
+ Q_CHECK_PTR( button );
+ hbox->addWidget(button);
+
+ connect( button, SIGNAL( clicked() ),
+ this, SLOT ( accept() ) );
+
+ //addHStretch( hbox );
+
+
+ if ( ! rejectButtonLabel.isEmpty() )
+ {
+ // Reject button ( if desired ) - usually "Cancel"
+
+ button = new QPushButton( rejectButtonLabel, this );
+ Q_CHECK_PTR( button );
+ hbox->addWidget(button);
+
+ connect( button, SIGNAL( clicked() ),
+ this, SLOT ( reject() ) );
+
+ //addHStretch( hbox );
+ }
+
+ // If there is only one button, it's safe to make that one ( the accept
+ // button ) the default. If there are two, better be safe than sorry and
+ // make the reject button the default.
+
+ button->setDefault( true );
+}
+
+
+bool
+YQPkgDiskUsageWarningDialog::diskUsageWarning( const QString & message,
+ int thresholdPercent,
+ const QString & acceptButtonLabel,
+ const QString & rejectButtonLabel )
+{
+ YQPkgDiskUsageWarningDialog dialog( 0,
+ message,
+ thresholdPercent,
+ acceptButtonLabel,
+ rejectButtonLabel );
+ YQUI::ui()->normalCursor();
+ dialog.exec();
+
+ return dialog.result() == QDialog::Accepted;
+}
+
+
+
+
+#include "YQPkgDiskUsageWarningDialog.moc"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.8/src/YQPkgList.cc new/yast2-qt-pkg-2.17.11/src/YQPkgList.cc
--- old/yast2-qt-pkg-2.17.8/src/YQPkgList.cc 2008-09-26 17:23:24.000000000 +0200
+++ new/yast2-qt-pkg-2.17.11/src/YQPkgList.cc 2008-10-09 18:21:16.000000000 +0200
@@ -428,51 +428,51 @@
// wrong, so the formatting will be broken.
QString header;
- header.sprintf( "# %-18s %-30s | %10s | %-16s | %-16s\n\n",
+ header.sprintf( "# %-18s %-30s | %-40s | %-25s | %10s\n\n",
(const char *) _( "Status" ).toUtf8(),
(const char *) _( "Package" ).toUtf8(),
- (const char *) _( "Size" ).toUtf8(),
- (const char *) _( "Avail. Ver." ).toUtf8(),
- (const char *) _( "Inst. Ver." ).toUtf8()
+ (const char *) _( "Summary" ).toUtf8(),
+ (const char *) _( "Installed (Available)" ).toUtf8(),
+ (const char *) _( "Size" ).toUtf8()
);
file.write(header.toUtf8());
- //
// Write all items
- //
-#if FIXME
- const QTreeWidgetItem * item = firstChild();
-
- while ( item )
+ QTreeWidgetItemIterator it((QTreeWidget*) this);
+ while (*it)
{
- const YQPkgListItem * pkg = dynamic_cast (item);
-
- if ( pkg )
- {
- QString candVersion = pkg->text( versionCol() );
- QString instVersion = pkg->text( instVersionCol() );
+ const QTreeWidgetItem* item(*it);
+ const YQPkgListItem * pkg = dynamic_cast (item);
- if ( candVersion.isEmpty() ) candVersion = "---";
- if ( instVersion.isEmpty() ) instVersion = "---";
+ if ( pkg )
+ {
+ QString version = pkg->text(versionStatusCol());
+ if ( version.isEmpty() ) version = "---";
+
+ QString summary = pkg->text(summaryCol());
+ if ( summary.isEmpty() ) summary = "---";
+ if ( summary.size() > 40 )
+ {
+ summary.truncate(40-3);
+ summary += "...";
+ }
- QString status = "[" + statusText( pkg->status() ) + "]";
+ QString status = "[" + statusText( pkg->status() ) + "]";
QString format;
- format.sprintf("%-20s %-30s | %10s | %-16s | %-16s\n",
- (const char *) status.toUtf8(),
- (const char *) pkg->text( nameCol() ),
- (const char *) pkg->text( sizeCol() ),
- (const char *) candVersion,
- (const char *) instVersion
+ format.sprintf("%-20s %-30s | %-40s | %-25s | %10s\n",
+ (const char*) status.toUtf8(),
+ (const char*) pkg->text( nameCol() ).toUtf8(),
+ (const char*) summary.toUtf8(),
+ (const char*) version.toUtf8(),
+ (const char*) pkg->text( sizeCol() ).toUtf8()
);
file.write(format.toUtf8());
}
-
- item = item->nextSibling();
+ ++it;
}
-#endif
// Clean up
if ( file.isOpen() )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.8/src/YQZyppSolverDialogPluginStub.cc new/yast2-qt-pkg-2.17.11/src/YQZyppSolverDialogPluginStub.cc
--- old/yast2-qt-pkg-2.17.8/src/YQZyppSolverDialogPluginStub.cc 2008-09-26 17:23:24.000000000 +0200
+++ new/yast2-qt-pkg-2.17.11/src/YQZyppSolverDialogPluginStub.cc 2008-10-09 18:21:16.000000000 +0200
@@ -60,7 +60,7 @@
{
QMessageBox::information( 0,
_("Missing package") ,
- _("Package libqdialogsolver is rquired for this feature."));
+ _("Package libqdialogsolver is required for this feature."));
return false;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.8/VERSION.cmake new/yast2-qt-pkg-2.17.11/VERSION.cmake
--- old/yast2-qt-pkg-2.17.8/VERSION.cmake 2008-09-26 17:23:24.000000000 +0200
+++ new/yast2-qt-pkg-2.17.11/VERSION.cmake 2008-10-09 18:21:16.000000000 +0200
@@ -1,5 +1,3 @@
SET(VERSION_MAJOR "2")
SET(VERSION_MINOR "17")
-SET(VERSION_PATCH "8")
-
-# RELEASED: 2.17.6
+SET(VERSION_PATCH "11")
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.8/yast2-qt-pkg.spec.in new/yast2-qt-pkg-2.17.11/yast2-qt-pkg.spec.in
--- old/yast2-qt-pkg-2.17.8/yast2-qt-pkg.spec.in 2008-09-26 17:23:24.000000000 +0200
+++ new/yast2-qt-pkg-2.17.11/yast2-qt-pkg.spec.in 2008-10-09 18:21:16.000000000 +0200
@@ -7,8 +7,8 @@
Summary: -
BuildRequires: yast2-devtools >= 2.16.3
-Requires: yast2-qt >= 2.16.25
-BuildRequires: yast2-qt-devel >= 2.16.25
+Requires: yast2-qt >= 2.17.13
+BuildRequires: yast2-qt-devel >= 2.17.13
BuildRequires: libzypp-devel >= 4.7.0
BuildRequires: yast2-libyui-devel >= 2.16.47
Requires: libzypp >= 4.7.0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org