Hello community,
here is the log from the commit of package yast2-qt
checked in at Tue Apr 4 18:25:07 CEST 2006.
--------
--- yast2-qt/yast2-qt.changes 2006-03-31 22:04:04.000000000 +0200
+++ yast2-qt/yast2-qt.changes 2006-04-04 18:06:47.000000000 +0200
@@ -1,0 +2,8 @@
+Tue Apr 4 17:59:20 CEST 2006 - sh@suse.de
+
+- V 2.13.45
+- Fixed bug #161400: Switching between alternative patterns
+- Migrated from Resolver::transactResObject() to
+ Resolver::transactResKind() for all higher-level YQPkg*Lists
+
+-------------------------------------------------------------------
Old:
----
yast2-qt-2.13.44.tar.bz2
New:
----
yast2-qt-2.13.45.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-qt.spec ++++++
--- /var/tmp/diff_new_pack.oIKvsk/_old 2006-04-04 18:24:45.000000000 +0200
+++ /var/tmp/diff_new_pack.oIKvsk/_new 2006-04-04 18:24:45.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-qt (Version 2.13.44)
+# spec file for package yast2-qt (Version 2.13.45)
#
# 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.44
+Version: 2.13.45
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-qt-2.13.44.tar.bz2
+Source0: yast2-qt-2.13.45.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.44
+%setup -n yast2-qt-2.13.45
%build
%{prefix}/bin/y2tool y2autoconf
@@ -80,6 +80,11 @@
%doc %{prefix}/share/doc/packages/yast2-qt
%changelog -n yast2-qt
+* Tue Apr 04 2006 - sh@suse.de
+- V 2.13.45
+- Fixed bug #161400: Switching between alternative patterns
+- Migrated from Resolver::transactResObject() to
+ Resolver::transactResKind() for all higher-level YQPkg*Lists
* Fri Mar 31 2006 - sh@suse.de
- V 2.13.44
- Fixed bug #161860: Pattern selector layout out of proportion
++++++ yast2-qt-2.13.44.tar.bz2 -> yast2-qt-2.13.45.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.44/VERSION new/yast2-qt-2.13.45/VERSION
--- old/yast2-qt-2.13.44/VERSION 2006-03-31 18:34:53.000000000 +0200
+++ new/yast2-qt-2.13.45/VERSION 2006-04-04 17:59:18.000000000 +0200
@@ -1 +1 @@
-2.13.44
+2.13.45
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.44/src/YQPkgLangList.cc new/yast2-qt-2.13.45/src/YQPkgLangList.cc
--- old/yast2-qt-2.13.44/src/YQPkgLangList.cc 2006-03-28 16:01:22.000000000 +0200
+++ new/yast2-qt-2.13.45/src/YQPkgLangList.cc 2006-04-04 17:04:59.000000000 +0200
@@ -45,7 +45,6 @@
// Full (human readable) language / country name like "German (Austria)"
addColumn( _( "Language" ) ); _summaryCol = numCol++;
setAllColumnsShowFocus( true );
- setAutoApplyChanges( true );
connect( this, SIGNAL( selectionChanged ( QListViewItem * ) ),
this, SLOT ( filter() ) );
@@ -122,7 +121,7 @@
//
// Iterate over all "freshens" dependencies of this object
//
-
+
zypp::CapSet freshens = zyppObj->dep( zypp::Dep::FRESHENS );
for ( zypp::CapSet::const_iterator cap_it = freshens.begin();
@@ -137,7 +136,7 @@
{
y2debug( "Found pkg %s for lang %s",
pkg->name().c_str(), currentLang.c_str() );
-
+
emit filterMatch( *it, pkg );
}
else
@@ -203,5 +202,13 @@
}
+void
+YQPkgLangListItem::applyChanges()
+{
+ solveResKindzypp::Language();
+}
+
+
+
#include "YQPkgLangList.moc"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.44/src/YQPkgObjList.cc new/yast2-qt-2.13.45/src/YQPkgObjList.cc
--- old/yast2-qt-2.13.44/src/YQPkgObjList.cc 2006-03-22 14:13:43.000000000 +0100
+++ new/yast2-qt-2.13.45/src/YQPkgObjList.cc 2006-04-04 15:38:59.000000000 +0200
@@ -25,8 +25,6 @@
#include
#include
-#include
-
#include "utf8.h"
#include "YQPkgObjList.h"
@@ -42,7 +40,6 @@
YQPkgObjList::YQPkgObjList( QWidget * parent )
: QY2ListView( parent )
, _editable( true )
- , _autoApplyChanges( false )
, _installedContextMenu(0)
, _notInstalledContextMenu(0)
{
@@ -785,8 +782,7 @@
ZyppStatus oldStatus = selectable()->status();
selectable()->set_status( newStatus );
- if ( _pkgObjList->autoApplyChanges()
- && oldStatus != selectable()->status() )
+ if ( oldStatus != selectable()->status() )
{
applyChanges();
@@ -799,51 +795,6 @@
void
-YQPkgObjListItem::applyChanges()
-{
- bool install = true;
-
- switch ( selectable()->status() )
- {
- case S_Del:
- case S_AutoDel:
- case S_NoInst:
- case S_KeepInstalled:
- case S_Taboo:
- case S_Protected:
- install = false;
- break;
-
- case S_Install:
- case S_AutoInstall:
- case S_Update:
- case S_AutoUpdate:
- install = true;
- break;
-
- // Intentionally omitting 'default' branch so the compiler can
- // catch unhandled enum states
- }
-
-
- ZyppObj obj = install ? // the other way round as mayb expected:
- selectable()->candidateObj() : // install the candidate,
- selectable()->installedObj(); // remove the installed
-
- if ( ! obj )
- obj = selectable()->theObj();
-
- y2debug( "Transacting selection %s with %s",
- obj->name().c_str(), install ? "install" : "delete" );
-
- bool success = zypp::getZYpp()->resolver()->transactResObject( obj, install );
-
- if ( ! success )
- y2warning( "Couldn't transact %s", obj->name().c_str() );
-}
-
-
-void
YQPkgObjListItem::updateStatus()
{
setStatusIcon();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.44/src/YQPkgPatchList.cc new/yast2-qt-2.13.45/src/YQPkgPatchList.cc
--- old/yast2-qt-2.13.44/src/YQPkgPatchList.cc 2006-03-29 12:41:32.000000000 +0200
+++ new/yast2-qt-2.13.45/src/YQPkgPatchList.cc 2006-04-04 17:05:22.000000000 +0200
@@ -52,7 +52,6 @@
addColumn( _( "Size" ) ); _sizeCol = numCol++;
setAllColumnsShowFocus( true );
setColumnAlignment( sizeCol(), Qt::AlignRight );
- setAutoApplyChanges( true );
connect( this, SIGNAL( selectionChanged ( QListViewItem * ) ),
this, SLOT ( filter() ) );
@@ -408,6 +407,14 @@
}
+void
+YQPkgPatchListItem::applyChanges()
+{
+ solveResKindzypp::Patch();
+ solveResKindzypp::Atom();
+}
+
+
/**
* Comparison function used for sorting the list.
* Returns:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.44/src/YQPkgPatternList.cc new/yast2-qt-2.13.45/src/YQPkgPatternList.cc
--- old/yast2-qt-2.13.44/src/YQPkgPatternList.cc 2006-03-31 21:39:19.000000000 +0200
+++ new/yast2-qt-2.13.45/src/YQPkgPatternList.cc 2006-04-04 17:06:23.000000000 +0200
@@ -58,7 +58,6 @@
setAllColumnsShowFocus( true );
setTreeStepSize( 0 );
- setAutoApplyChanges( true );
if ( autoFilter )
{
@@ -256,6 +255,13 @@
}
+void
+YQPkgPatternListItem::applyChanges()
+{
+ solveResKindzypp::Pattern();
+}
+
+
/**
* Comparison function used for sorting the list.
@@ -342,7 +348,6 @@
}
-
/**
* Comparison function used for sorting the list.
* Returns:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.44/src/YQPkgSelList.cc new/yast2-qt-2.13.45/src/YQPkgSelList.cc
--- old/yast2-qt-2.13.44/src/YQPkgSelList.cc 2006-03-15 18:43:33.000000000 +0100
+++ new/yast2-qt-2.13.45/src/YQPkgSelList.cc 2006-04-04 17:05:49.000000000 +0200
@@ -40,7 +40,6 @@
addColumn( "" ); _statusCol = numCol++;
addColumn( _( "Selection" ) ); _summaryCol = numCol++;
setAllColumnsShowFocus( true );
- setAutoApplyChanges( true );
if ( autoFilter )
{
@@ -190,13 +189,18 @@
}
-
YQPkgSelListItem::~YQPkgSelListItem()
{
// NOP
}
+void
+YQPkgSelListItem::applyChanges()
+{
+ solveResKindzypp::Selection();
+}
+
/**
* Comparison function used for sorting the list.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.44/src/include/YQPkgLangList.h new/yast2-qt-2.13.45/src/include/YQPkgLangList.h
--- old/yast2-qt-2.13.44/src/include/YQPkgLangList.h 2006-03-15 18:59:47.000000000 +0100
+++ new/yast2-qt-2.13.45/src/include/YQPkgLangList.h 2006-04-04 15:38:29.000000000 +0200
@@ -132,16 +132,25 @@
/**
* Returns the original object within the package manager backend.
**/
- ZyppLang zyppLang() const { return _zyppLang; }
+ ZyppLang zyppLang() const { return _zyppLang; }
// Columns
- int statusCol() const { return _langList->statusCol(); }
+ int statusCol() const { return _langList->statusCol(); }
protected:
+ /**
+ * Propagate status changes in this list to other lists:
+ * Have the solver transact all languages.
+ *
+ * Reimplemented from YQPkgObjListItem.
+ **/
+ virtual void applyChanges();
+
+
// Data members
YQPkgLangList * _langList;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.44/src/include/YQPkgObjList.h new/yast2-qt-2.13.45/src/include/YQPkgObjList.h
--- old/yast2-qt-2.13.44/src/include/YQPkgObjList.h 2006-03-15 19:04:29.000000000 +0100
+++ new/yast2-qt-2.13.45/src/include/YQPkgObjList.h 2006-04-04 17:04:03.000000000 +0200
@@ -74,13 +74,6 @@
bool editable() const { return _editable; }
/**
- * Returns 'true' if items should automatically call their applyChanges()
- * method upon status change. By default this will trigger a dependency
- * resolver run for the item's selectable.
- **/
- bool autoApplyChanges() const { return _autoApplyChanges; }
-
- /**
* Set the list's editable status.
**/
void setEditable( bool editable = true ) { _editable = editable; }
@@ -249,12 +242,6 @@
protected:
/**
- * Set the autoApplyChanges flag.
- **/
- void setAutoApplyChanges( bool autoApply )
- { _autoApplyChanges = autoApply; }
-
- /**
* Event handler for keyboard input.
* Only very special keys are processed here.
*
@@ -319,7 +306,6 @@
int _versionCol;
int _instVersionCol;
bool _editable;
- bool _autoApplyChanges;
QPopupMenu * _installedContextMenu;
@@ -417,24 +403,12 @@
virtual void setStatus( ZyppStatus newStatus );
/**
- * Apply changes. This default implementation performs a dependency
- * resolver run on this item's selectable if the parent list's
- * autoApplyChanges flag is set.
- **/
- virtual void applyChanges();
-
- /**
* Update this item's status.
* Triggered by QY2ListView::updateAllItemStates().
* Overwritten from QY2ListViewItem.
**/
virtual void updateStatus();
-
- /**
- * Set a status icon according to the package's status.
- **/
- virtual void setStatusIcon();
-
+
/**
* Cycle the package status to the next valid value.
**/
@@ -451,32 +425,14 @@
bool installedIsNewer() const { return _installedIsNewer; }
/**
- * Set a column text via STL string.
- * ( QListViewItem::setText() expects a QString! )
- **/
- void setText( int column, const string text );
-
- /**
- * Re-declare ordinary setText() method so the compiler doesn't get
- * confused which one to use.
- **/
- void setText( int column, const QString & text )
- { QListViewItem::setText( column, text ); }
-
- /**
- * Set a column text via Edition.
- **/
- void setText( int column, const zypp::Edition & edition );
-
- /**
* 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.
**/
void showNotifyTexts( ZyppStatus status );
/**
- * Display this item's license agreement (if there is any) that corresponds to
- * the specified status (S_Install, S_Update) in a pop-up window.
+ * Display this item's license agreement (if there is any) that corresponds
+ * to the specified status (S_Install, S_Update) in a pop-up window.
*
* Returns 'true' if the user agreed to that license , 'false' otherwise.
* The item's status may have changed to S_Taboo, S_Proteced or S_Del if
@@ -498,7 +454,9 @@
bool ascending ) const;
/**
- * Calculate a numerical value to compare versions, based on version relations:
+ * Calculate a numerical value to compare versions, based on version
+ * relations:
+ *
* - Installed newer than candidate (red)
* - Candidate newer than installed (blue) - worthwhile updating
* - Installed
@@ -539,18 +497,66 @@
* Initialize internal data and set fields accordingly.
**/
void init();
+
+ /**
+ * Set a status icon according to the package's status.
+ **/
+ virtual void setStatusIcon();
+
+ /**
+ * Apply changes hook. This is called each time the user changes the status
+ * of a list item manually (if the old status is different from the new
+ * one). Insert code to propagate changes to other objects here, for
+ * example to trigger a "small" solver run (Resolver::transactObjKind()
+ * etc.).
+ *
+ * This default implementation does nothing.
+ **/
+ virtual void applyChanges() {}
+
+ /**
+ * Set a column text via STL string.
+ * ( QListViewItem::setText() expects a QString! )
+ **/
+ void setText( int column, const string text );
+
+ /**
+ * Re-declare ordinary setText() method so the compiler doesn't get
+ * confused which one to use.
+ **/
+ void setText( int column, const QString & text )
+ { QListViewItem::setText( column, text ); }
+ /**
+ * Set a column text via Edition.
+ **/
+ void setText( int column, const zypp::Edition & edition );
+
+ //
// Data members
+ //
- YQPkgObjList * _pkgObjList;
- ZyppSel _selectable;
- ZyppObj _zyppObj;
- bool _editable;
- bool _candidateIsNewer;
- bool _installedIsNewer;
+ YQPkgObjList * _pkgObjList;
+ ZyppSel _selectable;
+ ZyppObj _zyppObj;
+ bool _editable;
+ bool _candidateIsNewer;
+ bool _installedIsNewer;
};
+/**
+ * Do a solver run for all resolvables of one kind
+ * (zypp::Selection, zypp::Pattern, zypp::Langauge, zypp::Patch)
+ **/
+template<class ZyppKind_T> void solveResKind()
+{
+ zypp::Resolver_Ptr resolver = zypp::getZYpp()->resolver();
+
+ resolver->transactReset( zypp::ResStatus::SOLVER );
+ resolver->transactResKind( zypp::ResTraits::kind );
+}
+
#endif // ifndef YQPkgObjList_h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.44/src/include/YQPkgPatchList.h new/yast2-qt-2.13.45/src/include/YQPkgPatchList.h
--- old/yast2-qt-2.13.44/src/include/YQPkgPatchList.h 2006-03-23 17:45:56.000000000 +0100
+++ new/yast2-qt-2.13.45/src/include/YQPkgPatchList.h 2006-04-04 15:51:37.000000000 +0200
@@ -254,7 +254,15 @@
protected:
+ /**
+ * Propagate status changes in this list to other lists:
+ * Have the solver transact all patches.
+ *
+ * Reimplemented from YQPkgObjListItem.
+ **/
+ virtual void applyChanges();
+
// Data members
YQPkgPatchList * _patchList;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.44/src/include/YQPkgPatternList.h new/yast2-qt-2.13.45/src/include/YQPkgPatternList.h
--- old/yast2-qt-2.13.44/src/include/YQPkgPatternList.h 2006-03-15 18:56:57.000000000 +0100
+++ new/yast2-qt-2.13.45/src/include/YQPkgPatternList.h 2006-04-04 15:55:46.000000000 +0200
@@ -189,6 +189,14 @@
* Initialize things common to all constructors.
**/
void init();
+
+ /**
+ * Propagate status changes in this list to other lists:
+ * Have the solver transact all patterns.
+ *
+ * Reimplemented from YQPkgObjListItem.
+ **/
+ virtual void applyChanges();
// Data members
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.13.44/src/include/YQPkgSelList.h new/yast2-qt-2.13.45/src/include/YQPkgSelList.h
--- old/yast2-qt-2.13.44/src/include/YQPkgSelList.h 2006-03-15 18:49:43.000000000 +0100
+++ new/yast2-qt-2.13.45/src/include/YQPkgSelList.h 2006-04-04 15:47:49.000000000 +0200
@@ -158,6 +158,14 @@
protected:
+ /**
+ * Propagate status changes in this list to other lists:
+ * Have the solver transact all selections.
+ *
+ * Reimplemented from YQPkgObjListItem.
+ **/
+ virtual void applyChanges();
+
// Data members
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...