mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 07:36:48 +02:00
Added description support to Collection, and fixed header text.
This commit is contained in:
@@ -64,6 +64,13 @@ Collection::prettyName() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
Collection::description() const
|
||||||
|
{
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QString
|
QString
|
||||||
Collection::itemName() const
|
Collection::itemName() const
|
||||||
{
|
{
|
||||||
|
@@ -62,6 +62,7 @@ public:
|
|||||||
|
|
||||||
virtual QString name() const;
|
virtual QString name() const;
|
||||||
virtual QString prettyName() const;
|
virtual QString prettyName() const;
|
||||||
|
virtual QString description() const;
|
||||||
virtual QString itemName() const;
|
virtual QString itemName() const;
|
||||||
virtual BackendType backendType() const { return NullCollectionType; }
|
virtual BackendType backendType() const { return NullCollectionType; }
|
||||||
virtual QIcon icon() const;
|
virtual QIcon icon() const;
|
||||||
|
@@ -263,6 +263,7 @@ TreeModel::addCollection( const collection_ptr& collection )
|
|||||||
setIcon( collection->bigIcon() );
|
setIcon( collection->bigIcon() );
|
||||||
|
|
||||||
setTitle( collection->prettyName() );
|
setTitle( collection->prettyName() );
|
||||||
|
setDescription( collection->description() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -54,14 +54,9 @@ ScriptCollection::~ScriptCollection()
|
|||||||
QString
|
QString
|
||||||
ScriptCollection::prettyName() const
|
ScriptCollection::prettyName() const
|
||||||
{
|
{
|
||||||
if ( source()->isLocal() )
|
return tr( "%1 Collection",
|
||||||
return tr( "My %1 Collection",
|
"Name of a collection based on a resolver, e.g. Subsonic Collection" )
|
||||||
"Name of a collection based on a resolver, e.g. My Subsonic Collection" )
|
|
||||||
.arg( m_resolver->name() );
|
.arg( m_resolver->name() );
|
||||||
return tr( "%1 Collection of %2",
|
|
||||||
"Name of a collection based on a resolver, e.g. Subsonic Collection of Some Dude" )
|
|
||||||
.arg( m_resolver->name() )
|
|
||||||
.arg( source()->friendlyName() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user