Skip to content

Commit

Permalink
Code readability
Browse files Browse the repository at this point in the history
  • Loading branch information
shundhammer committed Feb 6, 2020
1 parent 2a18ba3 commit 136d609
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 73 deletions.
9 changes: 9 additions & 0 deletions src/NCPkgFilterLocale.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ NCPkgLocaleTag::NCPkgLocaleTag ( zypp::sat::LocaleSupport loc, std::string statu

}


NCPkgLocaleTable::NCPkgLocaleTable( YWidget *parent, YTableHeader *tableHeader, NCPackageSelector *pkg )
:NCTable( parent, tableHeader )
, packager(pkg)
Expand All @@ -66,6 +67,7 @@ NCPkgLocaleTable::NCPkgLocaleTable( YWidget *parent, YTableHeader *tableHeader,
fillLocaleList();
}


void NCPkgLocaleTable::fillHeader()
{
std::vector <std::string> header;
Expand All @@ -78,6 +80,7 @@ void NCPkgLocaleTable::fillHeader()
setHeader( header);
}


void NCPkgLocaleTable::addLine ( zypp::sat::LocaleSupport l, const std::vector <std::string> & cols, std::string status )
{
// use default ctor, add cell in the next step
Expand All @@ -96,6 +99,7 @@ void NCPkgLocaleTable::addLine ( zypp::sat::LocaleSupport l, const std::vector

}


std::string NCPkgLocaleTable::status( zypp::Locale lang )
{
ZyppStatus status;
Expand All @@ -117,6 +121,7 @@ std::string NCPkgLocaleTable::status( zypp::Locale lang )
}
}


void NCPkgLocaleTable::fillLocaleList()
{
std::vector <std::string> oneLine;
Expand All @@ -134,6 +139,7 @@ void NCPkgLocaleTable::fillLocaleList()
myPad()->setOrder(1);
}


NCPkgLocaleTag* NCPkgLocaleTable::getTag (const int & index )
{
NCTableLine *line = myPad()->ModifyLine( index );
Expand All @@ -150,13 +156,15 @@ NCPkgLocaleTag* NCPkgLocaleTable::getTag (const int & index )
return tag;
}


zypp::sat::LocaleSupport NCPkgLocaleTable::getLocale( int index )
{
NCPkgLocaleTag *t = getTag( index );

return t->getLocale();
}


void NCPkgLocaleTable::showLocalePackages()
{
int index = getCurrentItem();
Expand Down Expand Up @@ -207,6 +215,7 @@ void NCPkgLocaleTable::toggleStatus()
cellChanged( index, 0, status( myLocale.locale() ) );
}


NCursesEvent NCPkgLocaleTable::wHandleInput( wint_t ch )
{
NCursesEvent ret = NCursesEvent::none;
Expand Down

0 comments on commit 136d609

Please sign in to comment.