Hello community,
here is the log from the commit of package yast2-qt
checked in at Mon Oct 30 22:51:10 CET 2006.
--------
--- yast2-qt/yast2-qt.changes 2006-10-27 14:35:28.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-qt/yast2-qt.changes 2006-10-30 18:22:40.000000000 +0100
@@ -1,0 +2,7 @@
+Mon Oct 30 18:11:50 CET 2006 - sh@suse.de
+
+- Consistent handling of isSatisfied and isBroken for bug #173488
+- Added real "isSatisfied" icon
+- V 2.13.72
+
+-------------------------------------------------------------------
Old:
----
yast2-qt-2.13.71.tar.bz2
New:
----
yast2-qt-2.13.72.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-qt.spec ++++++
--- /var/tmp/diff_new_pack.OqxyNC/_old 2006-10-30 22:51:03.000000000 +0100
+++ /var/tmp/diff_new_pack.OqxyNC/_new 2006-10-30 22:51:03.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-qt (Version 2.13.71)
+# spec file for package yast2-qt (Version 2.13.72)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-qt
-Version: 2.13.71
+Version: 2.13.72
Release: 1
License: GNU General Public License (GPL) - all versions
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-qt-2.13.71.tar.bz2
+Source0: yast2-qt-2.13.72.tar.bz2
prefix: /usr
BuildRequires: boost-devel curl-devel dbus-1-devel docbook-xsl-stylesheets doxygen hal-devel libdrm-devel libjpeg-devel libxcrypt-devel libxslt libzypp-devel perl-XML-Writer qt3-devel rpm-devel sgml-skel update-desktop-files yast2-core-devel yast2-devtools
Summary: YaST2 - Graphical User Interface
@@ -42,7 +42,7 @@
Stefan Hundhammer
%prep
-%setup -n yast2-qt-2.13.71
+%setup -n yast2-qt-2.13.72
%build
%{prefix}/bin/y2tool y2autoconf
@@ -85,6 +85,10 @@
%doc %{prefix}/share/doc/packages/yast2-qt
%changelog -n yast2-qt
+* Mon Oct 30 2006 - sh@suse.de
+- Consistent handling of isSatisfied and isBroken for bug #173488
+- Added real "isSatisfied" icon
+- V 2.13.72
* Fri Oct 27 2006 - sh@suse.de
- Added missing icon to dist tarball
- V 2.13.71
++++++ yast2-qt-2.13.71.tar.bz2 -> yast2-qt-2.13.72.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.71/VERSION new/yast2-qt-2.13.72/VERSION
--- old/yast2-qt-2.13.71/VERSION 2006-10-27 13:43:39.000000000 +0200
+++ new/yast2-qt-2.13.72/VERSION 2006-10-30 18:11:47.000000000 +0100
@@ -1 +1 @@
-2.13.71
+2.13.72
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.71/src/YQIconPool.cc new/yast2-qt-2.13.72/src/YQIconPool.cc
--- old/yast2-qt-2.13.71/src/YQIconPool.cc 2006-10-26 13:07:20.000000000 +0200
+++ new/yast2-qt-2.13.72/src/YQIconPool.cc 2006-10-30 15:49:47.000000000 +0100
@@ -51,6 +51,7 @@
#include "icons/tree_plus.xpm"
#include "icons/tree_minus.xpm"
#include "icons/warning_sign.xpm"
+#include "icons/satisfied.xpm"
#include "icons/normal_conflict.xpm"
#include "icons/select_conflict.xpm"
@@ -106,6 +107,7 @@
QPixmap YQIconPool::treeMinus() { return iconPool()->cachedIcon( tree_minus_xpm ); }
QPixmap YQIconPool::warningSign() { return iconPool()->cachedIcon( warning_sign_xpm ); }
+QPixmap YQIconPool::pkgSatisfied() { return iconPool()->cachedIcon( satisfied_xpm ); }
YQIconPool * YQIconPool::iconPool()
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.71/src/YQPkgObjList.cc new/yast2-qt-2.13.72/src/YQPkgObjList.cc
--- old/yast2-qt-2.13.71/src/YQPkgObjList.cc 2006-10-26 18:55:56.000000000 +0200
+++ new/yast2-qt-2.13.72/src/YQPkgObjList.cc 2006-10-30 17:52:13.000000000 +0100
@@ -55,6 +55,7 @@
_sizeCol = -42;
_brokenIconCol = -42;
_satisfiedIconCol = -42;
+ _debug = false;
createActions();
@@ -559,6 +560,18 @@
{
if ( event )
{
+ unsigned special_combo = ( Qt::ControlButton | Qt::ShiftButton | Qt::AltButton );
+
+ if ( ( event->state() & special_combo ) == special_combo )
+ {
+ if ( event->key() == Qt::Key_Q )
+ {
+ _debug= ! _debug;
+ y2milestone( "Debug mode %s", _debug ? "on" : "off" );
+ }
+
+ }
+
QListViewItem * selectedListViewItem = selectedItem();
if ( selectedListViewItem )
@@ -634,6 +647,28 @@
selectNextItem();
event->accept();
return;
+
+ case 'b':
+ case 'B': // Toggle debugIsBroken flag
+
+ if ( _debug )
+ {
+ item->toggleDebugIsBroken();
+ item->setStatusIcon();
+ }
+ event->accept();
+ break;
+
+ case 's':
+ case 'S': // Toggle debugIsSatisfied flag
+
+ if ( _debug )
+ {
+ item->toggleDebugIsSatisfied();
+ item->setStatusIcon();
+ }
+ event->accept();
+ break;
}
}
}
@@ -695,9 +730,10 @@
if ( _zyppObj == 0 && _selectable )
_zyppObj = _selectable->theObj();
-
- _candidateIsNewer = false;
- _installedIsNewer = false;
+ _debugIsBroken = false;
+ _debugIsSatisfied = false;
+ _candidateIsNewer = false;
+ _installedIsNewer = false;
const ZyppObj candidate = selectable()->candidateObj();
const ZyppObj installed = selectable()->installedObj();
@@ -843,11 +879,6 @@
setPixmap( statusCol(), _pkgObjList->statusIcon( status(), enabled, bySelection() ) );
}
- //
- // Set special icon for zyppObjs that are not marked as installed,
- // but satisfied anyway (e.g. for patches or patterns where the user
- // selected all required packages manually)
- //
if ( brokenIconCol() >= 0 )
{
@@ -857,67 +888,79 @@
if ( satisfiedIconCol() >= 0 )
{
- if ( ! _selectable->hasInstalledObj() &&
- _selectable->installedPoolItem().status().isSatisfied() )
- {
-#warning FIXME: Use another icon
- setPixmap( satisfiedIconCol(), YQIconPool::pkgSelAutoInstall() );
- }
- else
- {
- setPixmap( satisfiedIconCol(), QPixmap() );
- }
+ // Set special icon for zyppObjs that are not marked as installed,
+ // but satisfied anyway (e.g. for patches or patterns where the user
+ // selected all required packages manually)
+
+ setPixmap( satisfiedIconCol(), isSatisfied() ? YQIconPool::pkgSatisfied() : QPixmap() );
}
- //
- // Set special icon for zyppObjs that are installed, but broken
- // (dependencies no longer satisfied, e.g. for patches or patterns)
- //
if ( brokenIconCol() >= 0 )
{
- if ( _selectable->hasInstalledObj() )
+ // Set special icon for zyppObjs that are installed, but broken
+ // (dependencies no longer satisfied, e.g. for patches or patterns)
+
+ if ( isBroken() )
{
- bool isBroken = _selectable->installedPoolItem().status().isIncomplete();
- bool willBeFixed = false;
+ setPixmap( brokenIconCol(), YQIconPool::warningSign() );
- switch ( status() )
- {
- case S_KeepInstalled:
- case S_Protected:
+ y2warning( "Broken object: %s - %s",
+ _selectable->theObj()->name().c_str(),
+ _selectable->theObj()->summary().c_str() );
+ }
+ }
- willBeFixed = false;
- break;
+}
- case S_Update:
- case S_AutoUpdate:
- case S_Del:
- case S_AutoDel:
- case S_NoInst:
-
- willBeFixed = true;
- break;
-
- case S_Install:
- case S_AutoInstall:
- case S_Taboo:
- y2error( "Expected uninstalled zyppObj" );
- break;
- }
+bool
+YQPkgObjListItem::isSatisfied() const
+{
+ if ( _debugIsSatisfied )
+ return true;
- if ( isBroken && ! willBeFixed )
- {
- setPixmap( brokenIconCol(), YQIconPool::warningSign() );
-
- y2warning( "Broken object: %s - %s",
- _selectable->theObj()->name().c_str(),
- _selectable->theObj()->summary().c_str() );
- }
- }
+ if ( _selectable->hasInstalledObj() )
+ return false;
+
+ return _selectable->candidatePoolItem().status().isSatisfied();
+}
+
+
+bool YQPkgObjListItem::isBroken() const
+{
+ if ( _debugIsBroken )
+ return true;
+
+ if ( ! _selectable->hasInstalledObj() )
+ return false; // can't be broken if not installed
+
+ switch ( status() )
+ {
+ case S_KeepInstalled:
+ case S_Protected:
+
+ return _selectable->installedPoolItem().status().isIncomplete();
+
+ case S_Update: // will be fixed by updating
+ case S_AutoUpdate:
+ case S_Del: // will no longer be relevant after deleting
+ case S_AutoDel:
+
+ return false;
+
+ case S_NoInst: // should not happen - no installed obj
+ case S_Install:
+ case S_AutoInstall:
+ case S_Taboo:
+
+ y2error( "Expected uninstalled zyppObj" );
+ return false;
}
+ y2error( "Should never get here" );
+ return false;
}
@@ -1136,6 +1179,24 @@
return tip;
}
+ if ( col == brokenIconCol() )
+ {
+ if ( isBroken() )
+ // Translators: tool tip for patches / patterns that are installed,
+ // but whose dependencies are broken (no longer satisfied)
+ return _( "Dependencies broken" );
+ }
+
+ // don't use "else if" here, it might be the same colum as another one!
+
+ if ( col == satisfiedIconCol() )
+ {
+ if ( isSatisfied() )
+ // Translators: tool tip for patches / patterns that are not installed,
+ // but whose dependencies are satisfied
+ return _( "All dependencies satisfied" );
+ }
+
return QString::null;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.71/src/YQPkgSelList.cc new/yast2-qt-2.13.72/src/YQPkgSelList.cc
--- old/yast2-qt-2.13.71/src/YQPkgSelList.cc 2006-08-18 15:53:46.000000000 +0200
+++ new/yast2-qt-2.13.72/src/YQPkgSelList.cc 2006-10-30 17:12:44.000000000 +0100
@@ -41,6 +41,9 @@
addColumn( _( "Selection" ) ); _summaryCol = numCol++;
setAllColumnsShowFocus( true );
+ _satisfiedIconCol = _summaryCol;
+ _brokenIconCol = _summaryCol;
+
if ( autoFilter )
{
connect( this, SIGNAL( selectionChanged( QListViewItem * ) ),
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.71/src/include/YQIconPool.h new/yast2-qt-2.13.72/src/include/YQIconPool.h
--- old/yast2-qt-2.13.71/src/include/YQIconPool.h 2006-10-26 13:07:36.000000000 +0200
+++ new/yast2-qt-2.13.72/src/include/YQIconPool.h 2006-10-30 15:48:47.000000000 +0100
@@ -71,6 +71,7 @@
static QPixmap treeMinus();
static QPixmap warningSign();
+ static QPixmap pkgSatisfied();
protected:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.71/src/include/YQPkgObjList.h new/yast2-qt-2.13.72/src/include/YQPkgObjList.h
--- old/yast2-qt-2.13.71/src/include/YQPkgObjList.h 2006-10-26 18:55:56.000000000 +0200
+++ new/yast2-qt-2.13.72/src/include/YQPkgObjList.h 2006-10-30 17:42:09.000000000 +0100
@@ -311,6 +311,7 @@
int _brokenIconCol;
int _satisfiedIconCol;
bool _editable;
+ bool _debug;
QPopupMenu * _installedContextMenu;
@@ -439,6 +440,21 @@
bool installedIsNewer() const { return _installedIsNewer; }
/**
+ * Check if this item is satisfied, even though it is not installed.
+ * This is useful for package collections, e.g., patterns and patches:
+ * 'true' is returned if all requirements are fulfilled, but the object
+ * itself is not installed.
+ **/
+ bool isSatisfied() const;
+
+ /**
+ * Check if this item is "broken": If it is installed, but any of its
+ * dependencies are no longer satisfied.
+ * This is useful for package collections, e.g., patterns and patches.
+ **/
+ bool isBroken() const;
+
+ /**
* Display this item's notify text (if there is any) that corresponds to
* the specified status (S_Install, S_Del) in a pop-up window.
**/
@@ -501,6 +517,16 @@
**/
virtual QString toolTip( int column );
+
+ // Handle Debug isBroken and isSatisfied flags
+
+ bool debugIsBroken() const { return _debugIsBroken; }
+ bool debugIsSatisfied() const { return _debugIsSatisfied; }
+ void setDebugIsBroken ( bool val = true ) { _debugIsBroken = val; }
+ void setDebugIsSatisfied( bool val = true ) { _debugIsSatisfied = val; }
+ void toggleDebugIsBroken() { _debugIsBroken = ! _debugIsBroken; }
+ void toggleDebugIsSatisfied() { _debugIsSatisfied = ! _debugIsSatisfied; }
+
// Columns
@@ -564,9 +590,12 @@
YQPkgObjList * _pkgObjList;
ZyppSel _selectable;
ZyppObj _zyppObj;
- bool _editable;
- bool _candidateIsNewer;
- bool _installedIsNewer;
+ bool _editable:1;
+ bool _candidateIsNewer:1;
+ bool _installedIsNewer:1;
+
+ bool _debugIsBroken:1;
+ bool _debugIsSatisfied:1;
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.71/src/include/icons/Makefile.am new/yast2-qt-2.13.72/src/include/icons/Makefile.am
--- old/yast2-qt-2.13.71/src/include/icons/Makefile.am 2006-10-27 13:31:21.000000000 +0200
+++ new/yast2-qt-2.13.72/src/include/icons/Makefile.am 2006-10-30 15:47:26.000000000 +0100
@@ -31,6 +31,7 @@
sel_autoinstall_disabled.xpm \
sel_autoupdate.xpm \
sel_autoupdate_disabled.xpm \
+ satisfied.xpm \
select_conflict.xpm \
stop.xpm \
taboo.xpm \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.71/src/include/icons/Makefile.in new/yast2-qt-2.13.72/src/include/icons/Makefile.in
--- old/yast2-qt-2.13.71/src/include/icons/Makefile.in 2006-10-27 13:44:53.000000000 +0200
+++ new/yast2-qt-2.13.72/src/include/icons/Makefile.in 2006-10-30 16:42:20.000000000 +0100
@@ -241,6 +241,7 @@
sel_autoinstall_disabled.xpm \
sel_autoupdate.xpm \
sel_autoupdate_disabled.xpm \
+ satisfied.xpm \
select_conflict.xpm \
stop.xpm \
taboo.xpm \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.71/src/include/icons/satisfied.xpm new/yast2-qt-2.13.72/src/include/icons/satisfied.xpm
--- old/yast2-qt-2.13.71/src/include/icons/satisfied.xpm 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-qt-2.13.72/src/include/icons/satisfied.xpm 2006-10-30 17:48:50.000000000 +0100
@@ -0,0 +1,29 @@
+/* XPM */
+static const char * satisfied_xpm[] = {
+"17 16 10 1",
+" c None",
+". c #FEFEFE",
+"+ c #E8E8E8",
+"@ c #757575",
+"# c #8D8D8D",
+"$ c #C9C9C9",
+"% c #F2F2F2",
+"& c #C3C3C3",
+"* c #D3D3D3",
+"= c #FFFFFF",
+" ",
+" ",
+" .... ",
+" .+@#. ",
+" .+@@@+ ",
+" .+@@@@. ",
+" ....+ .+@@@@.$ ",
+" .+@#++%+@@@@.&* ",
+" .@@@@++@@@@.$*+ ",
+" +.@@@@@@@@.&*= ",
+" +.@@@@@@.&*+ ",
+" +.@@@@.&*+ ",
+" +.@@.&*+ ",
+" +..&*+ ",
+" +&*+ ",
+" ++ "};
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org