1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 07:49:42 +01:00

* Disable auto-closing of pages.

This commit is contained in:
Christian Muehlhaeuser 2012-12-18 06:01:42 +01:00
parent b57718c8c3
commit a8ae8fb70a

@ -28,6 +28,8 @@
using namespace Tomahawk;
const unsigned int MAX_HISTORY_ITEMS = 0; // 0 disables this feature
HistoryItem::HistoryItem( SourcesModel* model, SourceTreeItem* parent, const QString& text, int peerSortValue )
: GroupItem( model, parent, text, peerSortValue )
@ -60,8 +62,8 @@ HistoryItem::tempPageActivated( Tomahawk::ViewPage* v )
}
}
// Only keep 5 temporary pages at once
while ( m_tempItems.size() > 4 )
// Only keep a certain amount of temporary pages at once
while ( MAX_HISTORY_ITEMS > 0 && m_tempItems.size() > MAX_HISTORY_ITEMS )
{
TemporaryPageItem* item = m_tempItems.takeFirst();
QTimer::singleShot( 0, item, SLOT( removeFromList() ) );