mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
* Disable auto-closing of pages.
This commit is contained in:
@@ -28,6 +28,8 @@
|
|||||||
|
|
||||||
using namespace Tomahawk;
|
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 )
|
HistoryItem::HistoryItem( SourcesModel* model, SourceTreeItem* parent, const QString& text, int peerSortValue )
|
||||||
: GroupItem( model, parent, text, peerSortValue )
|
: GroupItem( model, parent, text, peerSortValue )
|
||||||
@@ -60,8 +62,8 @@ HistoryItem::tempPageActivated( Tomahawk::ViewPage* v )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only keep 5 temporary pages at once
|
// Only keep a certain amount of temporary pages at once
|
||||||
while ( m_tempItems.size() > 4 )
|
while ( MAX_HISTORY_ITEMS > 0 && m_tempItems.size() > MAX_HISTORY_ITEMS )
|
||||||
{
|
{
|
||||||
TemporaryPageItem* item = m_tempItems.takeFirst();
|
TemporaryPageItem* item = m_tempItems.takeFirst();
|
||||||
QTimer::singleShot( 0, item, SLOT( removeFromList() ) );
|
QTimer::singleShot( 0, item, SLOT( removeFromList() ) );
|
||||||
|
Reference in New Issue
Block a user