From: Ján Kupec Date: Sun, 7 Jun 2009 13:23:25 +0000 (+0200) Subject: Remove deprecated zypp::Product::type() calls. X-Git-Tag: 1.2.6~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ce0a422ca97ad72e6936ca768e7fc4f5b4a35af;p=platform%2Fupstream%2Fzypper.git Remove deprecated zypp::Product::type() calls. - Is Base: Yes/No is shown instead - in rug mode, Category: base/(empty) is shown --- diff --git a/src/info.cc b/src/info.cc index a3bccb6..92ff694 100644 --- a/src/info.cc +++ b/src/info.cc @@ -399,10 +399,14 @@ void printProductInfo(Zypper & zypper, const ui::Selectable & s) printNVA(pool_item.resolvable()); Product::constPtr product = asKind(pool_item.resolvable()); - cout << _("Category") << ": " << product->type() << endl; - cout << _("Flavor") << ": " << product->flavor() << endl; - cout << _("Installed") << ": " << (pool_item.status().isInstalled() ? "Yes" : "No") << endl; - cout << _("Short Name") << ": " << product->shortName() << endl; + cout << _("Is Base") << ": " + << (product->isTargetDistribution() ? _("Yes") : _("No")) << endl; + cout << _("Flavor") << ": " + << product->flavor() << endl; + cout << _("Installed") << ": " + << (pool_item.status().isInstalled() ? _("Yes") : _("No")) << endl; + cout << _("Short Name") + << ": " << product->shortName() << endl; printSummaryDesc(pool_item.resolvable()); } } diff --git a/src/search.cc b/src/search.cc index 24a69b2..89649d9 100644 --- a/src/search.cc +++ b/src/search.cc @@ -538,11 +538,10 @@ static void list_product_table(Zypper & zypper) th << _("Name"); th << _("Version"); if (zypper.globalOpts().is_rug_compatible) - // translators: product category (the rug term) + // translators: product category (base/addon), the rug term th << _("Category"); else - // translators: product type (addon/base) (rug calls it Category) - th << _("Type"); + th << _("Is Base"); tbl << th; bool installed_only = zypper.cOpts().count("installed-only"); @@ -569,7 +568,10 @@ static void list_product_table(Zypper & zypper) tr << ""; } tr << product->name () << product->edition().asString(); - tr << product->type(); + if (zypper.globalOpts().is_rug_compatible) + tr << (product->isTargetDistribution() ? "base" : ""); + else + tr << (product->isTargetDistribution() ? _("Yes") : _("No")); tbl << tr; } tbl.sort(1); // Name