Commit bcf4f68b authored by Michael Pyne's avatar Michael Pyne

Merge branch 'Applications/18.12'

Brings in latest bugfixes.
parents f7c1b49d f9721878
......@@ -1204,6 +1204,7 @@ void Playlist::slotInitialize()
//////////////////////////////////////////////////
QAction *showAction;
const auto sharedSettings = SharedSettings::instance();
for(int i = 0; i < header()->count(); ++i) {
if(i - columnOffset() == PlaylistItem::FileNameColumn)
......@@ -1212,7 +1213,7 @@ void Playlist::slotInitialize()
showAction = new QAction(headerItem()->text(i), m_headerMenu);
showAction->setData(i);
showAction->setCheckable(true);
showAction->setChecked(!isColumnHidden(i));
showAction->setChecked(sharedSettings->isColumnVisible(i));
m_headerMenu->addAction(showAction);
resizeColumnToContents(i);
......
......@@ -62,6 +62,15 @@ void Playlist::SharedSettings::toggleColumnVisible(int column)
writeConfig();
}
bool Playlist::SharedSettings::isColumnVisible(int column) const
{
if(column >= m_columnsVisible.size()) {
return false;
}
return m_columnsVisible[column];
}
void Playlist::SharedSettings::setInlineCompletionMode(KCompletion::CompletionMode mode)
{
m_inlineCompletion = mode;
......
......@@ -38,8 +38,10 @@ public:
*/
void setColumnOrder(const Playlist *l);
void toggleColumnVisible(int column);
bool isColumnVisible(int column) const;
void setInlineCompletionMode(KCompletion::CompletionMode mode);
/**
* Apply the settings.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment