YaST Commits
Threads by month
- ----- 2024 -----
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
March 2011
- 16 participants
- 195 discussions
[yast-commit] r63660 - in /trunk/installation: VERSION package/yast2-installation.changes src/include/inst_inc_first.ycp
by jsuchome@svn2.opensuse.org 24 Mar '11
by jsuchome@svn2.opensuse.org 24 Mar '11
24 Mar '11
Author: jsuchome
Date: Thu Mar 24 16:16:27 2011
New Revision: 63660
URL: http://svn.opensuse.org/viewcvs/yast?rev=63660&view=rev
Log:
- do not start automatic configuration for autoYaST (bnc#679435)
- 2.21.0
Modified:
trunk/installation/VERSION
trunk/installation/package/yast2-installation.changes
trunk/installation/src/include/inst_inc_first.ycp
Modified: trunk/installation/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/VERSION?rev=63660&r…
==============================================================================
--- trunk/installation/VERSION (original)
+++ trunk/installation/VERSION Thu Mar 24 16:16:27 2011
@@ -1 +1 @@
-2.20.6
+2.21.0
Modified: trunk/installation/package/yast2-installation.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-insta…
==============================================================================
--- trunk/installation/package/yast2-installation.changes (original)
+++ trunk/installation/package/yast2-installation.changes Thu Mar 24 16:16:27 2011
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Mar 24 16:14:02 CET 2011 - jsuchome(a)suse.cz
+
+- do not start automatic configuration for autoYaST (bnc#679435)
+- 2.21.0
+
+-------------------------------------------------------------------
Mon Feb 28 14:52:26 CET 2011 - locilka(a)suse.cz
- Handling disabled installation steps also in Live Installation
Modified: trunk/installation/src/include/inst_inc_first.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/include/inst_in…
==============================================================================
--- trunk/installation/src/include/inst_inc_first.ycp (original)
+++ trunk/installation/src/include/inst_inc_first.ycp Thu Mar 24 16:16:27 2011
@@ -99,6 +99,13 @@
boolean enable_autoconfiguration = ProductFeatures::GetBooleanFeature ("globals", "enable_autoconfiguration");
boolean autoconfiguration_default = ProductFeatures::GetBooleanFeature ("globals", "autoconfiguration_default");
+ // bnc#679435: leave normal second stage for autoYaST
+ if (Mode::autoinst ())
+ {
+ enable_autoconfiguration = false;
+ autoconfiguration_default = false;
+ }
+
// Enabled only when AC is selected
InstData::enable_autoconfiguration = (enable_autoconfiguration == true);
// Default state
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r63659 - /branches/tmp/dmacvicar/zc10/packager/
by dmacvicar@svn2.opensuse.org 24 Mar '11
by dmacvicar@svn2.opensuse.org 24 Mar '11
24 Mar '11
Author: dmacvicar
Date: Thu Mar 24 15:57:52 2011
New Revision: 63659
URL: http://svn.opensuse.org/viewcvs/yast?rev=63659&view=rev
Log: (empty)
Added:
branches/tmp/dmacvicar/zc10/packager/ (props changed)
- copied from r63658, branches/SuSE-Code-11-SP1-Branch/packager/
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r63658 - in /branches/tmp/dmacvicar/zc10/qt/src: YQPkgUpdateProblemFilterView.cc YQPkgVersionsView.cc
by dmacvicar@svn2.opensuse.org 24 Mar '11
by dmacvicar@svn2.opensuse.org 24 Mar '11
24 Mar '11
Author: dmacvicar
Date: Thu Mar 24 14:58:35 2011
New Revision: 63658
URL: http://svn.opensuse.org/viewcvs/yast?rev=63658&view=rev
Log:
finally builds
Modified:
branches/tmp/dmacvicar/zc10/qt/src/YQPkgUpdateProblemFilterView.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPkgVersionsView.cc
Modified: branches/tmp/dmacvicar/zc10/qt/src/YQPkgUpdateProblemFilterView.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgUpdateProblemFilterView.cc (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgUpdateProblemFilterView.cc Thu Mar 24 14:58:35 2011
@@ -79,9 +79,9 @@
{
emit filterStart();
- list<zypp::PoolItem_Ref> problemList = zypp::getZYpp()->resolver()->problematicUpdateItems();
-
- for ( list<zypp::PoolItem_Ref>::const_iterator it = problemList.begin();
+ list<zypp::PoolItem> problemList = zypp::getZYpp()->resolver()->problematicUpdateItems();
+
+ for ( list<zypp::PoolItem>::const_iterator it = problemList.begin();
it != problemList.end();
++it )
{
@@ -95,11 +95,11 @@
{
y2milestone( "Problematic package: %s-%s",
pkg->name().c_str(), pkg->edition().asString().c_str() );
-
+
emit filterMatch( sel, pkg );
}
}
-
+
}
emit filterFinished();
Modified: branches/tmp/dmacvicar/zc10/qt/src/YQPkgVersionsView.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgVersionsView.cc (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgVersionsView.cc Thu Mar 24 14:58:35 2011
@@ -21,14 +21,14 @@
#define y2log_component "qt-pkg"
#include <YQZypp.h>
-#include <zypp/Source.h>
+#include <zypp/Repository.h>
#include <ycp/y2log.h>
#include <qtabwidget.h>
#include <qregexp.h>
#include <qheader.h>
#include "YQPkgVersionsView.h"
-#include "YQPkgInstSrcList.h"
+#include "YQPkgRepoList.h"
#include "YQIconPool.h"
#include "YQi18n.h"
#include "utf8.h"
@@ -204,7 +204,7 @@
}
}
- _selectable->set_status( status );
+ _selectable->setStatus( status );
// Set candidate
@@ -246,20 +246,21 @@
{
setOn( _zyppObj == _selectable->candidateObj() );
- if ( versionCol() >= 0 ) setText( versionCol(), zyppObj->edition().asString().c_str() );
- if ( archCol() >= 0 ) setText( archCol(), zyppObj->arch().asString().c_str() );
- if ( instSrcCol() >= 0 ) setText( instSrcCol(), zyppObj->source().alias().c_str() );
- if ( productCol() >= 0 )
- {
- ZyppProduct product = YQPkgInstSrcListItem::singleProduct( zyppObj->source() );
-
- if ( product )
- setText( productCol(), product->summary() );
- }
- if ( urlCol() >= 0 )
- {
- setText( urlCol(), zyppObj->source().url().asString().c_str() );
- }
+ // Translators: %1 is a package version, %2 the package architecture,
+ // %3 describes the repository where it comes from,
+ // %4 is the repository's priority
+ // %5 is the vendor of the package
+ // Examples:
+ // 2.5.23-i568 from Packman with priority 100 and vendor openSUSE
+ // 3.17.4-i386 from openSUSE-11.1 update repository with priority 20 and vendor openSUSE
+ // ^^^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^
+ // %1 %2 %3 %4 %5
+ setText( 0,_( "%1-%2 from %3 with priority %4 and vendor %5" )
+ .arg( fromUTF8( zyppObj->edition().asString().c_str() ) )
+ .arg( fromUTF8( zyppObj->arch().asString().c_str() ) )
+ .arg( fromUTF8( zyppObj->repository().info().name().c_str() ) )
+ .arg( zyppObj->repository().info().priority() )
+ .arg( fromUTF8( zyppObj->vendor().c_str() ) ) );
if ( _selectable->hasInstalledObj() )
{
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
24 Mar '11
Author: jsuchome
Date: Thu Mar 24 13:25:00 2011
New Revision: 63657
URL: http://svn.opensuse.org/viewcvs/yast?rev=63657&view=rev
Log:
Created tag stable-2_21_2 for snapper
Added:
tags/stable-2_21_2/snapper/
- copied from r63656, trunk/snapper/
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r63656 - in /trunk/snapper: VERSION agent-snapper/doc/Makefile.am agent-snapper/doc/snapper.html package/yast2-snapper.changes
by jsuchome@svn2.opensuse.org 24 Mar '11
by jsuchome@svn2.opensuse.org 24 Mar '11
24 Mar '11
Author: jsuchome
Date: Thu Mar 24 13:24:52 2011
New Revision: 63656
URL: http://svn.opensuse.org/viewcvs/yast?rev=63656&view=rev
Log:
- added agent documentation
- 2.21.2
Added:
trunk/snapper/agent-snapper/doc/snapper.html
Modified:
trunk/snapper/VERSION
trunk/snapper/agent-snapper/doc/Makefile.am
trunk/snapper/package/yast2-snapper.changes
Modified: trunk/snapper/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/snapper/VERSION?rev=63656&r1=636…
==============================================================================
--- trunk/snapper/VERSION (original)
+++ trunk/snapper/VERSION Thu Mar 24 13:24:52 2011
@@ -1 +1 @@
-2.21.1
+2.21.2
Modified: trunk/snapper/agent-snapper/doc/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/snapper/agent-snapper/doc/Makefi…
==============================================================================
--- trunk/snapper/agent-snapper/doc/Makefile.am (original)
+++ trunk/snapper/agent-snapper/doc/Makefile.am Thu Mar 24 13:24:52 2011
@@ -1 +1,7 @@
SUBDIRS = autodocs
+
+htmldir = $(docdir)
+
+html_DATA = snapper.html
+EXTRA_DIST = $(html_DATA)
+
Added: trunk/snapper/agent-snapper/doc/snapper.html
URL: http://svn.opensuse.org/viewcvs/yast/trunk/snapper/agent-snapper/doc/snappe…
==============================================================================
--- trunk/snapper/agent-snapper/doc/snapper.html (added)
+++ trunk/snapper/agent-snapper/doc/snapper.html Thu Mar 24 13:24:52 2011
@@ -0,0 +1,114 @@
+<html>
+<head>
+<title>Snapper agent description</title>
+</head>
+<body>
+<h1>Snapper agent description</h1>
+<hr>
+
+<h2>Purpose</h2>
+The Snapper agent (<tt>ag_snapper</tt>) is used to access API of <tt>libsnapper<tt> library from YaST
+(libsnapper is a library for managing btrfs filesystem snapshots).
+
+It is part of YaST2 SCR, the system configuration repository,
+used to access configuration data on the target system. The general
+SCR API allows <tt>Read()</tt> and <tt>Write()</tt> access to get and
+change data. However, snapper agent currently provides only Read calls.
+
+<p>
+<h2>Implementation</h2>
+It is simple wrapper for libsnapper C++ library. The library initialization routines are used to read list of current snapshots and their data.
+<p>
+Each snapshot is described in YCPMap. Snapshot is identified by number. The map also contains the snapshot type (`SINGLE, `PRE, `POST) and the date of snapshot creation. SINGLE and PRE types of snapshot have the description string. The snapshot of PRE type contains number of relevant POST snapshot and vice versa.
+
+<P>
+<i><b>Note:</b> The complete development documentation is available in the
+<a href="autodocs/index.html"><tt>autodocs/</tt></a> directory.</i>
+
+<P>
+<h2>Interface for snapper-agent</h2>
+The interface is implemented as a SCR agent with the usual <tt>Read()</tt>,
+<tt>Write()</tt> and <tt>Dir()</tt> interface. The path prefix used is
+
+<ul><tt>.snapper</tt></ul>
+
+<P>
+<h2>Complete Read paths table</h2>
+
+<table border=3>
+ <tr>
+ <th width="20%" align="left">Path</th>
+ <th width="10%" align="left">Argument</th>
+ <th width="10%" align="left">Type of Result</th>
+ <th align="left">Result</th>
+ </tr>
+
+ <tr><td><tt>.snapper.snapshots</td><td></td><td align="left">YCPList</td>
+ <td>Return list of current snapshot maps.<br>
+ <b>Example of result</b>:
+ <pre>
+ [
+ $[
+ "date" : 1297364138,
+ "description" : "before yast2-users",
+ "name" : "1",
+ "num" : 1,
+ "post_num" : 2,
+ "type" : `PRE
+ ],
+ $[
+ "date" : 1297364204,
+ "name" : "2",
+ "num" : 2,
+ "pre_num" : 1,
+ "type" : `POST
+ ],
+ $[
+ "date" : 1297758106,
+ "description" : "Tuesday",
+ "name" : "3",
+ "num" : 3,
+ "type" : `SINGLE
+ ]
+ ]
+ </pre>
+ </td>
+ </tr>
+
+ <tr><td><tt>.snapper.diff</td><td>YCPMap</td><td align="left">YCPList</td>
+ <td>Returns the list of files modified between given snapshots.
+ Each file is described by YCPMap which contains file path and type of the change.
+ Argument map contains 2 integers, identifying the snapshots.<br>
+ <b>Example of argument map</b>:
+ <pre>
+ $[
+ "from" : 1,
+ "to" : 2
+ $]
+ </pre>
+ <b>Example of result</b>:
+ <pre>
+ [
+ $[
+ "changes" : "c...",
+ "name" : "/etc/group"
+ ],
+ $[
+ "changes" : "c...",
+ "name" : "/etc/group.YaST2save"
+ ]
+ ]
+ </pre>
+ </td></tr>
+</table>
+
+<P>
+
+<P>
+<address>
+Jiri Suchomel <jsuchome(a)suse.cz>
+</address>
+
+
+</body>
+</html>
Modified: trunk/snapper/package/yast2-snapper.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/snapper/package/yast2-snapper.ch…
==============================================================================
--- trunk/snapper/package/yast2-snapper.changes (original)
+++ trunk/snapper/package/yast2-snapper.changes Thu Mar 24 13:24:52 2011
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Mar 24 13:21:37 CET 2011 - jsuchome(a)suse.cz
+
+- added agent documentation
+- 2.21.2
+
+-------------------------------------------------------------------
Wed Mar 23 11:48:04 CET 2011 - jsuchome(a)suse.cz
- license update
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r63655 - in /branches/tmp/dmacvicar/zc10/qt/src: ./ include/
by dmacvicar@svn2.opensuse.org 24 Mar '11
by dmacvicar@svn2.opensuse.org 24 Mar '11
24 Mar '11
Author: dmacvicar
Date: Thu Mar 24 12:36:13 2011
New Revision: 63655
URL: http://svn.opensuse.org/viewcvs/yast?rev=63655&view=rev
Log:
more backporting of ZYpp API changes
Modified:
branches/tmp/dmacvicar/zc10/qt/src/YQPkgLangList.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPkgList.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPkgObjList.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPkgPatchFilterView.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPkgPatchList.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPkgPatternList.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPkgSearchFilterView.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPkgSelDescriptionView.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPkgTechnicalDetailsView.cc
branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgLangList.h
branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgObjList.h
branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgSearchFilterView.h
Modified: branches/tmp/dmacvicar/zc10/qt/src/YQPkgLangList.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgLangList.cc (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgLangList.cc Thu Mar 24 12:36:13 2011
@@ -19,11 +19,11 @@
/-*/
-#define YUILogComponent "qt-pkg"
-#include "YUILog.h"
+#define y2log_component "qt-pkg"
+#include "ycp/y2log.h"
#include <qregexp.h>
-#include <QHeaderView>
+//#include <QHeaderView>
#include "YQi18n.h"
#include "utf8.h"
#include "YQPkgLangList.h"
@@ -37,38 +37,23 @@
: YQPkgObjList( parent )
#warning "base class works with zypp::Resolvable, but zypp::Locale isn't one any longer!"
{
- yuiDebug() << "Creating language list" << endl;
+ y2debug("Creating language list");
int numCol = 0;
- QStringList headers;
- headers << ""; _statusCol = numCol++;
-
+ addColumn(""); _statusCol = numCol++;
// Translators: Table column heading for language ISO code like "de_DE", "en_US"
// Please keep this short to avoid stretching the column too wide!
- headers << _( "Code" ); _nameCol = numCol++;
+ addColumn(_("Code")); _nameCol = numCol++;
+ addColumn(_("Language")); _summaryCol = numCol++;
- // Full (human readable) language / country name like "German (Austria)"
- headers << _( "Language"); _summaryCol = numCol++;
setAllColumnsShowFocus( true );
- setHeaderLabels(headers);
- header()->setResizeMode( _nameCol, QHeaderView::ResizeToContents );
- header()->setResizeMode( _summaryCol, QHeaderView::Stretch );
-
-
- setSortingEnabled( true );
- header()->setSortIndicatorShown( true );
- header()->setClickable( true );
-
- sortByColumn( nameCol(), Qt::AscendingOrder );
- connect( this, SIGNAL( currentItemChanged ( QListViewItem *, QListViewItem * ) ),
+ connect( this, SIGNAL( selectionChanged ( QListViewItem * ) ),
this, SLOT ( filter() ) );
fillList();
selectSomething();
- resizeColumnToContents(_statusCol);
-
- yuiDebug() << "Creating language list done" << endl;
+ y2debug("Creating language list done");
}
@@ -82,7 +67,7 @@
YQPkgLangList::fillList()
{
clear();
- yuiDebug() << "Filling language list" << endl;
+ y2debug("Filling language list");
zypp::LocaleSet locales = zypp::getZYpp()->pool().getAvailableLocales();
@@ -93,7 +78,7 @@
addLangItem( *it );
}
- yuiDebug() << "Language list filled" << endl;
+ y2debug("Language list filled");
}
@@ -119,22 +104,22 @@
zypp::sat::LocaleSupport myLocale( lang );
for_( it, myLocale.selectableBegin(), myLocale.selectableEnd() )
- {
+ {
ZyppPkg zyppPkg = tryCastToZyppPkg( (*it)->theObj() );
if ( zyppPkg )
{
if ( (*it)->installedSize() > 0 )
++installed;
++total;
-
+
emit filterMatch( *it, zyppPkg );
}
}
//selection()->setInstalledPackages(installed);
//selection()->setTotalPackages(total);
-
+
//selection()->setText( _summaryCol, QString().sprintf("%s (%d/%d)", zyppPattern->summary().c_str(), installed, total));
-
+
}
emit filterFinished();
}
@@ -149,7 +134,7 @@
YQPkgLangListItem *
YQPkgLangList::selection() const
{
- QTreeWidgetItem * item = currentItem();
+ QListViewItem * item = selectedItem();
if ( ! item )
return 0;
@@ -157,29 +142,6 @@
return dynamic_cast<YQPkgLangListItem *> (item);
}
-
-void
-YQPkgLangList::updateActions( YQPkgObjListItem * item)
-{
-#if 0
- YQPkgLangListItem *litem;
- if ( !item)
- litem = dynamic_cast<YQPkgLangListItem *> ( currentItem() );
- else
- litem = dynamic_cast<YQPkgLangListItem *> ( item );
-#endif
-
- actionSetCurrentInstall->setEnabled( true );
- actionSetCurrentDontInstall->setEnabled( true );
- actionSetCurrentTaboo->setEnabled( true );
- actionSetCurrentProtected->setEnabled( false );
-
- actionSetCurrentKeepInstalled->setEnabled( false );
- actionSetCurrentDelete->setEnabled( false );
- actionSetCurrentUpdate->setEnabled( false );
-}
-
-
YQPkgLangListItem::YQPkgLangListItem( YQPkgLangList * langList,
const zypp::Locale & lang )
: YQPkgObjListItem( langList )
@@ -233,7 +195,7 @@
YQPkgLangListItem::setStatus( ZyppStatus newStatus, bool sendSignals )
{
ZyppStatus oldStatus = status();
-
+
switch ( newStatus )
{
case S_Install:
@@ -289,23 +251,4 @@
_pkgObjList->sendStatusChanged();
}
-bool YQPkgLangListItem::operator<( const QTreeWidgetItem & otherListViewItem ) const
-{
- const YQPkgLangListItem * other = dynamic_cast<const YQPkgLangListItem *> (&otherListViewItem);
- int col = treeWidget()->sortColumn();
-
- if ( other )
- {
- if ( col == nameCol() )
- {
- return ( strcoll( this->zyppLang().code().c_str(), other->zyppLang().code().c_str() ) < 0 );
- }
- if ( col == summaryCol() )
- {
- return ( strcoll( this->zyppLang().name().c_str(), other->zyppLang().name().c_str() ) < 0 );
- }
- }
-
- return QY2ListViewItem::operator<( otherListViewItem );
-}
#include "YQPkgLangList.moc"
Modified: branches/tmp/dmacvicar/zc10/qt/src/YQPkgList.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgList.cc (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgList.cc Thu Mar 24 12:36:13 2011
@@ -497,7 +497,7 @@
if ( doChange )
{
if ( ! countOnly )
- selectable->set_status( newStatus );
+ selectable->setStatus( newStatus );
changedCount++;
// y2milestone( "Updating %s", selectable->name().c_str() );
Modified: branches/tmp/dmacvicar/zc10/qt/src/YQPkgObjList.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgObjList.cc (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgObjList.cc Thu Mar 24 12:36:13 2011
@@ -717,6 +717,14 @@
init();
}
+YQPkgObjListItem::YQPkgObjListItem( YQPkgObjList * pkgObjList )
+ : QY2ListViewItem( pkgObjList )
+ , _pkgObjList( pkgObjList )
+ , _selectable( 0 )
+ , _zyppObj( 0 )
+ , _editable( true )
+{
+}
YQPkgObjListItem::~YQPkgObjListItem()
{
@@ -751,7 +759,7 @@
if ( sizeCol() >= 0 )
{
- zypp::ByteCount size = zyppObj()->size();
+ zypp::ByteCount size = zyppObj()->installSize();
if ( size > 0L )
setText( sizeCol(), size.asString() + " " );
@@ -829,7 +837,7 @@
YQPkgObjListItem::setStatus( ZyppStatus newStatus, bool sendSignals )
{
ZyppStatus oldStatus = selectable()->status();
- selectable()->set_status( newStatus );
+ selectable()->setStatus( newStatus );
if ( oldStatus != selectable()->status() )
{
@@ -849,16 +857,7 @@
void
YQPkgObjListItem::solveResolvableCollections()
{
- zypp::Resolver_Ptr resolver = zypp::getZYpp()->resolver();
-
- resolver->transactReset( zypp::ResStatus::APPL_LOW );
-
- resolver->transactResKind( zypp::ResTraits<zypp::Product >::kind );
- resolver->transactResKind( zypp::ResTraits<zypp::Selection>::kind );
- resolver->transactResKind( zypp::ResTraits<zypp::Pattern >::kind );
- resolver->transactResKind( zypp::ResTraits<zypp::Language >::kind );
- resolver->transactResKind( zypp::ResTraits<zypp::Patch >::kind );
- resolver->transactResKind( zypp::ResTraits<zypp::Atom >::kind );
+ zypp::getZYpp()->resolver()->resolvePool();
}
@@ -924,7 +923,7 @@
if ( _selectable->hasInstalledObj() )
return false;
- return _selectable->candidatePoolItem().status().isSatisfied();
+ return _selectable->candidateObj().isSatisfied();
}
@@ -941,7 +940,7 @@
case S_KeepInstalled:
case S_Protected:
- return _selectable->installedPoolItem().status().isIncomplete();
+ return _selectable->installedObj().isBroken();
case S_Update: // will be fixed by updating
case S_AutoUpdate:
@@ -1128,7 +1127,7 @@
y2warning( "User rejected license agreement for %s - setting to TABOO",
sel->name().c_str() );
- sel->set_status( S_Taboo );
+ sel->setStatus( S_Taboo );
break;
@@ -1138,7 +1137,7 @@
y2warning( "User rejected license agreement for %s - setting to PROTECTED",
sel->name().c_str() );
- sel->set_status( S_Protected );
+ sel->setStatus( S_Protected );
// S_Keep wouldn't be good enough: The next solver run might
// set it to S_AutoUpdate again
break;
@@ -1221,8 +1220,8 @@
{
// Numeric sort by size
- if ( this->zyppObj()->size() < other->zyppObj()->size() ) return -1;
- if ( this->zyppObj()->size() > other->zyppObj()->size() ) return 1;
+ if ( this->zyppObj()->installSize() < other->zyppObj()->installSize() ) return -1;
+ if ( this->zyppObj()->installSize() > other->zyppObj()->installSize() ) return 1;
return 0;
}
else if ( col == statusCol() )
Modified: branches/tmp/dmacvicar/zc10/qt/src/YQPkgPatchFilterView.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgPatchFilterView.cc (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgPatchFilterView.cc Thu Mar 24 12:36:13 2011
@@ -29,20 +29,18 @@
#include <qdatetime.h>
#include <y2util/FSize.h>
-#include <zypp/ui/PatchContents.h>
#include "YQPkgPatchFilterView.h"
#include "YQPkgPatchList.h"
#include "YQPkgDescriptionView.h"
-#include "YQPkgSelList.h"
#include "QY2LayoutUtils.h"
#include "YQi18n.h"
-typedef zypp::ui::PatchContents ZyppPatchContents;
-typedef zypp::ui::PatchContents::const_iterator ZyppPatchContentsIterator;
-
using std::set;
+typedef zypp::Patch::Contents ZyppPatchContents;
+typedef zypp::Patch::Contents::const_iterator ZyppPatchContentsIterator;
+
#define ENABLE_TOTAL_DOWNLOAD_SIZE 0
#define SPACING 6 // between subwidgets
@@ -131,56 +129,56 @@
void
YQPkgPatchFilterView::updateTotalDownloadSize()
{
- set<ZyppSel> selectablesToInstall;
- QTime calcTime;
- calcTime.start();
-
- for ( ZyppPoolIterator patches_it = zyppPatchesBegin();
- patches_it != zyppPatchesEnd();
- ++patches_it )
+ set<ZyppSel> selectablesToInstall;
+ QTime calcTime;
+ calcTime.start();
+
+ for ( ZyppPoolIterator patches_it = zyppPatchesBegin();
+ patches_it != zyppPatchesEnd();
+ ++patches_it )
{
- ZyppPatch patch = tryCastToZyppPatch( (*patches_it)->theObj() );
+ ZyppPatch patch = tryCastToZyppPatch( (*patches_it)->theObj() );
- if ( patch )
+ if ( patch )
{
- ZyppPatchContents patchContents( patch );
+ ZyppPatchContents patchContents( patch->contents() );
- for ( ZyppPatchContentsIterator contents_it = patchContents.begin();
- contents_it != patchContents.end();
- ++contents_it )
+ for ( ZyppPatchContentsIterator contents_it = patchContents.begin();
+ contents_it != patchContents.end();
+ ++contents_it )
{
- ZyppPkg pkg = tryCastToZyppPkg( *contents_it );
- ZyppSel sel;
+ ZyppPkg pkg = zypp::make<zypp::Package>(*contents_it);
+ ZyppSel sel;
- if ( pkg )
- sel = _selMapper.findZyppSel( pkg );
+ if ( pkg )
+ sel = _selMapper.findZyppSel( pkg );
- if ( sel )
+ if ( sel )
{
- switch ( sel->status() )
+ switch ( sel->status() )
{
- case S_Install:
- case S_AutoInstall:
- case S_Update:
- case S_AutoUpdate:
- // Insert the patch contents selectables into a set,
- // don't immediately sum up their sizes: The same
- // package could be in more than one patch, but of
- // course it will be downloaded only once.
-
- selectablesToInstall.insert( sel );
- break;
-
- case S_Del:
- case S_AutoDel:
- case S_NoInst:
- case S_KeepInstalled:
- case S_Taboo:
- case S_Protected:
- break;
+ case S_Install:
+ case S_AutoInstall:
+ case S_Update:
+ case S_AutoUpdate:
+ // Insert the patch contents selectables into a set,
+ // don't immediately sum up their sizes: The same
+ // package could be in more than one patch, but of
+ // course it will be downloaded only once.
+
+ selectablesToInstall.insert( sel );
+ break;
+
+ case S_Del:
+ case S_AutoDel:
+ case S_NoInst:
+ case S_KeepInstalled:
+ case S_Taboo:
+ case S_Protected:
+ break;
- // intentionally omitting 'default' branch so the compiler can
- // catch unhandled enum states
+ // intentionally omitting 'default' branch so the compiler can
+ // catch unhandled enum states
}
}
@@ -189,20 +187,19 @@
}
- FSize totalSize = 0;
+ FSize totalSize = 0;
- for ( set<ZyppSel>::iterator it = selectablesToInstall.begin();
- it != selectablesToInstall.end();
- ++it )
+ for ( set<ZyppSel>::iterator it = selectablesToInstall.begin();
+ it != selectablesToInstall.end();
+ ++it )
{
- if ( (*it)->candidateObj() )
- totalSize += (*it)->candidateObj()->size();
+ if ( (*it)->candidateObj() )
+ totalSize += (*it)->candidateObj()->installSize();
}
#if ENABLE_TOTAL_DOWNLOAD_SIZE
- _totalDownloadSize->setText( totalSize.asString().c_str() );
+ _totalDownloadSize->setText( totalSize.asString().c_str() );
#endif
-
y2debug( "Calculated total download size in %d millisec", calcTime.elapsed() );
}
Modified: branches/tmp/dmacvicar/zc10/qt/src/YQPkgPatchList.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgPatchList.cc (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgPatchList.cc Thu Mar 24 12:36:13 2011
@@ -24,7 +24,7 @@
#include <qpopupmenu.h>
#include <qaction.h>
-#include <zypp/ui/PatchContents.h>
+#include <zypp/Patch.h>
#include <set>
#include "YQi18n.h"
@@ -36,14 +36,9 @@
#define VERBOSE_PATCH_LIST 1
-
-typedef zypp::ui::PatchContents ZyppPatchContents;
-typedef zypp::ui::PatchContents::const_iterator ZyppPatchContentsIterator;
-
using std::list;
using std::set;
-
YQPkgPatchList::YQPkgPatchList( QWidget * parent )
: YQPkgObjList( parent )
{
@@ -102,144 +97,90 @@
_filterCriteria = filterCriteria;
}
-
void
YQPkgPatchList::fillList()
{
- clear();
- y2debug( "Filling patch list" );
-
- for ( ZyppPoolIterator it = zyppPatchesBegin();
- it != zyppPatchesEnd();
- ++it )
- {
- ZyppSel selectable = *it;
- ZyppPatch zyppPatch = tryCastToZyppPatch( selectable->theObj() );
-
- if ( zyppPatch )
- {
- bool displayPatch = false;
-
- switch ( _filterCriteria )
- {
- case RelevantPatches: // needed + broken + satisfied (but not installed)
+ // wee need to do a full solve in order
+ // to get the satisfied status correctly
+
+ clear();
+ y2debug("Filling patch list");
- if ( selectable->hasInstalledObj() ) // installed?
- {
- if ( selectable->installedPoolItem().status().isIncomplete() ) // patch broken?
- {
- // The patch is broken: It had been installed, but the user somehow
- // downgraded individual packages belonging to the patch to older versions.
-
- displayPatch = true;
-
- y2warning( "Installed patch is broken: %s - %s",
- zyppPatch->name().c_str(),
- zyppPatch->summary().c_str() );
- }
- }
- else // not installed
- {
- if ( selectable->hasCandidateObj() &&
- selectable->candidatePoolItem().status().isSatisfied() )
- {
- // This is a pretty exotic case, but still it might happen:
- //
- // The patch itelf is not installed, but it is satisfied because the
- // user updated all the packages belonging to the patch to the versions
- // the patch requires. All that is missing now is to get the patch meta
- // data onto the system. So let's display the patch to give the user
- // a chance to install it (if he so chooses).
-
- displayPatch = true;
-
- y2milestone( "Patch satisfied, but not installed yet: %s - %s",
- zyppPatch->name().c_str(),
- zyppPatch->summary().c_str() );
- }
- }
-
- if ( selectable->hasCandidateObj() ) // candidate available?
- {
- // The most common case: There is a candidate patch, i.e. one that could be
- // installed, but either no version of that patch is installed or there is a
- // newer one to which the patch could be updated.
-
- if ( selectable->candidatePoolItem().status().isNeeded() ) // patch really needed?
- {
- // Patches are needed if any of the packages that belong to the patch
- // are installed on the system.
-
- displayPatch = true;
- }
- else
- {
- // None of the packages that belong to the patch is installed on the system.
-
- y2debug( "Patch not needed: %s - %s",
- zyppPatch->name().c_str(),
- zyppPatch->summary().c_str() );
- }
- }
- break;
-
-
- case RelevantAndInstalledPatches: // needed + broken + installed
-
- if ( selectable->hasInstalledObj() ) // installed?
- {
- displayPatch = true;
- }
- else // not installed - display only if needed
- {
- zypp::ResStatus candidateStatus = selectable->candidatePoolItem().status();
-
- if ( candidateStatus.isNeeded() ||
- candidateStatus.isSatisfied() )
- {
- displayPatch = true;
- }
- else
- {
- y2milestone( "Patch not needed: %s - %s",
- zyppPatch->name().c_str(),
- zyppPatch->summary().c_str() );
- }
- }
- break;
+ for ( ZyppPoolIterator it = zyppPatchesBegin();
+ it != zyppPatchesEnd();
+ ++it )
+ {
+ ZyppSel selectable = *it;
+ ZyppPatch zyppPatch = tryCastToZyppPatch( selectable->theObj() );
- case AllPatches:
+ if ( zyppPatch )
+ {
+ bool displayPatch = false;
+
+ switch ( _filterCriteria )
+ {
+ case RelevantPatches:// needed + broken + satisfied (but not installed)
+
+ // only shows patches relevant to the system
+ if ( selectable->hasCandidateObj() &&
+ selectable->candidateObj().isRelevant() )
+ {
+ // and only those that are needed
+ if ( ! selectable->candidateObj().isSatisfied() ||
+ // may be it is satisfied because is preselected
+ selectable->candidateObj().status().isToBeInstalled() )
displayPatch = true;
- break;
-
- // Intentionally omitting "default" so the compiler
- // can catch unhandled enum values
- }
-
- if ( displayPatch )
- {
+ else
+ y2debug( "Patch %s is already satisfied", zyppPatch->ident().c_str());
+ }
+ else
+ y2debug( "Patch %s is not relevant to the system", zyppPatch->ident().c_str());
+ break;
+ case RelevantAndInstalledPatches:// patches we dont need
+
+ // only shows patches relevant to the system
+ if ( ( selectable->hasCandidateObj() ) &&
+ ( ! selectable->candidateObj().isRelevant()
+ || ( selectable->candidateObj().isSatisfied() &&
+ ! selectable->candidateObj().status().isToBeInstalled() ) ) )
+ {
+ // now we show satisfied patches too
+ displayPatch = true;
+ }
+ break;
+ case AllPatches:
+ displayPatch = true;
+ break;
+
+ // Intentionally omitting "default" so the compiler
+ // can catch unhandled enum values
+ default:
+ y2debug("unknown patch filter");
+
+ }
+
+ if ( displayPatch )
+ {
#if VERBOSE_PATCH_LIST
y2debug( "Displaying patch %s - %s", zyppPatch->name().c_str(), zyppPatch->summary().c_str() );
#endif
- addPatchItem( *it, zyppPatch);
- }
- }
- else
- {
- y2error( "Found non-patch selectable" );
- }
- }
-
-
- if ( ! firstChild() )
- message( _( "No patches available." ) );
- y2debug( "patch list filled" );
+ addPatchItem( *it, zyppPatch);
+ }
+ }
+ else
+ {
+ y2error("Found non-patch selectable");
+ }
+ }
+
+ y2debug("Patch list filled");
+ //resizeColumnToContents(_statusCol);
+ //resizeColumnToContents(_nameCol);
+ //resizeColumnToContents(_categoryCol);
}
-
-
void
YQPkgPatchList::message( const QString & text )
{
@@ -263,75 +204,40 @@
void
YQPkgPatchList::filter()
{
- emit filterStart();
- std::set<ZyppSel> patchSelectables;
+ emit filterStart();
- if ( selection() )
+ if ( selection() )
{
- ZyppPatch patch = selection()->zyppPatch();
-
- if ( patch )
- {
- ZyppPatchContents patchContents( patch );
-
- for ( ZyppPatchContentsIterator it = patchContents.begin();
- it != patchContents.end();
- ++it )
- {
- ZyppPkg pkg = tryCastToZyppPkg( *it );
+ ZyppPatch patch = selection()->zyppPatch();
- if ( pkg )
- {
- y2debug( "Found patch pkg: %s arch: %s", (*it)->name().c_str(), (*it)->arch().asString().c_str() );
-
- ZyppSel sel = _selMapper.findZyppSel( pkg );
-
- if ( sel )
- {
- if ( contains( patchSelectables, sel ) )
- {
- y2milestone( "Suppressing duplicate selectable %s-%s arch: %s",
- (*it)->name().c_str(),
- (*it)->edition().asString().c_str(),
- (*it)->arch().asString().c_str() );
- }
- else
- {
- patchSelectables.insert( sel );
- emit filterMatch( sel, pkg );
- }
- }
- else
- y2error( "No selectable for pkg %s", (*it)->name().c_str() );
- }
- else // No ZyppPkg - some other kind of object (script, message)
- {
- if ( zypp::isKind<zypp::Script> ( *it ) )
- {
- y2debug( "Found patch script %s", (*it)->name().c_str() );
- emit filterMatch( _( "Script" ), fromUTF8( (*it)->name() ), -1 );
- }
- else if ( zypp::isKind<zypp::Message> ( *it ) )
- {
- y2debug( "Found patch message %s (ignoring)", (*it)->name().c_str() );
- }
- else
- {
- y2error( "Found unknown object of kind %s in patch: %s-%s arch: %s",
- (*it)->kind().asString().c_str(),
- (*it)->name().c_str(),
- (*it)->edition().asString().c_str(),
- (*it)->arch().asString().c_str() );
- }
- }
- }
- }
+ if ( patch )
+ {
+ zypp::Patch::Contents contents(patch->contents());
+ //y2milestone(contents.asString().c_str());
+
+ for ( zypp::Patch::Contents::Selectable_iterator it = contents.selectableBegin();
+ it != contents.selectableEnd();
+ ++it )
+ {
+ ZyppPkg zyppPkg = tryCastToZyppPkg( (*it)->theObj() );
+ if ( zyppPkg )
+ {
+ emit filterMatch( *it, zyppPkg );
+ }
+ }
+ }
+ else
+ {
+ y2milestone("patch is bogus");
+ }
+
}
+ else
+ y2warning("selection empty");
- emit filterFinished();
+ emit filterFinished();
}
-
void
YQPkgPatchList::addPatchItem( ZyppSel selectable,
ZyppPatch zyppPatch )
@@ -555,7 +461,7 @@
if ( ! text.isEmpty() )
text += "\n";
- text += fromUTF8( zyppPatch()->size().asString().c_str() );
+ text += fromUTF8( zyppPatch()->downloadSize().asString().c_str() );
}
}
Modified: branches/tmp/dmacvicar/zc10/qt/src/YQPkgPatternList.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgPatternList.cc (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgPatternList.cc Thu Mar 24 12:36:13 2011
@@ -28,7 +28,6 @@
#include <zypp/Resolver.h>
#include <qpainter.h>
#include <qheader.h>
-#include <zypp/ui/PatternContents.h>
#include "YQi18n.h"
#include "utf8.h"
@@ -152,44 +151,45 @@
filter();
}
-
void
YQPkgPatternList::filter()
{
- emit filterStart();
+ emit filterStart();
- if ( selection() ) // The seleted QListViewItem
+ if ( selection() )// The seleted QListViewItem
{
- ZyppPattern zyppPattern = selection()->zyppPattern();
+ ZyppPattern zyppPattern = selection()->zyppPattern();
- if ( zyppPattern )
- {
- zypp::ui::PatternContents patternContents( zyppPattern );
- set<string> wanted = patternContents.install_packages();
-
- for ( ZyppPoolIterator it = zyppPkgBegin();
- it != zyppPkgEnd();
- ++it )
- {
- string name = (*it)->theObj()->name();
-
- if ( contains( wanted, name ) )
- {
- ZyppPkg zyppPkg = tryCastToZyppPkg( (*it)->theObj() );
-
- if ( zyppPkg )
- {
- emit filterMatch( *it, zyppPkg );
- }
- }
- }
- }
+ if ( zyppPattern )
+ {
+ int total = 0;
+ int installed = 0;
+
+ zypp::Pattern::Contents c(zyppPattern->contents());
+ for ( zypp::Pattern::Contents::Selectable_iterator it = c.selectableBegin();
+ it != c.selectableEnd();
+ ++it )
+ {
+ ZyppPkg zyppPkg = tryCastToZyppPkg( (*it)->theObj() );
+ if ( zyppPkg )
+ {
+ if ( (*it)->installedSize() > 0 )
+ ++installed;
+ ++total;
+
+ emit filterMatch( *it, zyppPkg );
+ }
+ }
+ //selection()->setInstalledPackages(installed);
+ //selection()->setTotalPackages(total);
+ //selection()->resetToolTip();
+ }
}
- emit filterFinished();
+ emit filterFinished();
+ //resizeColumnToContents(_howmanyCol);
}
-
void
YQPkgPatternList::addPatternItem( ZyppSel selectable,
ZyppPattern zyppPattern )
Modified: branches/tmp/dmacvicar/zc10/qt/src/YQPkgSearchFilterView.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgSearchFilterView.cc (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgSearchFilterView.cc Thu Mar 24 12:36:13 2011
@@ -28,6 +28,10 @@
#include <qvgroupbox.h>
#include <qprogressdialog.h>
#include <qdatetime.h>
+#include <qmessagebox.h>
+#include <qcursor.h>
+
+#include <zypp/PoolQuery.h>
#define y2log_component "qt-pkg"
#include <ycp/y2log.h>
@@ -93,6 +97,7 @@
_searchInName = new QCheckBox( _( "&Name" ), gbox ); CHECK_PTR( _searchInName );
_searchInSummary = new QCheckBox( _( "Su&mmary" ), gbox ); CHECK_PTR( _searchInSummary );
_searchInDescription = new QCheckBox( _( "Descr&iption" ), gbox ); CHECK_PTR( _searchInDescription );
+ _searchInKeywords = new QCheckBox( _( "&Keywords" ), gbox ); CHECK_PTR( _searchInKeywords );
addVStretch( gbox );
@@ -100,6 +105,8 @@
_searchInProvides = new QCheckBox( "RPM \"&Provides\"" , gbox ); CHECK_PTR( _searchInProvides );
_searchInRequires = new QCheckBox( "RPM \"Re&quires\"" , gbox ); CHECK_PTR( _searchInRequires );
+ _searchInFileList = new QCheckBox( _( "File list"), gbox ); CHECK_PTR( _searchInFileList );
+
_searchInName->setChecked( true );
_searchInSummary->setChecked( true );
@@ -187,81 +194,147 @@
filter();
}
-
void
YQPkgSearchFilterView::filter()
{
- emit filterStart();
- _matchCount = 0;
-
- if ( ! _searchText->currentText().isEmpty() )
- {
- // Create a progress dialog that is only displayed if the search takes
- // longer than a couple of seconds ( default: 4 ).
-
- QProgressDialog progress( _( "Searching..." ), // text
- _( "&Cancel" ), // cancelButtonLabel
-#ifdef FIXME
- Y2PM::packageManager().size(), // totalSteps
-#else
- 1000,
-#endif
- this, 0, // parent, name
- true ); // modal
- progress.setCaption( "" );
- progress.setMinimumDuration( 2000 ); // millisec
- QTime timer;
-
- QRegExp regexp = _searchText->currentText();
- regexp.setCaseSensitive( _caseSensitive->isChecked() );
- regexp.setWildcard( _searchMode->currentItem() == UseWildcards );
-
- timer.start();
-
-
- int count = 0;
-
- for ( ZyppPoolIterator it = zyppPkgBegin();
- it != zyppPkgEnd();
- ++it )
- {
- ZyppSel selectable = *it;
-
- bool match =
- check( selectable, selectable->candidateObj(), regexp ) ||
- check( selectable, selectable->installedObj(), regexp );
-
- // If there is neither an installed nor a candidate package, check
- // any other instance.
-
- if ( ! match &&
- ! selectable->candidateObj() &&
- ! selectable->installedObj() )
- check( selectable, selectable->theObj(), regexp );
+ emit filterStart();
+ _matchCount = 0;
-
- progress.setProgress( count++ );
-
- if ( timer.elapsed() > 300 ) // milisec
- {
- // Process events only every 300 milliseconds - this is very
- // expensive since both the progress dialog and the package
- // list change all the time, thus display updates are necessary
- // each time.
-
- qApp->processEvents();
- timer.restart();
- }
- }
-
- if ( _matchCount == 0 )
- emit message( _( "No Results." ) );
- }
+ try
+ {
+ if ( ! _searchText->currentText().isEmpty() )
+ {
+ // Create a progress dialog that is only displayed if the search takes
+ // longer than a couple of seconds ( default: 4 ).
+
+
+ zypp::PoolQuery query;
+ query.addKind(zypp::ResKind::package);
+
+ string searchtext = _searchText->currentText().ascii();
+
+ QProgressDialog progress( _( "Searching..." ),// text
+ _( "&Cancel" ),// cancelButtonLabel
+ 1000,
+ this// parent
+ );
+ //progress.setWindowTitle( "" );
+ progress.setMinimumDuration( 1500 ); // millisec
+
+ // HACK, this should go to YQPackageSelector
+ parentWidget()->parentWidget()->setCursor(QCursor(Qt::WaitCursor));
+ progress.setCursor(QCursor(Qt::ArrowCursor));
+
+ QTime timer;
+ query.setCaseSensitive( _caseSensitive->isChecked() );
+
+ switch ( _searchMode->currentItem() )
+ {
+ case Contains:
+ query.setMatchSubstring();
+ break;
+ case BeginsWith:
+ query.setMatchRegex();
+ searchtext = "^" + searchtext;
+ break;
+ case ExactMatch:
+ query.setMatchExact();
+ break;
+ case UseWildcards:
+ query.setMatchGlob();
+ break;
+ case UseRegExp:
+ query.setMatchRegex();
+ break;
+
+ // Intentionally omitting "default" branch - let gcc watch for unhandled enums
+ }
+
+ query.addString( searchtext );
+
+ if ( _searchInName->isChecked() )query.addAttribute( zypp::sat::SolvAttr::name );
+ if ( _searchInDescription->isChecked() )query.addAttribute( zypp::sat::SolvAttr::description );
+ if ( _searchInSummary->isChecked() )query.addAttribute( zypp::sat::SolvAttr::summary );
+ if ( _searchInRequires->isChecked() )query.addAttribute( zypp::sat::SolvAttr("solvable:requires") );
+ if ( _searchInProvides->isChecked() )query.addAttribute( zypp::sat::SolvAttr("solvable:provides") );
+ if ( _searchInFileList->isChecked() ) query.addAttribute( zypp::sat::SolvAttr::filelist );
+ if ( _searchInKeywords->isChecked() ) query.addAttribute( zypp::sat::SolvAttr::keywords );
+
+ _searchText->setEnabled(false);
+ _searchButton->setEnabled(false);
+
+ timer.start();
+
+ int count = 0;
+
+ for ( zypp::PoolQuery::Selectable_iterator it = query.selectableBegin();
+ it != query.selectableEnd() && ! progress.wasCanceled();
+ ++it )
+ {
+ ZyppSel selectable = *it;
+ ZyppPkg zyppPkg = tryCastToZyppPkg( selectable->theObj() );
+
+ if ( zyppPkg )
+ {
+ _matchCount++;
+ emit filterMatch( selectable, zyppPkg );
+ }
+
+ if ( progress.wasCanceled() )
+ break;
+
+ progress.setProgress( count++ );
+
+ if ( timer.elapsed() > 300 ) // milisec
+ {
+ // Process events only every 300 milliseconds - this is very
+ // expensive since both the progress dialog and the package
+ // list change all the time, thus display updates are necessary
+ // each time.
+
+ qApp->processEvents();
+ timer.restart();
+ }
+ }
+
+ if ( _matchCount == 0 )
+ emit message( _( "No Results." ) );
+ }
+ }
+ catch ( const std::exception & exception )
+ {
+ //y2warning("CAUGHT zypp exception: %s", exception.what().c_str());
+
+ QMessageBox msgBox;
+
+ // Translators: This is a (short) text indicating that something went
+ // wrong while searching for packages. At this point, it is not clear
+ // if it's a user error (e.g., syntax error in regular expression) or
+ // an internal error. But there is a "Details" button that will return
+ // the original (translated) error message.
+
+ QString heading = _( "Query Error" );
+
+ if ( heading.length() < 25 )// Avoid very narrow message boxes
+ {
+ QString blanks;
+ blanks.fill( ' ', 50 - heading.length() );
+ heading += blanks;
+ }
+
+ msgBox.setText( heading );
+ msgBox.setIcon( QMessageBox::Warning );
+ msgBox.setText( fromUTF8( exception.what() ) );
+ msgBox.exec();
+ }
+
+ _searchText->setEnabled(true);
+ _searchButton->setEnabled(true);
+ parentWidget()->parentWidget()->setCursor(Qt::ArrowCursor);
emit filterFinished();
}
-
bool
YQPkgSearchFilterView::check( ZyppSel selectable,
ZyppObj zyppObj )
@@ -340,22 +413,23 @@
bool
-YQPkgSearchFilterView::check( const zypp::CapSet & capSet, const QRegExp & regexp )
+YQPkgSearchFilterView::check( const zypp::Capabilities& capSet, const QRegExp & regexp )
{
- for ( zypp::CapSet::const_iterator it = capSet.begin();
- it != capSet.end();
- ++it )
+ for ( zypp::Capabilities::const_iterator it = capSet.begin();
+ it != capSet.end();
+ ++it )
{
- if ( check( ( *it).index(), regexp ) )
+ zypp::CapDetail cap( *it );
+
+ if ( cap.isSimple() && check( cap.name().asString(), regexp ) )
{
- // y2debug( "Match for %s", (*it).asString().c_str() );
- return true;
+ // yuiDebug() << "Match for " << (*it).asString() << endl;
+ return true;
}
}
- return false;
+ return false;
}
-
#include "YQPkgSearchFilterView.moc"
Modified: branches/tmp/dmacvicar/zc10/qt/src/YQPkgSelDescriptionView.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgSelDescriptionView.cc (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgSelDescriptionView.cc Thu Mar 24 12:36:13 2011
@@ -75,10 +75,9 @@
YQPkgSelDescriptionView::htmlHeading( ZyppSel selectable )
{
ZyppObj zyppObj = selectable->theObj();
- ZyppSelection selection = tryCastToZyppSelection( zyppObj );
ZyppPattern pattern = tryCastToZyppPattern ( zyppObj );
- if ( ! selection && ! pattern )
+ if ( ! pattern )
return YQPkgGenericDetailsView::htmlHeading( selectable );
QString summary = fromUTF8( zyppObj->summary() );
Modified: branches/tmp/dmacvicar/zc10/qt/src/YQPkgTechnicalDetailsView.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgTechnicalDetailsView.cc (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgTechnicalDetailsView.cc Thu Mar 24 12:36:13 2011
@@ -118,79 +118,75 @@
return translated.join( "/" );
}
-
QString
YQPkgTechnicalDetailsView::simpleTable( ZyppSel selectable,
- ZyppPkg pkg )
+ ZyppPkg pkg )
{
- QString html = "<br>" +
- table(
- row( hcell( _( "Version:" ) ) + cell( pkg->edition().asString() ) ) +
- row( hcell( _( "Build Time:" ) ) + cell( pkg->buildtime() ) ) +
- ( pkg == selectable->installedObj() ?
- row( hcell( _( "Install Time:" ) ) + cell( pkg->installtime() ) )
- : "" ) +
- row( hcell( _( "Package Group:" ) ) + cell( formatRpmGroup( pkg ) ) ) +
- row( hcell( _( "License:" ) ) + cell( pkg->license() ) ) +
- row( hcell( _( "Installed Size:" ) ) + cell( pkg->size().asString() ) ) +
- row( hcell( _( "Archive Size:" ) ) + cell( pkg->archivesize().asString() ) ) +
- row( hcell( _( "Distribution:" ) ) + cell( pkg->distribution() ) ) +
- row( hcell( _( "Vendor:" ) ) + cell( pkg->vendor() ) ) +
- row( hcell( _( "Packager:" ) ) + cell( pkg->packager() ) ) +
- row( hcell( _( "Architecture:" ) ) + cell( pkg->arch().asString() ) ) +
- row( hcell( _( "OS:" ) ) + cell( pkg->os() ) ) +
- row( hcell( _( "Build Host:" ) ) + cell( pkg->buildhost() ) ) +
- row( hcell( _( "URL:" ) ) + cell( pkg->url() ) ) +
-#ifdef FIXME_missing_in_zypp
- row( hcell( _( "Source RPM:" ) ) + cell( pkg->sourceloc() ) ) +
-#endif
- row( hcell( _( "Media No.:" ) ) + cell( pkg->sourceMediaNr() ) ) +
- row( hcell( _( "Authors:" ) ) + authorsListCell( pkg ) )
- );
+ QString html;
+
+ html += row( hcell( _( "Version:") ) + cell( pkg->edition().asString()) );
+ html += row( hcell( _( "Build Time:") ) + cell( pkg->buildtime()) );
+
+ html +=
+ pkg == selectable->installedObj() ?
+ row( hcell( _( "Install Time:" ) ) + cell( pkg->installtime() ) ) : "";
+
+ html += row( hcell( _( "Package Group:") ) + cell( formatRpmGroup( pkg )) );
+ html += row( hcell( _( "License:") ) + cell( pkg->license()) );
+ html += row( hcell( _( "Installed Size:" ) ) + cell( pkg->installSize().asString()) );
+ html += row( hcell( _( "Download Size:" ) ) + cell( pkg->downloadSize().asString()) );
+ html += row( hcell( _( "Distribution:") ) + cell( pkg->distribution()) );
+ html += row( hcell( _( "Vendor:") ) + cell( pkg->vendor()) );
+ html += row( hcell( _( "Packager:") ) + cell( pkg->packager()) );
+ html += row( hcell( _( "Architecture:") ) + cell( pkg->arch().asString()) );
+ html += row( hcell( _( "Build Host:") ) + cell( pkg->buildhost()) );
+ html += row( hcell( _( "URL:") ) + cell( pkg->url()) );
+ html += row( hcell( _( "Source Package:" ) ) + cell( pkg->sourcePkgName() + "-" + pkg->sourcePkgEdition().asString() ) );
+ html += row( hcell( _( "Media No.:") ) + cell( pkg->mediaNr()) );
+ html += row( hcell( _( "Authors:") ) + authorsListCell( pkg) );
+
+ html = "<br>" + table( html );
return html;
}
-
QString
-YQPkgTechnicalDetailsView::complexTable( ZyppSel selectable,
- ZyppPkg installed,
- ZyppPkg candidate )
+YQPkgTechnicalDetailsView::complexTable( ZyppSel selectable,
+ ZyppPkg installed,
+ ZyppPkg candidate )
{
- ZyppPkg p1 = candidate;
- ZyppPkg p2 = installed;
+ ZyppPkg p1 = candidate;
+ ZyppPkg p2 = installed;
- QString p1_header = _( "<b>Alternate Version</b>" );
- QString p2_header = _( "<b>Installed Version</b>" );
+ QString p1_header = _( "<b>Alternate Version</b>" );
+ QString p2_header = _( "<b>Installed Version</b>" );
- QString html = "<br>" +
- table(
- row( hcell( QString( "" ) ) + hcell( "<b>" + p1_header + "</b>" ) + hcell( "<b>" + p2_header + "</b>" ) ) +
-
- row( hcell( _( "Version:" ) ) + cell( p1->edition().asString() ) + cell( p2->edition().asString() ) ) +
- row( hcell( _( "Build Time:" ) ) + cell( p1->buildtime() ) + cell( p2->buildtime() ) ) +
- row( hcell( _( "Install Time:" ) ) + cell( p1->installtime() ) + cell( p2->installtime() ) ) +
- row( hcell( _( "Package Group:" ) ) + cell( formatRpmGroup( p1 ) ) + cell( formatRpmGroup( p2 ) ) ) +
- row( hcell( _( "License:" ) ) + cell( p1->license() ) + cell( p2->license() ) ) +
- row( hcell( _( "Installed Size:" ) ) + cell( p1->size().asString() ) + cell( p2->size().asString() ) ) +
- row( hcell( _( "Archive Size:" ) ) + cell( p1->archivesize().asString() ) + cell( p2->archivesize().asString() ) ) +
- row( hcell( _( "Distribution:" ) ) + cell( p1->distribution() ) + cell( p2->distribution() ) ) +
- row( hcell( _( "Vendor:" ) ) + cell( p1->vendor() ) + cell( p2->vendor() ) ) +
- row( hcell( _( "Packager:" ) ) + cell( p1->packager() ) + cell( p2->packager() ) ) +
- row( hcell( _( "Architecture:" ) ) + cell( p1->arch().asString() ) + cell( p2->arch().asString() ) ) +
- row( hcell( _( "OS:" ) ) + cell( p1->os() ) + cell( p2->os() ) ) +
- row( hcell( _( "Build Host:" ) ) + cell( p1->buildhost() ) + cell( p2->buildhost() ) ) +
- row( hcell( _( "URL:" ) ) + cell( p1->url() ) + cell( p2->url() ) ) +
-#ifdef FIXME_missing_in_zypp
- row( hcell( _( "Source RPM:" ) ) + cell( p1->sourceloc() ) + cell( p2->sourceloc() ) ) +
-#endif
- row( hcell( _( "Media No.:" ) ) + cell( p1->sourceMediaNr() ) + cell( p2->sourceMediaNr() ) ) +
- row( hcell( _( "Authors:" ) ) + authorsListCell( p1 ) + authorsListCell( p2 ) )
- );
+ QString html;
- return html;
+ html += row( hcell( QString( "" ) ) + hcell( "<b>" + p1_header + "</b>" ) + hcell( "<b>" + p2_header + "</b>") );
+
+ html += row( hcell( _( "Version:") ) + cell( p1->edition().asString()) + cell( p2->edition().asString()) );
+ html += row( hcell( _( "Build Time:") ) + cell( p1->buildtime()) + cell( p2->buildtime()) );
+ html += row( hcell( _( "Install Time:") ) + cell( p1->installtime()) + cell( p2->installtime()) );
+ html += row( hcell( _( "Package Group:") ) + cell( formatRpmGroup( p1 )) + cell( formatRpmGroup( p2 )) );
+ html += row( hcell( _( "License:") ) + cell( p1->license()) + cell( p2->license()) );
+ html += row( hcell( _( "Installed Size:" ) ) + cell( p1->installSize().asString()) + cell( p2->installSize().asString()) );
+ html += row( hcell( _( "Download Size:" ) ) + cell( p1->downloadSize().asString()) + cell( p2->downloadSize().asString()) );
+ html += row( hcell( _( "Distribution:") ) + cell( p1->distribution()) + cell( p2->distribution()) );
+ html += row( hcell( _( "Vendor:") ) + cell( p1->vendor()) + cell( p2->vendor()) );
+ html += row( hcell( _( "Packager:") ) + cell( p1->packager()) + cell( p2->packager()) );
+ html += row( hcell( _( "Architecture:") ) + cell( p1->arch().asString()) + cell( p2->arch().asString()) );
+ html += row( hcell( _( "Build Host:") ) + cell( p1->buildhost()) + cell( p2->buildhost()) );
+ html += row( hcell( _( "URL:") ) + cell( p1->url()) + cell( p2->url()) );
+ html += row( hcell( _( "Source Package:") ) + cell( p1->sourcePkgName() + "-" + p1->sourcePkgEdition().asString() )
+ + cell( p2->sourcePkgName() + "-" + p2->sourcePkgEdition().asString()) );
+ html += row( hcell( _( "Media No.:") ) + cell( p1->mediaNr()) + cell( p2->mediaNr()) );
+ html += row( hcell( _( "Authors:") ) + authorsListCell( p1) + authorsListCell( p2) );
+
+
+ html = "<br>" + table( html );
+
+ return html;
}
-
-
#include "YQPkgTechnicalDetailsView.moc"
Modified: branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgLangList.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/inc…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgLangList.h (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgLangList.h Thu Mar 24 12:36:13 2011
@@ -158,13 +158,6 @@
**/
virtual void cycleStatus();
- /**
- * Sorting function. Redefined here (bnc#428355) as the one from
- * parent YQPkgObjList can't be used - it refers to zyppObj's which
- * are NULL here as zypp::Locale is not zypp::ResObject anymore
- **/
- virtual bool operator< ( const QListViewItem & other ) const;
-
protected:
/**
Modified: branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgObjList.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/inc…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgObjList.h (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgObjList.h Thu Mar 24 12:36:13 2011
@@ -354,6 +354,9 @@
ZyppSel selectable,
ZyppObj zyppObj = 0 );
+ YQPkgObjListItem( YQPkgObjList * pkgObjList );
+
+
protected:
/**
* Constructor for non-root items.
Modified: branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgSearchFilterView.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/inc…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgSearchFilterView.h (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgSearchFilterView.h Thu Mar 24 12:36:13 2011
@@ -160,11 +160,13 @@
QComboBox * _searchText;
QPushButton * _searchButton;
- QCheckBox * _searchInName;
- QCheckBox * _searchInSummary;
- QCheckBox * _searchInDescription;
- QCheckBox * _searchInRequires;
- QCheckBox * _searchInProvides;
+ QCheckBox *_searchInName;
+ QCheckBox *_searchInKeywords;
+ QCheckBox *_searchInSummary;
+ QCheckBox *_searchInDescription;
+ QCheckBox *_searchInRequires;
+ QCheckBox *_searchInProvides;
+ QCheckBox *_searchInFileList;
QComboBox * _searchMode;
QCheckBox * _caseSensitive;
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r63654 - in /branches/tmp/dmacvicar/zc10/qt/src: ./ include/
by dmacvicar@svn2.opensuse.org 23 Mar '11
by dmacvicar@svn2.opensuse.org 23 Mar '11
23 Mar '11
Author: dmacvicar
Date: Wed Mar 23 17:01:11 2011
New Revision: 63654
URL: http://svn.opensuse.org/viewcvs/yast?rev=63654&view=rev
Log:
Port to new ZYpp API. Not done yet
Added:
branches/tmp/dmacvicar/zc10/qt/src/YQPkgRepoFilterView.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPkgRepoFilterView.lo
branches/tmp/dmacvicar/zc10/qt/src/YQPkgRepoList.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPkgRepoList.lo
branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgRepoFilterView.h
branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgRepoList.h
Removed:
branches/tmp/dmacvicar/zc10/qt/src/YQPkgInstSrcFilterView.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPkgInstSrcList.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPkgSelList.cc
branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgInstSrcFilterView.h
branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgInstSrcList.h
branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgSelList.h
Modified:
branches/tmp/dmacvicar/zc10/qt/src/Makefile.am
branches/tmp/dmacvicar/zc10/qt/src/YQPackageSelector.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPackageSelectorBase.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPatternSelector.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPkgConflictDialog.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPkgDependenciesView.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPkgFileListView.cc
branches/tmp/dmacvicar/zc10/qt/src/YQPkgLangList.cc
branches/tmp/dmacvicar/zc10/qt/src/include/YQPackageSelector.h
branches/tmp/dmacvicar/zc10/qt/src/include/YQPatternSelector.h
branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgDependenciesView.h
branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgLangList.h
branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgSearchFilterView.h
branches/tmp/dmacvicar/zc10/qt/src/include/YQZypp.h
Modified: branches/tmp/dmacvicar/zc10/qt/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/Mak…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/Makefile.am (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/Makefile.am Wed Mar 23 17:01:11 2011
@@ -90,8 +90,8 @@
YQPkgDiskUsageWarningDialog.cc \
YQPkgFileListView.cc \
YQPkgGenericDetailsView.cc \
- YQPkgInstSrcFilterView.cc \
- YQPkgInstSrcList.cc \
+ YQPkgRepoFilterView.cc \
+ YQPkgRepoList.cc \
YQPkgLangList.cc \
YQPkgList.cc \
YQPkgObjList.cc \
@@ -103,7 +103,6 @@
YQPkgRpmGroupTagsFilterView.cc \
YQPkgSearchFilterView.cc \
YQPkgSelDescriptionView.cc \
- YQPkgSelList.cc \
YQPkgSelMapper.cc \
YQPkgStatusFilterView.cc \
YQPkgTechnicalDetailsView.cc \
@@ -191,8 +190,8 @@
YQPkgDiskUsageWarningDialog.moc \
YQPkgFileListView.moc \
YQPkgGenericDetailsView.moc \
- YQPkgInstSrcFilterView.moc \
- YQPkgInstSrcList.moc \
+ YQPkgRepoFilterView.moc \
+ YQPkgRepoList.moc \
YQPkgLangList.moc \
YQPkgList.moc \
YQPkgObjList.moc \
@@ -205,7 +204,6 @@
YQPkgRpmGroupTagsFilterView.moc \
YQPkgSearchFilterView.moc \
YQPkgSelDescriptionView.moc \
- YQPkgSelList.moc \
YQPkgStatusFilterView.moc \
YQPkgTechnicalDetailsView.moc \
YQPkgTextDialog.moc \
@@ -279,8 +277,8 @@
YQPkgDiskUsageWarningDialog.o YQPkgDiskUsageWarningDialog.lo: YQPkgDiskUsageWarningDialog.moc
YQPkgFileListView.o YQPkgFileListView.lo: YQPkgFileListView.moc
YQPkgGenericDetailsView.o YQPkgGenericDetailsView.lo: YQPkgGenericDetailsView.moc
-YQPkgInstSrcFilterView.o YQPkgInstSrcFilterView.lo: YQPkgInstSrcFilterView.moc
-YQPkgInstSrcList.o YQPkgInstSrcList.lo: YQPkgInstSrcList.moc
+YQPkgRepoFilterView.o YQPkgRepoFilterView.lo: YQPkgRepoFilterView.moc
+YQPkgRepoList.o YQPkgRepoList.lo: YQPkgRepoList.moc
YQPkgLangList.o YQPkgLangList.lo: YQPkgLangList.moc
YQPkgList.o YQPkgList.lo: YQPkgList.moc
YQPkgObjList.o YQPkgObjList.lo: YQPkgObjList.moc
@@ -292,7 +290,6 @@
YQPkgRpmGroupTagsFilterView.o YQPkgRpmGroupTagsFilterView.lo: YQPkgRpmGroupTagsFilterView.moc
YQPkgSearchFilterView.o YQPkgSearchFilterView.lo: YQPkgSearchFilterView.moc
YQPkgSelDescriptionView.o YQPkgSelDescriptionView.lo: YQPkgSelDescriptionView.moc
-YQPkgSelList.o YQPkgSelList.lo: YQPkgSelList.moc
YQPkgStatusFilterView.o YQPkgStatusFilterView.lo: YQPkgStatusFilterView.moc
YQPkgTechnicalDetailsView.o YQPkgTechnicalDetailsView.lo: YQPkgTechnicalDetailsView.moc
YQPkgTextDialog.o YQPkgTextDialog.lo: YQPkgTextDialog.moc
@@ -364,8 +361,8 @@
YQPkgDiskUsageWarningDialog.moc: include/YQPkgDiskUsageWarningDialog.h
YQPkgFileListView.moc: include/YQPkgFileListView.h
YQPkgGenericDetailsView.moc: include/YQPkgGenericDetailsView.h
-YQPkgInstSrcFilterView.moc: include/YQPkgInstSrcFilterView.h
-YQPkgInstSrcList.moc: include/YQPkgInstSrcList.h
+YQPkgRepoFilterView.moc: include/YQPkgRepoFilterView.h
+YQPkgRepoList.moc: include/YQPkgRepoList.h
YQPkgLangList.moc: include/YQPkgLangList.h
YQPkgList.moc: include/YQPkgList.h
YQPkgObjList.moc: include/YQPkgObjList.h
@@ -377,7 +374,6 @@
YQPkgRpmGroupTagsFilterView.moc: include/YQPkgRpmGroupTagsFilterView.h
YQPkgSearchFilterView.moc: include/YQPkgSearchFilterView.h
YQPkgSelDescriptionView.moc: include/YQPkgSelDescriptionView.h
-YQPkgSelList.moc: include/YQPkgSelList.h
YQPkgStatusFilterView.moc: include/YQPkgStatusFilterView.h
YQPkgTechnicalDetailsView.moc: include/YQPkgTechnicalDetailsView.h
YQPkgTextDialog.moc: include/YQPkgTextDialog.h
Modified: branches/tmp/dmacvicar/zc10/qt/src/YQPackageSelector.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPackageSelector.cc (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPackageSelector.cc Wed Mar 23 17:01:11 2011
@@ -60,8 +60,8 @@
#include "YQPkgDiskUsageList.h"
#include "YQPkgDiskUsageWarningDialog.h"
#include "YQPkgFileListView.h"
-#include "YQPkgInstSrcFilterView.h"
-#include "YQPkgInstSrcList.h"
+#include "YQPkgRepoFilterView.h"
+#include "YQPkgRepoList.h"
#include "YQPkgLangList.h"
#include "YQPkgList.h"
#include "YQPkgPatchFilterView.h"
@@ -70,7 +70,6 @@
#include "YQPkgProductDialog.h"
#include "YQPkgRpmGroupTagsFilterView.h"
#include "YQPkgSearchFilterView.h"
-#include "YQPkgSelList.h"
#include "YQPkgStatusFilterView.h"
#include "YQPkgTechnicalDetailsView.h"
#include "YQPkgTextDialog.h"
@@ -118,7 +117,6 @@
_pkgVersionsView = 0;
_rpmGroupTagsFilterView = 0;
_searchFilterView = 0;
- _selList = 0;
_statusFilterView = 0;
_updateProblemFilterView = 0;
_patchFilterView = 0;
@@ -152,7 +150,7 @@
}
else if ( _instSrcFilterView && _instSourcesMode )
{
- if ( YQPkgInstSrcList::countEnabledSources() > 1 )
+ if ( YQPkgRepoList::countEnabledRepositories() > 1 )
{
_filters->showPage( _instSrcFilterView );
_instSrcFilterView->filter();
@@ -187,12 +185,6 @@
_filters->showPage( _patternList );
_patternList->filter();
}
- else if ( _selList )
- {
- _filters->showPage( _selList );
- _selList->filter();
- }
-
if ( _diskUsageList )
_diskUsageList->updateDiskUsage();
@@ -307,29 +299,6 @@
_patternList, SLOT ( updateItemStates() ) );
}
-
- //
- // Selections view
- //
-
- if ( ! zyppPool().empty<zypp::Selection>() || _testMode )
- {
-
- _selList = new YQPkgSelList( parent, true );
- CHECK_PTR( _selList );
- _filters->addPage( _( "Selections" ), _selList );
-
- connect( _selList, SIGNAL( statusChanged() ),
- this, SLOT ( autoResolveDependencies() ) );
-
- connect( _pkgConflictDialog, SIGNAL( updatePackages() ),
- _selList, SLOT ( updateItemStates() ) );
-
- connect( this, SIGNAL( refresh() ),
- _selList, SLOT ( updateItemStates() ) );
- }
-
-
//
// RPM group tags view
//
@@ -363,7 +332,7 @@
// Inst source view
//
- _instSrcFilterView = new YQPkgInstSrcFilterView( parent );
+ _instSrcFilterView = new YQPkgRepoFilterView( parent );
CHECK_PTR( _instSrcFilterView );
_filters->addPage( _( "Installation Sources" ), _instSrcFilterView );
@@ -565,7 +534,7 @@
_autoDependenciesCheckBox->setChecked( true );
else
_autoDependenciesCheckBox->setChecked( AUTO_CHECK_DEPENDENCIES_DEFAULT );
-
+
addHStretch( button_box );
@@ -811,7 +780,6 @@
connectFilter( _updateProblemFilterView, _pkgList, false );
connectFilter( _patternList, _pkgList );
- connectFilter( _selList, _pkgList );
connectFilter( _instSrcFilterView, _pkgList, false );
connectFilter( _rpmGroupTagsFilterView, _pkgList, false );
connectFilter( _langList, _pkgList );
@@ -858,12 +826,6 @@
_patternList, SLOT ( updateItemStates() ) );
}
- if ( _selList )
- {
- connect( _pkgConflictDialog, SIGNAL( updatePackages() ),
- _selList, SLOT ( updateItemStates() ) );
- }
-
if ( _diskUsageList )
{
connect( _pkgConflictDialog, SIGNAL( updatePackages() ),
@@ -1252,7 +1214,7 @@
}
if ( oldStatus != newStatus )
- selectable->set_status( newStatus );
+ selectable->setStatus( newStatus );
}
@@ -1367,7 +1329,7 @@
if ( ! subPkg->installedObj() )
{
- subPkg->set_status( S_Install );
+ subPkg->setStatus( S_Install );
y2milestone( "Installing subpackage %s", (const char *) subPkgName );
}
break;
@@ -1380,12 +1342,12 @@
if ( ! subPkg->installedObj() )
{
- subPkg->set_status( S_Install );
+ subPkg->setStatus( S_Install );
y2milestone( "Installing subpackage %s", (const char *) subPkgName );
}
else
{
- subPkg->set_status( S_Update );
+ subPkg->setStatus( S_Update );
y2milestone( "Updating subpackage %s", (const char *) subPkgName );
}
break;
Modified: branches/tmp/dmacvicar/zc10/qt/src/YQPackageSelectorBase.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPackageSelectorBase.cc (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPackageSelectorBase.cc Wed Mar 23 17:01:11 2011
@@ -81,8 +81,6 @@
zyppPool().saveState<zypp::Package >();
zyppPool().saveState<zypp::Pattern >();
- zyppPool().saveState<zypp::Selection>();
- zyppPool().saveState<zypp::Language >();
zyppPool().saveState<zypp::Patch >();
@@ -138,7 +136,7 @@
YQUI::ui()->busyCursor();
int result = _pkgConflictDialog->verifySystem();
YQUI::ui()->normalCursor();
-
+
if ( result == QDialog::Accepted )
{
QMessageBox::information( this, "",
@@ -209,8 +207,6 @@
bool changes =
zyppPool().diffState<zypp::Package >() ||
zyppPool().diffState<zypp::Pattern >() ||
- zyppPool().diffState<zypp::Selection>() ||
- zyppPool().diffState<zypp::Language >() ||
zyppPool().diffState<zypp::Patch >();
if ( changes )
@@ -221,12 +217,6 @@
if ( zyppPool().diffState<zypp::Pattern>() )
y2milestone( "diffState() reports changed patterns" );
- if ( zyppPool().diffState<zypp::Selection>() )
- y2milestone( "diffState() reports changed selections" );
-
- if ( zyppPool().diffState<zypp::Language>() )
- y2milestone( "diffState() reports changed languages" );
-
if ( zyppPool().diffState<zypp::Patch>() )
y2milestone( "diffState() reports changed patches" );
}
@@ -242,8 +232,6 @@
{
zyppPool().restoreState<zypp::Package >();
zyppPool().restoreState<zypp::Pattern >();
- zyppPool().restoreState<zypp::Selection>();
- zyppPool().restoreState<zypp::Language >();
zyppPool().restoreState<zypp::Patch >();
y2milestone( "Closing PackageSelector with \"Cancel\"" );
@@ -315,7 +303,7 @@
YQPackageSelectorBase::showPendingLicenseAgreements( ZyppPoolIterator begin, ZyppPoolIterator end )
{
bool allConfirmed = true;
-
+
for ( ZyppPoolIterator it = begin; it != end; ++it )
{
ZyppSel sel = (*it);
Modified: branches/tmp/dmacvicar/zc10/qt/src/YQPatternSelector.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPatternSelector.cc (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPatternSelector.cc Wed Mar 23 17:01:11 2011
@@ -38,7 +38,6 @@
#include "YQPkgSelDescriptionView.h"
#include "YQPkgDiskUsageList.h"
#include "YQPkgPatternList.h"
-#include "YQPkgSelList.h"
#include "YQWizard.h"
#include "YQDialog.h"
@@ -60,7 +59,6 @@
: YQPackageSelectorBase( parent, opt )
{
_patternList = 0;
- _selList = 0;
_descriptionView = 0;
_wizard = findWizard();
@@ -72,14 +70,8 @@
_patternList->fillList();
_patternList->selectSomething();
}
- else if ( _selList )
- {
- _selList->fillList();
- _selList->selectSomething();
- }
- if ( zyppPool().empty<zypp::Pattern >() &&
- zyppPool().empty<zypp::Selection>() )
+ if ( zyppPool().empty<zypp::Pattern >() )
{
y2warning( "Neither patterns nor selections in ZyppPool" );
}
@@ -147,26 +139,6 @@
_patternList->header()->hide();
}
- if ( ! _patternList )
- {
- //
- // Fallback: selections list
- //
-
- /**
- * Create a selections list even if there are no selections, otherwise
- * the layout will look very weird. An empty selections list still
- * looks better than a lot of grey empty space.
- **/
-
- y2warning( "No patterns in ZyppPool - using selections instead" );
- _selList = new YQPkgSelList( vbox,
- false, // no autoFill - need to connect to details view first
- false ); // no autoFilter - filterMatch() is not connected
- CHECK_PTR( _selList );
- _selList->header()->hide();
- }
-
if ( _wizard ) // No button box - add "Details..." button here
{
//
@@ -297,21 +269,6 @@
}
}
- if ( _selList )
- {
- if ( _descriptionView )
- {
- connect( _selList, SIGNAL( selectionChanged( ZyppSel ) ),
- _descriptionView, SLOT ( showDetails ( ZyppSel ) ) );
- }
-
- if ( _diskUsageList )
- {
- connect( _selList, SIGNAL( updatePackages() ),
- _diskUsageList, SLOT ( updateDiskUsage() ) );
- }
- }
-
y2milestone( "Connection set up" );
Modified: branches/tmp/dmacvicar/zc10/qt/src/YQPkgConflictDialog.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgConflictDialog.cc (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgConflictDialog.cc Wed Mar 23 17:01:11 2011
@@ -246,7 +246,7 @@
QTime solveTime;
solveTime.start();
- bool success = zypp::getZYpp()->resolver()->verifySystem( true ); // considerNewHardware
+ bool success = zypp::getZYpp()->resolver()->verifySystem(); // considerNewHardware
y2debug( "System verified in %f s", solveTime.elapsed() / 1000.0 );
Modified: branches/tmp/dmacvicar/zc10/qt/src/YQPkgDependenciesView.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgDependenciesView.cc (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgDependenciesView.cc Wed Mar 23 17:01:11 2011
@@ -14,7 +14,7 @@
Author: Stefan Hundhammer <sh(a)suse.de>
- Textdomain "packages-qt"
+ Textdomain "qt-pkg"
/-*/
@@ -90,7 +90,6 @@
row( "Obsoletes:", pkg->dep( zypp::Dep::OBSOLETES ) ) +
row( "Recommends:", pkg->dep( zypp::Dep::RECOMMENDS ) ) +
row( "Suggests:", pkg->dep( zypp::Dep::SUGGESTS ) ) +
- row( "Freshens:", pkg->dep( zypp::Dep::FRESHENS ) ) +
row( "Enances:", pkg->dep( zypp::Dep::ENHANCES ) ) +
row( "Supplements:", pkg->dep( zypp::Dep::SUPPLEMENTS ) )
);
@@ -121,7 +120,6 @@
row( "Obsoletes:", p1->dep( zypp::Dep::OBSOLETES ), p2->dep( zypp::Dep::OBSOLETES ) ) +
row( "Recommends:", p1->dep( zypp::Dep::RECOMMENDS ), p2->dep( zypp::Dep::RECOMMENDS ) ) +
row( "Suggests:", p1->dep( zypp::Dep::SUGGESTS ), p2->dep( zypp::Dep::SUGGESTS ) ) +
- row( "Freshens:", p1->dep( zypp::Dep::FRESHENS ), p2->dep( zypp::Dep::FRESHENS ) ) +
row( "Enances:", p1->dep( zypp::Dep::ENHANCES ), p2->dep( zypp::Dep::ENHANCES ) ) +
row( "Supplements:", p1->dep( zypp::Dep::SUPPLEMENTS ), p2->dep( zypp::Dep::SUPPLEMENTS ) )
);
@@ -132,7 +130,7 @@
QString
YQPkgDependenciesView::row( const QString & heading,
- const zypp::CapSet & capSet )
+ const zypp::Capabilities & capSet )
{
QString content = htmlLines( capSet );
@@ -148,8 +146,8 @@
QString
YQPkgDependenciesView::row( const QString & heading,
- const zypp::CapSet & capSet1,
- const zypp::CapSet & capSet2 )
+ const zypp::Capabilities & capSet1,
+ const zypp::Capabilities & capSet2 )
{
QString content1 = htmlLines( capSet1 );
QString content2 = htmlLines( capSet2 );
@@ -166,11 +164,11 @@
QString
-YQPkgDependenciesView::htmlLines( const zypp::CapSet & capSet )
+YQPkgDependenciesView::htmlLines( const zypp::Capabilities & capSet )
{
QString html;
- for ( zypp::CapSet::const_iterator it = capSet.begin();
+ for ( zypp::Capabilities::const_iterator it = capSet.begin();
it != capSet.end();
++it )
{
Modified: branches/tmp/dmacvicar/zc10/qt/src/YQPkgFileListView.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgFileListView.cc (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgFileListView.cc Wed Mar 23 17:01:11 2011
@@ -61,7 +61,12 @@
if ( installed )
{
- html += formatFileList( installed->filenames() );
+ // ma@: It might be worth passing Package::FileList directly
+ // instead of copying _all_ filenames into a list first.
+ // Package::FileList is a query, so it does not eat much memory.
+ zypp::Package::FileList f( installed->filelist() );
+ std::list<std::string> tmp( f.begin(), f.end() );
+ html += formatFileList( tmp );
}
else
{
Modified: branches/tmp/dmacvicar/zc10/qt/src/YQPkgLangList.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgLangList.cc (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgLangList.cc Wed Mar 23 17:01:11 2011
@@ -14,45 +14,61 @@
Author: Stefan Hundhammer <sh(a)suse.de>
- Textdomain "packages-qt"
+ Textdomain "qt-pkg"
/-*/
-#define y2log_component "qt-pkg"
-#include <ycp/y2log.h>
+#define YUILogComponent "qt-pkg"
+#include "YUILog.h"
#include <qregexp.h>
+#include <QHeaderView>
#include "YQi18n.h"
#include "utf8.h"
#include "YQPkgLangList.h"
+#include "zypp/sat/LocaleSupport.h"
+
using std::set;
YQPkgLangList::YQPkgLangList( QWidget * parent )
: YQPkgObjList( parent )
+#warning "base class works with zypp::Resolvable, but zypp::Locale isn't one any longer!"
{
- y2debug( "Creating language list" );
+ yuiDebug() << "Creating language list" << endl;
int numCol = 0;
- addColumn( "" ); _statusCol = numCol++;
+ QStringList headers;
+ headers << ""; _statusCol = numCol++;
// Translators: Table column heading for language ISO code like "de_DE", "en_US"
// Please keep this short to avoid stretching the column too wide!
- addColumn( _( "Code" ) ); _nameCol = numCol++;
+ headers << _( "Code" ); _nameCol = numCol++;
// Full (human readable) language / country name like "German (Austria)"
- addColumn( _( "Language" ) ); _summaryCol = numCol++;
+ headers << _( "Language"); _summaryCol = numCol++;
setAllColumnsShowFocus( true );
+ setHeaderLabels(headers);
+ header()->setResizeMode( _nameCol, QHeaderView::ResizeToContents );
+ header()->setResizeMode( _summaryCol, QHeaderView::Stretch );
+
+
+ setSortingEnabled( true );
+ header()->setSortIndicatorShown( true );
+ header()->setClickable( true );
+
+ sortByColumn( nameCol(), Qt::AscendingOrder );
- connect( this, SIGNAL( selectionChanged ( QListViewItem * ) ),
+ connect( this, SIGNAL( currentItemChanged ( QListViewItem *, QListViewItem * ) ),
this, SLOT ( filter() ) );
fillList();
selectSomething();
+ resizeColumnToContents(_statusCol);
- y2debug( "Creating language list done" );
+ yuiDebug() << "Creating language list done" << endl;
}
@@ -66,22 +82,18 @@
YQPkgLangList::fillList()
{
clear();
- y2debug( "Filling language list" );
+ yuiDebug() << "Filling language list" << endl;
+ zypp::LocaleSet locales = zypp::getZYpp()->pool().getAvailableLocales();
- for ( ZyppPoolIterator it = zyppLangBegin();
- it != zyppLangEnd();
+ for ( zypp::LocaleSet::const_iterator it = locales.begin();
+ it != locales.end();
++it )
{
- ZyppLang zyppLang = tryCastToZyppLang( (*it)->theObj() );
-
- if ( zyppLang )
- addLangItem( *it, zyppLang );
- else
- y2error( "Found non-Language selectable" );
+ addLangItem( *it );
}
- y2debug( "Language list filled" );
+ yuiDebug() << "Language list filled" << endl;
}
@@ -100,79 +112,44 @@
if ( selection() )
{
- ZyppLang lang = selection()->zyppLang();
+ int total = 0;
+ int installed = 0;
- if ( lang )
- {
- string currentLang = lang->name();
+ zypp::Locale lang = selection()->zyppLang();
- //
- // Iterate over all selectables in pool
- //
-
- for ( ZyppPoolIterator it = zyppPkgBegin();
- it != zyppPkgEnd();
- ++it )
- {
- ZyppObj zyppObj = (*it)->theObj();
-
- if ( zyppObj )
- {
- //
- // 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();
- cap_it != freshens.end();
- ++cap_it )
- {
- if ( (*cap_it).index() == currentLang ) // obj freshens this language
- {
- ZyppPkg pkg = tryCastToZyppPkg( zyppObj );
-
- if ( pkg )
- {
- y2debug( "Found pkg %s for lang %s",
- pkg->name().c_str(), currentLang.c_str() );
-
- emit filterMatch( *it, pkg );
- }
- else
- {
- y2warning( "Found non-pkg obj %s for lang %s",
- pkg->name().c_str(), currentLang.c_str() );
- }
- }
- }
- }
- }
- }
- }
+ zypp::sat::LocaleSupport myLocale( lang );
+ for_( it, myLocale.selectableBegin(), myLocale.selectableEnd() )
+ {
+ ZyppPkg zyppPkg = tryCastToZyppPkg( (*it)->theObj() );
+ if ( zyppPkg )
+ {
+ if ( (*it)->installedSize() > 0 )
+ ++installed;
+ ++total;
+
+ emit filterMatch( *it, zyppPkg );
+ }
+ }
+ //selection()->setInstalledPackages(installed);
+ //selection()->setTotalPackages(total);
+ //selection()->setText( _summaryCol, QString().sprintf("%s (%d/%d)", zyppPattern->summary().c_str(), installed, total));
+
+ }
emit filterFinished();
}
-
void
-YQPkgLangList::addLangItem( ZyppSel selectable,
- ZyppLang zyppLang )
+YQPkgLangList::addLangItem( const zypp::Locale &zyppLang )
{
- if ( ! selectable )
- {
- y2error( "NULL ZyppSel!" );
- return;
- }
-
- new YQPkgLangListItem( this, selectable, zyppLang );
+ new YQPkgLangListItem( this, zyppLang );
}
YQPkgLangListItem *
YQPkgLangList::selection() const
{
- QListViewItem * item = selectedItem();
+ QTreeWidgetItem * item = currentItem();
if ( ! item )
return 0;
@@ -181,17 +158,34 @@
}
+void
+YQPkgLangList::updateActions( YQPkgObjListItem * item)
+{
+#if 0
+ YQPkgLangListItem *litem;
+ if ( !item)
+ litem = dynamic_cast<YQPkgLangListItem *> ( currentItem() );
+ else
+ litem = dynamic_cast<YQPkgLangListItem *> ( item );
+#endif
+
+ actionSetCurrentInstall->setEnabled( true );
+ actionSetCurrentDontInstall->setEnabled( true );
+ actionSetCurrentTaboo->setEnabled( true );
+ actionSetCurrentProtected->setEnabled( false );
+
+ actionSetCurrentKeepInstalled->setEnabled( false );
+ actionSetCurrentDelete->setEnabled( false );
+ actionSetCurrentUpdate->setEnabled( false );
+}
-
-
-YQPkgLangListItem::YQPkgLangListItem( YQPkgLangList * langList,
- ZyppSel selectable,
- ZyppLang lang )
- : YQPkgObjListItem( langList, selectable, lang )
- , _langList( langList )
+YQPkgLangListItem::YQPkgLangListItem( YQPkgLangList * langList,
+ const zypp::Locale & lang )
+ : YQPkgObjListItem( langList )
, _zyppLang( lang )
{
+ init();
}
@@ -209,6 +203,109 @@
}
+void
+YQPkgLangListItem::init()
+{
+#warning this is utterly broken - see bug #370233
+ // DO NOT CALL PARENT CLASS
+ _debugIsBroken = false;
+ _debugIsSatisfied = false;
+ _candidateIsNewer = false;
+ _installedIsNewer = false;
+
+ if ( nameCol() >= 0 ) setText( nameCol(), _zyppLang.code() );
+ if ( summaryCol() >= 0 ) setText( summaryCol(), _zyppLang.name() );
+
+ setStatusIcon();
+}
+
+
+ZyppStatus
+YQPkgLangListItem::status() const
+{
+ if ( zypp::getZYpp()->pool().isRequestedLocale( _zyppLang ) )
+ return S_Install;
+ else
+ return S_NoInst;
+}
+void
+YQPkgLangListItem::setStatus( ZyppStatus newStatus, bool sendSignals )
+{
+ ZyppStatus oldStatus = status();
+ switch ( newStatus )
+ {
+ case S_Install:
+ if ( ! zypp::getZYpp()->pool().isRequestedLocale( _zyppLang ) )
+ {
+ zypp::getZYpp()->pool().addRequestedLocale( _zyppLang );
+ }
+ break;
+ case S_NoInst:
+ if ( zypp::getZYpp()->pool().isRequestedLocale( _zyppLang ) )
+ {
+ zypp::getZYpp()->pool().eraseRequestedLocale( _zyppLang );
+ }
+ break;
+ default:
+ return;
+ }
+
+ if ( oldStatus != newStatus )
+ {
+ applyChanges();
+
+ if ( sendSignals )
+ {
+ _pkgObjList->updateItemStates();
+ _pkgObjList->sendUpdatePackages();
+ }
+ }
+
+ setStatusIcon();
+ _pkgObjList->sendStatusChanged();
+}
+
+bool
+YQPkgLangListItem::bySelection() const
+{
+ return zypp::getZYpp()->pool().isRequestedLocale( _zyppLang );
+}
+
+
+void
+YQPkgLangListItem::cycleStatus()
+{
+ if ( zypp::getZYpp()->pool().isRequestedLocale( _zyppLang ) )
+ {
+ zypp::getZYpp()->pool().eraseRequestedLocale( _zyppLang );
+ }
+ else
+ {
+ zypp::getZYpp()->pool().addRequestedLocale( _zyppLang );
+ }
+ setStatusIcon();
+ _pkgObjList->sendStatusChanged();
+}
+
+bool YQPkgLangListItem::operator<( const QTreeWidgetItem & otherListViewItem ) const
+{
+ const YQPkgLangListItem * other = dynamic_cast<const YQPkgLangListItem *> (&otherListViewItem);
+ int col = treeWidget()->sortColumn();
+
+ if ( other )
+ {
+ if ( col == nameCol() )
+ {
+ return ( strcoll( this->zyppLang().code().c_str(), other->zyppLang().code().c_str() ) < 0 );
+ }
+ if ( col == summaryCol() )
+ {
+ return ( strcoll( this->zyppLang().name().c_str(), other->zyppLang().name().c_str() ) < 0 );
+ }
+ }
+
+ return QY2ListViewItem::operator<( otherListViewItem );
+}
#include "YQPkgLangList.moc"
Added: branches/tmp/dmacvicar/zc10/qt/src/YQPkgRepoFilterView.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgRepoFilterView.cc (added)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgRepoFilterView.cc Wed Mar 23 17:01:11 2011
@@ -0,0 +1,247 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: YQPkgRepoFilterView.cc
+
+ Author: Stefan Hundhammer <sh(a)suse.de>
+
+ Textdomain "qt-pkg"
+
+/-*/
+
+
+#define YUILogComponent "qt-pkg"
+#include "ycp/y2log.h"
+
+#include <qlayout.h>
+#include <qsplitter.h>
+#include <qframe.h>
+
+#include "QY2ComboTabWidget.h"
+#include "QY2LayoutUtils.h"
+#include "YQPkgRepoFilterView.h"
+#include "YQPkgRepoList.h"
+#include "YQPkgRpmGroupTagsFilterView.h"
+#include "YQPkgSearchFilterView.h"
+#include "YQPkgStatusFilterView.h"
+#include "YQi18n.h"
+
+
+YQPkgRepoFilterView::YQPkgRepoFilterView( QWidget * parent )
+ : QWidget( parent )
+{
+ QHBoxLayout *layout = new QHBoxLayout(this);
+ //layout->setContentsMargins(0,0,0,0);
+
+ QSplitter * splitter = new QSplitter( Qt::Vertical, this );
+ CHECK_PTR( splitter );
+
+ layout->addWidget( splitter );
+
+ _repoList = new YQPkgRepoList( splitter );
+
+ CHECK_PTR( _repoList );
+ _repoList->setSizePolicy( QSizePolicy( QSizePolicy::Ignored, QSizePolicy::Expanding ) );// hor/vert
+
+ // Directly propagate signals filterStart() and filterFinished()
+ // from primary filter to the outside
+
+ connect( _repoList, SIGNAL( filterStart() ),
+ this, SIGNAL( filterStart() ) );
+
+ connect( _repoList, SIGNAL( filterFinished() ),
+ this, SIGNAL( filterFinished() ) );
+
+
+ // Redirect filterMatch() and filterNearMatch() signals to secondary filter
+
+ connect( _repoList, SIGNAL( filterMatch ( ZyppSel, ZyppPkg ) ),
+ this, SLOT ( primaryFilterMatch ( ZyppSel, ZyppPkg ) ) );
+
+ connect( _repoList, SIGNAL( filterNearMatch ( ZyppSel, ZyppPkg ) ),
+ this, SLOT ( primaryFilterNearMatch ( ZyppSel, ZyppPkg ) ) );
+
+ layoutSecondaryFilters( splitter );
+
+ //splitter->setStretchFactor(0, 5);
+ //splitter->setStretchFactor(1, 1);
+ //splitter->setStretchFactor(2, 3);
+}
+
+
+YQPkgRepoFilterView::~YQPkgRepoFilterView()
+{
+ // NOP
+}
+
+ZyppRepo
+YQPkgRepoFilterView::selectedRepo() const
+{
+ YQPkgRepoListItem *selection = _repoList->selection();
+ if ( selection && selection->zyppRepo() )
+ return selection->zyppRepo();
+ return zypp::Repository::noRepository;
+}
+
+QWidget *
+YQPkgRepoFilterView::layoutSecondaryFilters( QWidget * parent )
+{
+ QWidget *vbox = new QWidget( parent );
+ CHECK_PTR( vbox );
+
+ QVBoxLayout *layout = new QVBoxLayout(vbox);
+ CHECK_PTR( layout );
+
+ //vbox->setLayout( layout );
+ //layout->setContentsMargins( 0, 0, 0, 0 );
+
+ // Translators: This is a combo box where the user can apply a secondary filter
+ // in addition to the primary filter by repository - one of
+ // "All packages", "RPM groups", "search", "summary"
+ //
+ // And yes, the colon really belongs there since this is one of the very
+ // few cases where a combo box label is left to the combo box rather than
+ // above it.
+ _secondaryFilters = new QY2ComboTabWidget( _( "&Secondary Filter:" ));
+ CHECK_PTR( _secondaryFilters );
+ layout->addWidget(_secondaryFilters);
+
+ //
+ // All Packages
+ //
+
+ _allPackages = new QWidget( this );
+ CHECK_PTR( _allPackages );
+ _secondaryFilters->addPage( _( "All Packages" ), _allPackages );
+
+
+ // Unmaintaned packages: Packages that are not provided in any of
+ // the configured repositories
+
+ _unmaintainedPackages = new QWidget( this );
+ CHECK_PTR( _unmaintainedPackages );
+ _secondaryFilters->addPage( _( "Unmaintained Packages" ), _unmaintainedPackages );
+
+ //
+ // RPM Groups
+ //
+
+ _rpmGroupTagsFilterView = new YQPkgRpmGroupTagsFilterView( this );
+ CHECK_PTR( _rpmGroupTagsFilterView );
+ _secondaryFilters->addPage( _( "Package Groups" ), _rpmGroupTagsFilterView );
+
+ connect( _rpmGroupTagsFilterView, SIGNAL( filterStart() ),
+ _repoList, SLOT ( filter() ) );
+
+
+ //
+ // Package search view
+ //
+
+ _searchFilterView = new YQPkgSearchFilterView( this );
+ CHECK_PTR( _searchFilterView );
+
+ _searchFilterView->setSizePolicy( QSizePolicy::Minimum, // horizontal
+ QSizePolicy::Minimum ); // vertical
+ _secondaryFilters->addPage( _( "Search" ), _searchFilterView );
+
+ connect( _searchFilterView, SIGNAL( filterStart() ),
+ _repoList, SLOT ( filter() ) );
+
+ connect( _secondaryFilters, SIGNAL( currentChanged( QWidget * ) ),
+ this, SLOT ( filter() ) );
+
+
+ //
+ // Status change view
+ //
+
+ _statusFilterView = new YQPkgStatusFilterView( parent );
+ CHECK_PTR( _statusFilterView );
+
+ _searchFilterView->setSizePolicy( QSizePolicy::Minimum, // horizontal
+ QSizePolicy::Minimum ); // vertical
+
+ _secondaryFilters->addPage( _( "Installation Summary" ), _statusFilterView );
+
+ connect( _statusFilterView, SIGNAL( filterStart() ),
+ _repoList, SLOT ( filter() ) );
+
+
+ return _secondaryFilters;
+}
+
+
+void YQPkgRepoFilterView::filter()
+{
+ _repoList->filter();
+}
+
+
+void YQPkgRepoFilterView::filterIfVisible()
+{
+ _repoList->filterIfVisible();
+}
+
+
+void YQPkgRepoFilterView::primaryFilterMatch( ZyppSel selectable,
+ ZyppPkg pkg )
+{
+ if ( secondaryFilterMatch( selectable, pkg ) )
+ emit filterMatch( selectable, pkg );
+}
+
+
+void YQPkgRepoFilterView::primaryFilterNearMatch( ZyppSel selectable,
+ ZyppPkg pkg )
+{
+ if ( secondaryFilterMatch( selectable, pkg ) )
+ emit filterNearMatch( selectable, pkg );
+}
+
+
+bool
+YQPkgRepoFilterView::secondaryFilterMatch( ZyppSel selectable,
+ ZyppPkg pkg )
+{
+ if ( _allPackages->isVisible() )
+ {
+ return true;
+ }
+ else if ( _unmaintainedPackages->isVisible() )
+ {
+ return ( selectable->availableSize() == 0 );
+ }
+ else if ( _rpmGroupTagsFilterView->isVisible() )
+ {
+ return _rpmGroupTagsFilterView->check( selectable, pkg );
+ }
+ else if ( _searchFilterView->isVisible() )
+ {
+ return _searchFilterView->check( selectable, pkg );
+ }
+ else if ( _statusFilterView->isVisible() )
+ {
+ return _statusFilterView->check( selectable, pkg );
+ }
+ else
+ {
+ return true;
+ }
+}
+
+
+
+
+
+
+#include "YQPkgRepoFilterView.moc"
Added: branches/tmp/dmacvicar/zc10/qt/src/YQPkgRepoFilterView.lo
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgRepoFilterView.lo (added)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgRepoFilterView.lo Wed Mar 23 17:01:11 2011
@@ -0,0 +1,12 @@
+# YQPkgRepoFilterView.lo - a libtool object file
+# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object='.libs/YQPkgRepoFilterView.o'
+
+# Name of the non-PIC object.
+non_pic_object=none
+
Added: branches/tmp/dmacvicar/zc10/qt/src/YQPkgRepoList.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgRepoList.cc (added)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgRepoList.cc Wed Mar 23 17:01:11 2011
@@ -0,0 +1,306 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: YQPkgRepoList.cc
+
+ Author: Stefan Hundhammer <sh(a)suse.de>
+
+ Textdomain "qt-pkg"
+
+/-*/
+
+#include <algorithm>
+#include <qdatetime.h>
+#include <qpixmap.h>
+
+#define YUILogComponent "qt-pkg"
+#include "ycp/y2log.h"
+#include <zypp/RepoManager.h>
+#include <zypp/PoolQuery.h>
+
+#include <qlistview.h>
+#include "YQPkgRepoList.h"
+#include "YQi18n.h"
+#include "utf8.h"
+
+using std::string;
+using std::list;
+using std::set;
+using std::vector;
+
+
+YQPkgRepoList::YQPkgRepoList( QWidget * parent )
+ : QY2ListView( parent )
+{
+ y2debug("Creating repository list");
+
+ _nameCol = -1;
+ _urlCol = -1;
+
+ int numCol = 0;
+
+ // Column headers for installation source list
+ addColumn( _( "Name" ) ); _nameCol = numCol++;
+ addColumn( _( "URL" ) ); _urlCol = numCol++;
+ setAllColumnsShowFocus( true );
+ setSelectionMode( QListView::Extended ); // allow multi-selection with Ctrl-mouse
+
+ setAllColumnsShowFocus( true );
+ setSelectionMode( QListView::Extended ); // allow multi-selection with Ctrl-mouse
+
+ connect( this, SIGNAL( itemSelectionChanged() ),
+ this, SLOT ( filterIfVisible()) );
+ //setIconSize(QSize(32,32));
+ fillList();
+ //setSortingEnabled( true );
+ //sortByColumn( nameCol(), Qt::AscendingOrder );
+ selectSomething();
+
+ y2debug("Creating repository list done");
+}
+
+
+YQPkgRepoList::~YQPkgRepoList()
+{
+ // NOP
+}
+
+
+void
+YQPkgRepoList::fillList()
+{
+ clear();
+ y2debug("Filling repository list");
+
+ for ( ZyppRepositoryIterator it = ZyppRepositoriesBegin();
+ it != ZyppRepositoriesEnd();
+ ++it )
+ {
+ addRepo( *it );
+ }
+
+ y2debug("Inst repository filled");
+}
+
+
+int
+YQPkgRepoList::countEnabledRepositories()
+{
+ return zyppPool().knownRepositoriesSize();
+}
+
+
+void
+YQPkgRepoList::filterIfVisible()
+{
+ if ( isVisible() )
+ filter();
+}
+
+
+void
+YQPkgRepoList::filter()
+{
+ emit filterStart();
+
+ y2milestone("Collecting packages in selected repositories...");
+ QTime stopWatch;
+ stopWatch.start();
+
+
+ //
+ // Collect all packages on this repository
+ //
+
+ QListViewItem * item = firstChild();
+
+ while ( item )
+ {
+
+ if ( item->isSelected() )
+ {
+ YQPkgRepoListItem * repoItem = dynamic_cast<YQPkgRepoListItem *> (item);
+
+ if ( repoItem )
+ {
+ ZyppRepo currentRepo = repoItem->zyppRepo();
+
+ zypp::PoolQuery query;
+ query.addRepo( currentRepo.info().alias() );
+ query.addKind(zypp::ResKind::package);
+
+ for( zypp::PoolQuery::Selectable_iterator it = query.selectableBegin();
+ it != query.selectableEnd(); it++)
+ {
+ emit filterMatch( *it, tryCastToZyppPkg( (*it)->theObj() ) );
+ }
+ }
+ }
+ }
+
+ y2debug("Packages sent to package list. Elapsed time: %f sec", stopWatch.elapsed() / 1000.0);
+
+ emit filterFinished();
+}
+
+
+void
+YQPkgRepoList::addRepo( ZyppRepo repo )
+{
+ new YQPkgRepoListItem( this, repo );
+}
+
+
+YQPkgRepoListItem *
+YQPkgRepoList::selection() const
+{
+ QListViewItem * item = currentItem();
+
+ if ( ! item )
+ return 0;
+
+ return dynamic_cast<YQPkgRepoListItem *> (item);
+}
+
+
+
+
+
+
+YQPkgRepoListItem::YQPkgRepoListItem( YQPkgRepoList * repoList,
+ ZyppRepo repo )
+ : QY2ListViewItem( repoList )
+ , _repoList( repoList )
+ , _zyppRepo( repo )
+{
+ if ( nameCol() >= 0 )
+ {
+ string name = repo.info().name();
+ if ( ! name.empty() )
+ {
+ setText( nameCol(), fromUTF8( name ));
+ }
+ }
+
+ std::string infoToolTip;
+ infoToolTip += ("<b>" + repo.info().name() + "</b>");
+
+ ZyppProduct product = singleProduct( _zyppRepo );
+ if ( product )
+ {
+ infoToolTip += ("<p>" + product->summary() + "</p>");
+ }
+
+ if ( ! repo.info().baseUrlsEmpty() )
+ {
+ zypp::RepoInfo::urls_const_iterator it;
+ infoToolTip += "<ul>";
+
+ for ( it = repo.info().baseUrlsBegin();
+ it != repo.info().baseUrlsEnd();
+ ++it )
+ {
+ infoToolTip += ("<li>" + (*it).asString() + "</li>");
+ }
+ infoToolTip += "</ul>";
+ }
+ //setToolTip( nameCol(), infoToolTip.c_str() );
+
+ QString iconPath;
+ QString iconName = "yast-sw_source";
+
+ if ( ! repo.info().baseUrlsEmpty() )
+ {
+ zypp::Url repoUrl = *repo.info().baseUrlsBegin();
+
+ if ( urlCol() >= 0 )
+ {
+ setText( urlCol(), repoUrl.asString().c_str() );
+ }
+
+ if (QString(repoUrl.asString().c_str()).contains("KDE") )
+ iconName = "pattern-kde";
+ if (QString(repoUrl.asString().c_str()).contains("GNOME") )
+ iconName = "pattern-gnome";
+ if (QString(repoUrl.asString().c_str()).contains("KDE") )
+ iconName = "pattern-kde";
+ if (QString(repoUrl.asString().c_str()).contains("update") )
+ iconName = "yast-update";
+ if (QString(repoUrl.asString().c_str()).contains("home:") )
+ iconName = "yast-users";
+ }
+
+ if ( repo.isSystemRepo() )
+ iconName = "yast-host";
+
+
+ setPixmap( 0, QPixmap( iconPath.sprintf("/usr/share/icons/hicolor/48x48/apps/%s.png", iconName.ascii()) ));
+}
+
+
+
+YQPkgRepoListItem::~YQPkgRepoListItem()
+{
+ // NOP
+}
+
+
+ZyppProduct
+YQPkgRepoListItem::singleProduct( ZyppRepo zyppRepo )
+{
+ ZyppProduct product;
+
+ zypp::ResPool::byKind_iterator it = zypp::ResPool::instance().byKindBegin( zypp::ResKind::product );
+ zypp::ResPool::byKind_iterator end = zypp::ResPool::instance().byKindEnd( zypp::ResKind::product );
+
+ //
+ // Find the first product on this repository
+ //
+
+ while ( it != end && ! product )
+ {
+ if ( it->resolvable()->repoInfo().alias() == zyppRepo.info().alias() )
+ product = zypp::asKind<zypp::Product>( it->resolvable() );
+ ++it;
+ }
+
+ //
+ // Check if there is another product on this repository
+ //
+
+ while ( it != end )
+ {
+ if ( it->resolvable()->repoInfo().alias() == zyppRepo.info().alias() )
+ {
+ y2milestone("Multiple products in repository %s", zyppRepo.info().alias().c_str());
+ ZyppProduct null;
+ return null;
+ }
+
+ ++it;
+ }
+
+ if ( ! product )
+ y2milestone("No product in repository ", zyppRepo.info().alias().c_str());
+
+ return product;
+}
+
+bool
+YQPkgRepoListItem::operator< ( const QListViewItem & other ) const
+{
+ const YQPkgRepoListItem * otherItem = dynamic_cast<const YQPkgRepoListItem *>(&other);
+
+ return zyppRepo().info().name() < otherItem->zyppRepo().info().name();
+}
+
+#include "YQPkgRepoList.moc"
Added: branches/tmp/dmacvicar/zc10/qt/src/YQPkgRepoList.lo
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/YQP…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/YQPkgRepoList.lo (added)
+++ branches/tmp/dmacvicar/zc10/qt/src/YQPkgRepoList.lo Wed Mar 23 17:01:11 2011
@@ -0,0 +1,12 @@
+# YQPkgRepoList.lo - a libtool object file
+# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object='.libs/YQPkgRepoList.o'
+
+# Name of the non-PIC object.
+non_pic_object=none
+
Modified: branches/tmp/dmacvicar/zc10/qt/src/include/YQPackageSelector.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/inc…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/include/YQPackageSelector.h (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/include/YQPackageSelector.h Wed Mar 23 17:01:11 2011
@@ -46,7 +46,7 @@
class YQPkgDescriptionView;
class YQPkgDiskUsageList;
class YQPkgFileListView;
-class YQPkgInstSrcFilterView;
+class YQPkgRepoFilterView;
class YQPkgLangList;
class YQPkgList;
class YQPkgPatternList;
@@ -301,13 +301,12 @@
YQPkgDependenciesView * _pkgDependenciesView;
YQPkgDescriptionView * _pkgDescriptionView;
YQPkgFileListView * _pkgFileListView;
- YQPkgInstSrcFilterView * _instSrcFilterView;
+ YQPkgRepoFilterView * _instSrcFilterView;
YQPkgLangList * _langList;
YQPkgList * _pkgList;
YQPkgPatternList * _patternList;
YQPkgRpmGroupTagsFilterView * _rpmGroupTagsFilterView;
YQPkgSearchFilterView * _searchFilterView;
- YQPkgSelList * _selList;
YQPkgStatusFilterView * _statusFilterView;
YQPkgTechnicalDetailsView * _pkgTechnicalDetailsView;
YQPkgUpdateProblemFilterView * _updateProblemFilterView;
Modified: branches/tmp/dmacvicar/zc10/qt/src/include/YQPatternSelector.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/inc…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/include/YQPatternSelector.h (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/include/YQPatternSelector.h Wed Mar 23 17:01:11 2011
@@ -31,7 +31,6 @@
class QPushButton;
class YQPkgSelDescriptionView;
-class YQPkgSelList;
class YQPkgPatternList;
class YQWizard;
@@ -84,7 +83,6 @@
- YQPkgSelList * _selList;
YQPkgPatternList * _patternList;
YQPkgSelDescriptionView * _descriptionView;
YQWizard * _wizard;
Modified: branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgDependenciesView.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/inc…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgDependenciesView.h (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgDependenciesView.h Wed Mar 23 17:01:11 2011
@@ -16,8 +16,6 @@
/-*/
-// -*- c++ -*-
-
#ifndef YQPkgDependenciesView_h
#define YQPkgDependenciesView_h
@@ -82,18 +80,18 @@
* Returns an empty string if capSet is empty.
**/
static QString row( const QString & heading,
- const zypp::CapSet & capSet );
+ const zypp::Capabilities & capSet );
/**
- * Format two zypp::CapSets (describing zypp::Dep::REQUIRES etc.)
+ * Format two zypp::Capabilities (describing zypp::Dep::REQUIRES etc.)
* with a heading in HTML lines.
*
* Returns an empty string both capSets are empty.
**/
static QString row( const QString & heading,
- const zypp::CapSet & capSet1,
- const zypp::CapSet & capSet2 );
+ const zypp::Capabilities & capSet1,
+ const zypp::Capabilities & capSet2 );
/**
* Returns a string containing a HTML table row with 'contents'.
@@ -102,13 +100,13 @@
**/
static QString row( const QString & contents )
{ return YQPkgGenericDetailsView::row( contents ); }
-
+
/**
- * Format a zypp::CapSet (describing zypp::Dep::REQUIRES etc.)
+ * Format a zypp::Capabilities (describing zypp::Dep::REQUIRES etc.)
* in HTML lines, separated with <BR>.
* Returns an empty string if capSet is empty.
**/
- static QString htmlLines( const zypp::CapSet & capSet );
+ static QString htmlLines( const zypp::Capabilities & capSet );
};
Modified: branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgLangList.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/inc…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgLangList.h (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgLangList.h Wed Mar 23 17:01:11 2011
@@ -16,8 +16,6 @@
/-*/
-// -*- c++ -*-
-
#ifndef YQPkgLangList_h
#define YQPkgLangList_h
@@ -27,7 +25,6 @@
class YQPkgLangListItem;
-
/**
* @short Display a list of zypp::Selection objects.
**/
@@ -70,10 +67,13 @@
* this slot. Remember to connect filterStart() to clear() (inherited from
* QListView).
**/
- void addLangItem( ZyppSel selectable,
- ZyppLang lang );
+ void addLangItem( const zypp::Locale & lang );
+
+ /**
+ * update from base class to not access selectables
+ **/
+ virtual void updateActions( YQPkgObjListItem * item = 0);
-
public:
/**
@@ -120,9 +120,8 @@
* Constructor. Creates a YQPkgLangList item that corresponds to the package
* manager object that 'pkg' refers to.
**/
- YQPkgLangListItem( YQPkgLangList * pkgSelList,
- ZyppSel selectable,
- ZyppLang lang );
+ YQPkgLangListItem( YQPkgLangList * pkgSelList,
+ const zypp::Locale & lang );
/**
* Destructor
@@ -132,13 +131,39 @@
/**
* Returns the original object within the package manager backend.
**/
- ZyppLang zyppLang() const { return _zyppLang; }
+ zypp::Locale zyppLang() const { return _zyppLang; }
+ /// overloaded
+ virtual void init();
// Columns
int statusCol() const { return _langList->statusCol(); }
+ /**
+ * override this two as we don't have a real selectable and
+ * the status depends on the language
+ **/
+ virtual ZyppStatus status() const;
+ virtual void setStatus( ZyppStatus newStatus, bool sendSignals = true );
+
+ /**
+ * Returns 'true' if this selectable's status is set by a selection
+ * (rather than by the user or by the dependency solver).
+ **/
+ virtual bool bySelection() const;
+
+ /**
+ * Cycle the package status to the next valid value.
+ **/
+ virtual void cycleStatus();
+
+ /**
+ * Sorting function. Redefined here (bnc#428355) as the one from
+ * parent YQPkgObjList can't be used - it refers to zyppObj's which
+ * are NULL here as zypp::Locale is not zypp::ResObject anymore
+ **/
+ virtual bool operator< ( const QListViewItem & other ) const;
protected:
@@ -154,7 +179,7 @@
// Data members
YQPkgLangList * _langList;
- ZyppLang _zyppLang;
+ zypp::Locale _zyppLang;
};
Added: branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgRepoFilterView.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/inc…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgRepoFilterView.h (added)
+++ branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgRepoFilterView.h Wed Mar 23 17:01:11 2011
@@ -0,0 +1,142 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: YQPkgRepoFilterView.h
+
+ Author: Stefan Hundhammer <sh(a)suse.de>
+
+/-*/
+
+
+#ifndef YQPkgRepoFilterView_h
+#define YQPkgRepoFilterView_h
+
+#include "YQZypp.h"
+#include <qwidget.h>
+
+
+class YQPkgRepoList;
+class QY2ComboTabWidget;
+class YQPkgRpmGroupTagsFilterView;
+class YQPkgSearchFilterView;
+class YQPkgStatusFilterView;
+
+
+class YQPkgRepoFilterView : public QWidget
+{
+ Q_OBJECT
+
+public:
+
+ /**
+ * Constructor
+ **/
+ YQPkgRepoFilterView( QWidget * parent );
+
+ /**
+ * Destructor
+ **/
+ virtual ~YQPkgRepoFilterView();
+
+ /**
+ * Current selected repository, or if nothing is selected
+ */
+ zypp::Repository selectedRepo() const;
+
+signals:
+
+ /**
+ * Emitted when the filtering starts. Use this to clear package lists
+ * etc. prior to adding new entries.
+ **/
+ void filterStart();
+
+ /**
+ * Emitted during filtering for each pkg that matches the filter
+ * and the candidate package comes from the respective repository
+ **/
+ void filterMatch( ZyppSel selectable,
+ ZyppPkg pkg );
+
+ /**
+ * Emitted during filtering for each pkg that matches the filter
+ * and the candidate package does not come from the respective repository
+ **/
+ void filterNearMatch( ZyppSel selectable,
+ ZyppPkg pkg );
+
+ /**
+ * Emitted when filtering is finished.
+ **/
+ void filterFinished();
+
+public slots:
+
+ /**
+ * Filter according to the view's rules and current selection.
+ * Emits those signals:
+ * filterStart()
+ * filterMatch() for each pkg that matches the filter
+ * filterFinished()
+ **/
+ void filter();
+
+ /**
+ * Same as filter(), but only if this widget is currently visible.
+ **/
+ void filterIfVisible();
+
+
+protected slots:
+
+ /**
+ * Propagate a filter match from the primary filter
+ * and appy any selected secondary filter(s) to it
+ **/
+ void primaryFilterMatch( ZyppSel selectable,
+ ZyppPkg pkg );
+
+ /**
+ * Propagate a filter near match from the primary filter
+ * and appy any selected secondary filter(s) to it
+ **/
+ void primaryFilterNearMatch( ZyppSel selectable,
+ ZyppPkg pkg );
+
+protected:
+
+ /**
+ * Widget layout for the secondary filters
+ **/
+ QWidget * layoutSecondaryFilters( QWidget * parent );
+
+ /**
+ * Check if pkg matches the the currently selected secondary filter
+ **/
+ bool secondaryFilterMatch( ZyppSel selectable,
+ ZyppPkg pkg );
+
+
+ // Data members
+
+ YQPkgRepoList * _repoList;
+ QY2ComboTabWidget * _secondaryFilters;
+ QWidget * _allPackages;
+ QWidget *_unmaintainedPackages;
+ YQPkgRpmGroupTagsFilterView * _rpmGroupTagsFilterView;
+ YQPkgSearchFilterView * _searchFilterView;
+ YQPkgStatusFilterView * _statusFilterView;
+};
+
+
+
+#endif // ifndef YQPkgRepoFilterView_h
Added: branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgRepoList.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/inc…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgRepoList.h (added)
+++ branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgRepoList.h Wed Mar 23 17:01:11 2011
@@ -0,0 +1,190 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: YQPkgRepoList.h
+
+ Author: Stefan Hundhammer <sh(a)suse.de>
+
+/-*/
+
+
+#ifndef YQPkgRepoList_h
+#define YQPkgRepoList_h
+
+#include "YQZypp.h"
+#include "QY2ListView.h"
+#include <zypp/Repository.h>
+#include <zypp/Product.h>
+
+
+class YQPkgRepoListItem;
+
+typedef zypp::Repository ZyppRepo;
+
+
+/**
+ * @short Display a list of zypp::Selection objects.
+ **/
+class YQPkgRepoList : public QY2ListView
+{
+ Q_OBJECT
+
+public:
+
+ /**
+ * Constructor
+ **/
+ YQPkgRepoList( QWidget * parent );
+
+ /**
+ * Destructor
+ **/
+ virtual ~YQPkgRepoList();
+
+ /**
+ * Returns the number of enabled repositories.
+ **/
+ static int countEnabledRepositories();
+
+
+public slots:
+
+ /**
+ * Filter according to the view's rules and current selection.
+ * Emits those signals:
+ * filterStart()
+ * filterMatch() for each pkg that matches the filter
+ * filterFinished()
+ **/
+ void filter();
+
+ /**
+ * Same as filter(), but only if this widget is currently visible.
+ **/
+ void filterIfVisible();
+
+ /**
+ * Add a repository to the list.
+ **/
+ void addRepo( ZyppRepo repo );
+
+
+public:
+
+ // Column numbers
+
+ int nameCol() const { return _nameCol; }
+ int urlCol() const { return _urlCol; }
+
+
+ /**
+ * Returns the currently selected item or 0 if there is none.
+ **/
+ YQPkgRepoListItem * selection() const;
+
+
+signals:
+
+ /**
+ * Emitted when the filtering starts. Use this to clear package lists
+ * etc. prior to adding new entries.
+ **/
+ void filterStart();
+
+ /**
+ * Emitted during filtering for each pkg that matches the filter
+ * and the candidate package comes from the respective repository
+ **/
+ void filterMatch( ZyppSel selectable,
+ ZyppPkg pkg );
+
+ /**
+ * Emitted during filtering for each pkg that matches the filter
+ * and the candidate package does not come from the respective repository
+ **/
+ void filterNearMatch( ZyppSel selectable,
+ ZyppPkg pkg );
+
+ /**
+ * Emitted when filtering is finished.
+ **/
+ void filterFinished();
+
+
+protected slots:
+
+ /**
+ * Fill the list.
+ **/
+ void fillList();
+
+
+private:
+
+ //
+ // Data members
+ //
+
+ int _nameCol;
+ int _urlCol;
+
+};
+
+
+
+class YQPkgRepoListItem: public QY2ListViewItem
+{
+public:
+
+ /**
+ * Constructor
+ **/
+ YQPkgRepoListItem( YQPkgRepoList *parentList, ZyppRepo repo );
+
+ /**
+ * Destructor
+ **/
+ virtual ~YQPkgRepoListItem();
+
+ /**
+ * Returns the ZYPP repository this item corresponds to
+ **/
+ ZyppRepo zyppRepo() const { return _zyppRepo; }
+
+ /**
+ * Returns the parent list
+ **/
+ const YQPkgRepoList * repoList() const { return _repoList; }
+
+ /**
+ * Returns the product on a source if it has one single product
+ * or 0 if there are no or multiple products.
+ **/
+ static ZyppProduct singleProduct( ZyppRepo repo );
+
+
+ // Columns
+
+ int nameCol() const { return _repoList->nameCol(); }
+ int urlCol() const { return _repoList->urlCol(); }
+
+ virtual bool operator< ( const QListViewItem & other ) const;
+protected:
+
+ // Data members
+
+ YQPkgRepoList * _repoList;
+ ZyppRepo _zyppRepo;
+};
+
+
+#endif // ifndef YQPkgRepoList_h
Modified: branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgSearchFilterView.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/inc…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgSearchFilterView.h (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/include/YQPkgSearchFilterView.h Wed Mar 23 17:01:11 2011
@@ -146,7 +146,7 @@
* zypp::Resolvable::dep( zypp::Dep::PROVIDES ),
* zypp::Resolvable::dep( zypp::Dep::REQUIRES )
**/
- bool check( const zypp::CapSet & capSet, const QRegExp & regexp );
+ bool check( const zypp::Capabilities & capSet, const QRegExp & regexp );
/**
* Key press event: Execute search upon 'Return'
Modified: branches/tmp/dmacvicar/zc10/qt/src/include/YQZypp.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/dmacvicar/zc10/qt/src/inc…
==============================================================================
--- branches/tmp/dmacvicar/zc10/qt/src/include/YQZypp.h (original)
+++ branches/tmp/dmacvicar/zc10/qt/src/include/YQZypp.h Wed Mar 23 17:01:11 2011
@@ -16,7 +16,6 @@
/-*/
-// -*- c++ -*-
#ifndef YQZypp_h
#define YQZypp_h
@@ -26,9 +25,7 @@
#include <zypp/ui/Selectable.h>
#include <zypp/ResObject.h>
#include <zypp/Package.h>
-#include <zypp/Selection.h>
#include <zypp/Pattern.h>
-#include <zypp/Language.h>
#include <zypp/Patch.h>
#include <zypp/Product.h>
#include <zypp/ZYppFactory.h>
@@ -36,17 +33,16 @@
#define FORCE_FULL_SOLVER_RUN_FILE "/var/lib/YaST2/force_full_solver_run"
-
-using zypp::ui::S_Protected;
-using zypp::ui::S_Taboo;
-using zypp::ui::S_Del;
-using zypp::ui::S_Update;
-using zypp::ui::S_Install;
-using zypp::ui::S_AutoDel;
-using zypp::ui::S_AutoUpdate;
-using zypp::ui::S_AutoInstall;
-using zypp::ui::S_KeepInstalled;
-using zypp::ui::S_NoInst;
+using zypp::ui::S_Protected;
+using zypp::ui::S_Taboo;
+using zypp::ui::S_Del;
+using zypp::ui::S_Update;
+using zypp::ui::S_Install;
+using zypp::ui::S_AutoDel;
+using zypp::ui::S_AutoUpdate;
+using zypp::ui::S_AutoInstall;
+using zypp::ui::S_KeepInstalled;
+using zypp::ui::S_NoInst;
//
@@ -57,15 +53,14 @@
typedef zypp::ui::Selectable::Ptr ZyppSel;
typedef zypp::ResObject::constPtr ZyppObj;
typedef zypp::Package::constPtr ZyppPkg;
-typedef zypp::Selection::constPtr ZyppSelection;
typedef zypp::Pattern::constPtr ZyppPattern;
-typedef zypp::Language::constPtr ZyppLang;
typedef zypp::Patch::constPtr ZyppPatch;
typedef zypp::Product::constPtr ZyppProduct;
+typedef zypp::PoolItem ZyppPoolItem;
typedef zypp::ResPoolProxy ZyppPool;
typedef zypp::ResPoolProxy::const_iterator ZyppPoolIterator;
-
+typedef zypp::ResPoolProxy::repository_iterator ZyppRepositoryIterator;
inline ZyppPool zyppPool() { return zypp::getZYpp()->poolProxy(); }
@@ -75,42 +70,28 @@
inline ZyppPoolIterator zyppPkgBegin() { return zyppBegin<zypp::Package>(); }
inline ZyppPoolIterator zyppPkgEnd() { return zyppEnd<zypp::Package>(); }
-inline ZyppPoolIterator zyppSelectionsBegin() { return zyppBegin<zypp::Selection>(); }
-inline ZyppPoolIterator zyppSelectionsEnd() { return zyppEnd<zypp::Selection>(); }
-
inline ZyppPoolIterator zyppPatternsBegin() { return zyppBegin<zypp::Pattern>(); }
inline ZyppPoolIterator zyppPatternsEnd() { return zyppEnd<zypp::Pattern>(); }
-inline ZyppPoolIterator zyppLangBegin() { return zyppBegin<zypp::Language>(); }
-inline ZyppPoolIterator zyppLangEnd() { return zyppEnd<zypp::Language>(); }
-
inline ZyppPoolIterator zyppPatchesBegin() { return zyppBegin<zypp::Patch>(); }
inline ZyppPoolIterator zyppPatchesEnd() { return zyppEnd<zypp::Patch>(); }
inline ZyppPoolIterator zyppProductsBegin() { return zyppBegin<zypp::Product>(); }
inline ZyppPoolIterator zyppProductsEnd() { return zyppEnd<zypp::Product>(); }
+inline ZyppRepositoryIterator ZyppRepositoriesBegin() { return zyppPool().knownRepositoriesBegin(); }
+inline ZyppRepositoryIterator ZyppRepositoriesEnd() { return zyppPool().knownRepositoriesEnd(); }
inline ZyppPkg tryCastToZyppPkg( ZyppObj zyppObj )
{
return zypp::dynamic_pointer_cast<const zypp::Package>( zyppObj );
}
-inline ZyppSelection tryCastToZyppSelection( ZyppObj zyppObj )
-{
- return zypp::dynamic_pointer_cast<const zypp::Selection>( zyppObj );
-}
-
inline ZyppPattern tryCastToZyppPattern( ZyppObj zyppObj )
{
return zypp::dynamic_pointer_cast<const zypp::Pattern>( zyppObj );
}
-inline ZyppLang tryCastToZyppLang( ZyppObj zyppObj )
-{
- return zypp::dynamic_pointer_cast<const zypp::Language>( zyppObj );
-}
-
inline ZyppPatch tryCastToZyppPatch( ZyppObj zyppObj )
{
return zypp::dynamic_pointer_cast<const zypp::Patch>( zyppObj );
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
23 Mar '11
Author: jsuchome
Date: Wed Mar 23 15:00:41 2011
New Revision: 63653
URL: http://svn.opensuse.org/viewcvs/yast?rev=63653&view=rev
Log:
Created tag stable-2_21_0 for samba-client
Added:
tags/stable-2_21_0/samba-client/
- copied from r63652, trunk/samba-client/
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r63652 - in /trunk/samba-client: VERSION package/yast2-samba-client.changes src/routines.ycp
by jsuchome@svn2.opensuse.org 23 Mar '11
by jsuchome@svn2.opensuse.org 23 Mar '11
23 Mar '11
Author: jsuchome
Date: Wed Mar 23 15:00:08 2011
New Revision: 63652
URL: http://svn.opensuse.org/viewcvs/yast?rev=63652&view=rev
Log:
- aborting in Stage::cont does not abort installation (bnc#678650)
- 2.21.0
Modified:
trunk/samba-client/VERSION
trunk/samba-client/package/yast2-samba-client.changes
trunk/samba-client/src/routines.ycp
Modified: trunk/samba-client/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/VERSION?rev=63652&r…
==============================================================================
--- trunk/samba-client/VERSION (original)
+++ trunk/samba-client/VERSION Wed Mar 23 15:00:08 2011
@@ -1 +1 @@
-2.20.2
+2.21.0
Modified: trunk/samba-client/package/yast2-samba-client.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/package/yast2-samba…
==============================================================================
--- trunk/samba-client/package/yast2-samba-client.changes (original)
+++ trunk/samba-client/package/yast2-samba-client.changes Wed Mar 23 15:00:08 2011
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Wed Mar 23 12:40:12 CET 2011 - jsuchome(a)suse.cz
+
+- aborting in Stage::cont does not abort installation (bnc#678650)
+- 2.21.0
+
+-------------------------------------------------------------------
Wed Jan 5 15:59:27 CET 2011 - jsuchome(a)suse.cz
- import all config file sections, not only [global]
Modified: trunk/samba-client/src/routines.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/src/routines.ycp?re…
==============================================================================
--- trunk/samba-client/src/routines.ycp (original)
+++ trunk/samba-client/src/routines.ycp Wed Mar 23 15:00:08 2011
@@ -132,9 +132,7 @@
* @return true if abort is confirmed
*/
define boolean ReallyAbort() ``{
- return (Stage::cont() && !contains (WFM::Args (), "from_users")) ?
- Popup::ConfirmAbort (`incomplete) :
- (!Samba::GetModified() || Popup::ReallyAbort(true));
+ return (Samba::GetModified () || Stage::cont ()) ? Popup::ReallyAbort (true) : true;
}
/**
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
23 Mar '11
Author: jsuchome
Date: Wed Mar 23 15:00:08 2011
New Revision: 63651
URL: http://svn.opensuse.org/viewcvs/yast?rev=63651&view=rev
Log:
Created tag stable-2_21_0 for nis-client
Added:
tags/stable-2_21_0/nis-client/
- copied from r63650, trunk/nis-client/
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0