From 231e04f8910baff810ed1711057d0ed2fd122b98 Mon Sep 17 00:00:00 2001 From: Michael Andres Date: Wed, 12 Sep 2012 13:47:33 +0200 Subject: [PATCH] Use edition style on table columns - Fixes issue#11 --- src/search.cc | 12 ++++++------ src/update.cc | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/search.cc b/src/search.cc index ef9d6ef..b77efe6 100644 --- a/src/search.cc +++ b/src/search.cc @@ -56,7 +56,7 @@ FillSearchTableSolvable::FillSearchTableSolvable( // translators: name (general header) << _("Name") // translators: package version (header) - << _("Version") + << table::EditionStyleSetter( *_table, _("Version") ) // translators: package architecture (header) << _("Arch"); } @@ -70,7 +70,7 @@ FillSearchTableSolvable::FillSearchTableSolvable( // translators: type (general header) << _("Type") // translators: package version (header) - << _("Version") + << table::EditionStyleSetter( *_table, _("Version") ) // translators: package architecture (header) << _("Arch") // translators: package's repository (header) @@ -353,7 +353,7 @@ FillPatchesTable::FillPatchesTable( Table & table, zypp::TriBool inst_notinst ) // translators: catalog (rug's word for repository) (header) << _("Catalog") << _("Name") - << _("Version") + << table::EditionStyleSetter( *_table, ("Version") ) // translators: patch category (recommended, security) << _("Category") // translators: patch status (installed, uninstalled, needed) @@ -476,7 +476,7 @@ static void list_pattern_table(Zypper & zypper) // translators: S for installed Status th << _("S"); - th << _("Name") << _("Version"); + th << _("Name") << table::EditionStyleSetter( tbl, _("Version") ); if (!zypper.globalOpts().is_rug_compatible) th << _("Repository") << _("Dependency"); tbl << th; @@ -540,7 +540,7 @@ void list_packages(Zypper & zypper) th << _("Bundle"); else th << _("Repository"); - th << _("Name") << _("Version") << _("Arch"); + th << _("Name") << table::EditionStyleSetter( tbl, _("Version") ) << _("Arch"); tbl << th; bool installed_only = zypper.cOpts().count("installed-only"); @@ -657,7 +657,7 @@ static void list_product_table(Zypper & zypper) // product whereas simply Name is the official full name of the product. th << _("Internal Name"); th << _("Name"); - th << _("Version"); + th << table::EditionStyleSetter( tbl, _("Version") ); if (zypper.globalOpts().is_rug_compatible) // translators: product category (base/addon), the rug term th << _("Category"); diff --git a/src/update.cc b/src/update.cc index 977926d..0c6fdde 100755 --- a/src/update.cc +++ b/src/update.cc @@ -258,7 +258,7 @@ static bool list_patch_updates(Zypper & zypper) unsigned cols; th << (zypper.globalOpts().is_rug_compatible ? _("Catalog") : _("Repository")) - << _("Name") << _("Version") << _("Category")<< _("Status") << _("Summary"); + << _("Name") << table::EditionStyleSetter( tbl, _("Version") ) << _("Category") << _("Status") << _("Summary"); cols = 6; tbl << th; pm_tbl << th; @@ -497,8 +497,8 @@ void list_updates(Zypper & zypper, const ResKindSet & kinds, bool best_effort) if (!best_effort) { if (*it == ResKind::package) - th << _("Current Version"); - th << _("Available Version") << _("Arch"); + th << table::EditionStyleSetter( tbl, _("Current Version") ); + th << table::EditionStyleSetter( tbl, _("Available Version") ) << _("Arch"); } tbl << th; @@ -677,7 +677,7 @@ void list_patches_by_issue(Zypper & zypper) // look for matches in patch descriptions Table t1; TableHeader th1; - th1 << _("Name") << _("Version") << _("Category") << _("Summary"); + th1 << _("Name") << table::EditionStyleSetter( t1, _("Version") ) << _("Category") << _("Summary"); t1 << th1; if (!issuesstr.empty()) { -- 2.7.4