Skip to content

Commit

Permalink
added: option to stick 'add source' on top in listings
Browse files Browse the repository at this point in the history
  • Loading branch information
notspiff committed Feb 14, 2018
1 parent 54b1d5a commit 74c1f1e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions xbmc/settings/AdvancedSettings.cpp
Expand Up @@ -181,6 +181,7 @@ void CAdvancedSettings::Initialize()
m_songInfoDuration = 10;

m_cddbAddress = "freedb.freedb.org";
m_addSourceOnTop = false;

m_handleMounting = g_application.IsStandAlone();

Expand Down Expand Up @@ -842,6 +843,7 @@ void CAdvancedSettings::ParseSettingsFile(const std::string &file)
}

XMLUtils::GetString(pRootElement, "cddbaddress", m_cddbAddress);
XMLUtils::GetBoolean(pRootElement, "addsourceontop", m_addSourceOnTop);

//airtunes + airplay
XMLUtils::GetInt(pRootElement, "airtunesport", m_airTunesPort);
Expand Down
1 change: 1 addition & 0 deletions xbmc/settings/AdvancedSettings.h
Expand Up @@ -205,6 +205,7 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler
bool m_extraLogEnabled;
int m_extraLogLevels;
std::string m_cddbAddress;
bool m_addSourceOnTop; //!< True to put 'add source' buttons on top

//airtunes + airplay
int m_airTunesPort;
Expand Down
3 changes: 2 additions & 1 deletion xbmc/windows/GUIMediaWindow.cpp
Expand Up @@ -847,7 +847,8 @@ bool CGUIMediaWindow::Update(const std::string &strDirectory, bool updateFilterP
pItem->SetLabel(strLabel);
pItem->SetLabelPreformatted(true);
pItem->m_bIsFolder = true;
pItem->SetSpecialSort(SortSpecialOnBottom);
pItem->SetSpecialSort(g_advancedSettings.m_addSourceOnTop ?
SortSpecialOnTop : SortSpecialOnBottom);
m_vecItems->Add(pItem);
}
m_iLastControl = GetFocusedControlID();
Expand Down

0 comments on commit 74c1f1e

Please sign in to comment.