Commit 845c65e0 authored by Scott Wheeler's avatar Scott Wheeler

Make sure that the column resize settings are shared across playlists and

make sure that the settings are written after changing them.

svn path=/trunk/kdemultimedia/juk/; revision=353272
parent fdf761ea
......@@ -124,6 +124,7 @@ public:
* Apply the settings.
*/
void apply(Playlist *l) const;
void sync() { writeConfig(); }
protected:
SharedSettings();
......@@ -200,6 +201,7 @@ void Playlist::SharedSettings::apply(Playlist *l) const
l->updateLeftColumn();
l->renameLineEdit()->setCompletionMode(m_inlineCompletion);
l->slotColumnResizeModeChanged();
}
////////////////////////////////////////////////////////////////////////////////
......@@ -747,6 +749,19 @@ void Playlist::slotShowPlaying()
m_collection->raise(l);
}
void Playlist::slotColumnResizeModeChanged()
{
if(action<KToggleAction>("resizeColumnsManually")->isChecked())
setHScrollBarMode(Auto);
else
setHScrollBarMode(AlwaysOff);
if(!action<KToggleAction>("resizeColumnsManually")->isChecked())
slotUpdateColumnWidths();
SharedSettings::instance()->sync();
}
////////////////////////////////////////////////////////////////////////////////
// protected members
////////////////////////////////////////////////////////////////////////////////
......@@ -1429,17 +1444,6 @@ PlaylistItem *Playlist::addFile(const QString &file, bool importPlaylists,
// private slots
////////////////////////////////////////////////////////////////////////////////
void Playlist::slotColumnResizeModeChanged()
{
if(action<KToggleAction>("resizeColumnsManually")->isChecked())
setHScrollBarMode(Auto);
else
setHScrollBarMode(AlwaysOff);
if(!action<KToggleAction>("resizeColumnsManually")->isChecked())
slotUpdateColumnWidths();
}
void Playlist::slotUpdateColumnWidths()
{
if(m_disableColumnWidthUpdates)
......
......@@ -357,6 +357,8 @@ public slots:
void slotShowPlaying();
void slotColumnResizeModeChanged();
protected:
/**
* Remove \a items from the playlist and disk. This will ignore items that
......@@ -497,7 +499,6 @@ private:
private slots:
void slotColumnResizeModeChanged();
void slotUpdateColumnWidths();
void slotAddToUpcoming();
......
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