diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp
index 2cb121bea..ba0a22fb9 100644
--- a/src/ui/mainwindow.cpp
+++ b/src/ui/mainwindow.cpp
@@ -433,6 +433,8 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd,
app_->playlist_manager(), SLOT(RemoveUnavailableCurrent()));
connect(ui_->action_remove_from_playlist, SIGNAL(triggered()),
SLOT(PlaylistRemoveCurrent()));
+ connect(ui_->action_toggle_show_sidebar, SIGNAL(toggled(bool)),
+ ui_->sidebar_layout, SLOT(setShown(bool)));
connect(ui_->action_edit_track, SIGNAL(triggered()), SLOT(EditTracks()));
connect(ui_->action_renumber_tracks, SIGNAL(triggered()),
SLOT(RenumberTracks()));
@@ -1070,6 +1072,10 @@ void MainWindow::ReloadSettings() {
PlaylistAddBehaviour_Play).toInt());
menu_playmode_ =
PlayBehaviour(s.value("menu_playmode", PlayBehaviour_IfStopped).toInt());
+
+ bool show_sidebar = settings_.value("show_sidebar", true).toBool();
+ ui_->sidebar_layout->setShown(show_sidebar);
+ ui_->action_toggle_show_sidebar->setChecked(show_sidebar);
}
void MainWindow::ReloadAllSettings() {
@@ -2608,6 +2614,9 @@ bool MainWindow::winEvent(MSG* msg, long*) {
void MainWindow::Exit() {
SavePlaybackStatus();
+ settings_.setValue("show_sidebar",
+ ui_->action_toggle_show_sidebar->isChecked());
+
if (app_->player()->engine()->is_fadeout_enabled()) {
// To shut down the application when fadeout will be finished
connect(app_->player()->engine(), SIGNAL(FadeoutFinishedSignal()), qApp,
diff --git a/src/ui/mainwindow.ui b/src/ui/mainwindow.ui
index 3cd267f9d..8fd57050e 100644
--- a/src/ui/mainwindow.ui
+++ b/src/ui/mainwindow.ui
@@ -22,7 +22,16 @@
0
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -30,11 +39,23 @@
Qt::Horizontal
-
+
0
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
-
@@ -78,7 +99,16 @@
0
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -90,7 +120,16 @@
1
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -177,7 +216,16 @@
1
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -280,7 +328,16 @@
0
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -302,7 +359,16 @@
3
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -313,7 +379,16 @@
0
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -402,7 +477,7 @@
0
0
1131
- 25
+ 23
@@ -851,6 +928,17 @@
Remove unavailable tracks from playlist
+
+
+ true
+
+
+ Show sidebar
+
+
+ Show or hide the sidebar
+
+