Diffstat (limited to 'noncore/unsupported/oipkg/packagelistitem.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/packagelistitem.cpp | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/noncore/unsupported/oipkg/packagelistitem.cpp b/noncore/unsupported/oipkg/packagelistitem.cpp index 149ba35..0c7c928 100644 --- a/noncore/unsupported/oipkg/packagelistitem.cpp +++ b/noncore/unsupported/oipkg/packagelistitem.cpp @@ -19,14 +19,3 @@ PackageListItem::PackageListItem(QListView* lv, Package *pi, PackageManagerSetti QCheckListItem *item; -#ifndef NEWLAYOUT - item = new QCheckListItem( this, QObject::tr("Name") ); - item->setText(1,pi->name()); - item = new QCheckListItem( this, QObject::tr("Description") ); - item->setText(1,pi->desc()+"\ntest multi\nline"); - item = new QCheckListItem( this, QObject::tr("Size") ); - item->setText(1,pi->size()); - item = new QCheckListItem( this, QObject::tr("Destination") ); - item->setText(1,pi->getDest()); -#endif -#ifdef NEWLAYOUT - item = new QCheckListItem( this, QObject::tr("Name: ")+pi->name() ); + nameItem = new QCheckListItem( this, "" ); item = new QCheckListItem( this, QObject::tr("Description: ")+pi->desc() ); @@ -36,5 +25,5 @@ PackageListItem::PackageListItem(QListView* lv, Package *pi, PackageManagerSetti displayDetails(); -#endif - if (!pm_uninstalled) { + if (!pm_uninstalled) + { pm_uninstalled = new QPixmap(Resource::loadPixmap("oipkg/uninstalled")); @@ -44,6 +33,2 @@ PackageListItem::PackageListItem(QListView* lv, Package *pi, PackageManagerSetti } -#ifndef NEWLAYOUT - setText(1, package->shortDesc() ); - setText(2, package->size() ); -#endif } @@ -122,9 +107,2 @@ void PackageListItem::setOn( bool b ) package->toggleProcess(); -// if ( b ) -// { -// if ((package->dest()).isEmpty) -// package->setDest( settings->getDestinationName() ); -// }else{ -// package->setDest( QObject::tr("not installed")); -// } package->setLink( settings->createLinks() ); @@ -135,2 +113,7 @@ void PackageListItem::displayDetails() { + QString sod = " ("+package->sizeUnits(); + sod += package->dest().isEmpty()?QString(""):QString(QObject::tr(" on ")+package->dest()); + sod += ")"; + setText(0, package->name()+sod ); + nameItem->setText( 0, QObject::tr("Name: ")+package->name()); linkItem->setText( 0, QObject::tr("Link: ")+QString(package->link()?QObject::tr("Yes"):QObject::tr("No")) ); |