Repository: lutris/lutris

Issue:
Panels won't be hidden on Lutris start
**Describe the bug**

Lutris does not respect the options to hide the panels on launch. 

**Expected behavior**

Lutris should hide the panels on launch, according to the options.

**Current behavior**

Once set to hide the right/left panel, it sets `right_side_panel_visible = False` and `left_side_panel_visible = False` in the config file. But this options are ignored on Lutris start. Lutris always starts with visible left/right panels.

**Steps to reproduce**

- disable the left and/or right panel
- Exit Lutris
- Start Lutris

**Lutris debugging output**

[lutris.log](https://github.com/lutris/lutris/files/3587114/lutris.log)

**System information**

https://gist.github.com/NoXPhasma/2c2e2bf98b6f43e6e600d8a65f1957d3




Discussion:
I'm having a few other issues, but not this one. Both panels were hidden by default after the update and didn't reveal themselves without me telling them to. If I hide them, they stay hidden.
@Sanaki This made me curious and I deleted the lutris config file. Now everything seems to work fine. There seems to be a bug with an existing older config file.
Hm. I may do the same and see if it fixes some of the issues I'm having. Thanks for the tip.
ok I can reproduce the issue after some tinkering, 0 clue as to why this happens though.
I can only say that this happened after the update from 0.5.2.2 to 0.5.3 and removing the old config file fixed it. So I would go with some incompatibility. Luckily I kept a copy of the old config file after the update, this is the content of my old config file:

```
[lutris]
migration_version = 5
show_advanced_options = True
runners_manager_width = 801
runners_manager_height = 1003
filter_installed = True
view_type = list
width = 1216
height = 661
maximized = False
dark_theme = true
icon_type_listview = icon
sidebar_visible = true
create_desktop_shortcut = False
create_menu_shortcut = False
show_tray_icon = false
view_sorting = name
view_sorting_ascending = True
dont-support-lutris = True
right_side_panel_visible = False
left_side_panel_visible = True

[list view]
name_column_width = 259
year_column_width = 58
runner_column_width = 71
platform_column_width = 84
lastplayed_column_width = 157
installedat_column_width = 120
playtime_column_width = 157

[steam]
sync_at_startup = False
```
I've found that this happens when you have
`sidebar_visible`
set to true or false.
Yes, it is indeed a retro-compatibility thing, as stated in the source : https://github.com/lutris/lutris/blob/master/lutris/gui/lutriswindow.py#L279
What you want to do is simply delete the line "sidebar_visible = true" from your lutris.conf .



Resolving patch:
diff --git a/lutris/gui/lutriswindow.py b/lutris/gui/lutriswindow.py
--- a/lutris/gui/lutriswindow.py
+++ b/lutris/gui/lutriswindow.py
@@ -826,6 +826,9 @@ def on_left_side_panel_state_change(self, action, value):
         left_side_panel_visible = value.get_boolean()
         settings.write_setting("left_side_panel_visible", bool(left_side_panel_visible))
         self.sidebar_revealer.set_reveal_child(left_side_panel_visible)
+        #Retrocompatibility with sidebar_visible : if we change the new attribute, we must set the old one to false
+        if self.sidebar_visible:
+            settings.write_setting("sidebar_visible","false")
 
     def on_right_side_panel_state_change(self, action, value):
         """Callback to handle right side panel toggle"""
@@ -834,6 +837,9 @@ def on_right_side_panel_state_change(self, action, value):
         settings.write_setting("right_side_panel_visible", bool(right_side_panel_visible))
         self.panel_revealer.set_reveal_child(right_side_panel_visible)
         self.game_scrolled.set_visible(right_side_panel_visible)
+        #Retrocompatibility with sidebar_visible : if we change the new attribute, we must set the old one to false
+        if self.sidebar_visible:
+            settings.write_setting("sidebar_visible","false")
 
     def on_sidebar_changed(self, widget):
         row = widget.get_selected_row()


Test patch: