diff --git a/gui/wxpython/core/settings.py b/gui/wxpython/core/settings.py index 3e870ecdaa1..d3ddd7861d9 100644 --- a/gui/wxpython/core/settings.py +++ b/gui/wxpython/core/settings.py @@ -157,6 +157,10 @@ def _defaultSettings(self): "enabled": False, "pos": "", }, + # init + "init": { + "startWithoutShellIfPossible": {"enabled": True}, + }, }, # # datacatalog diff --git a/gui/wxpython/gui_core/preferences.py b/gui/wxpython/gui_core/preferences.py index 73ad6f3d3bd..1c9c8e9028d 100644 --- a/gui/wxpython/gui_core/preferences.py +++ b/gui/wxpython/gui_core/preferences.py @@ -546,6 +546,42 @@ def _createGeneralPage(self, notebook): sizer.Add(gridSizer, proportion=1, flag=wx.ALL | wx.EXPAND, border=5) border.Add(sizer, proportion=0, flag=wx.ALL | wx.EXPAND, border=3) + # + # init + # + box = StaticBox( + parent=panel, id=wx.ID_ANY, label=" %s " % _("Start-up settings") + ) + sizer = wx.StaticBoxSizer(box, wx.VERTICAL) + + gridSizer = wx.GridBagSizer(hgap=3, vgap=3) + + row = 0 + startWithoutShell = wx.CheckBox( + parent=panel, + id=wx.ID_ANY, + label=_( + "Start-up GRASS GIS without Terminal if possible (requires restart)" + ), + name="IsChecked", + ) + startWithoutShell.SetValue( + self.settings.Get( + group="general", + key="init", + subkey=["startWithoutShellIfPossible", "enabled"], + ) + ) + self.winId["general:init:startWithoutShellIfPossible:enabled"] = ( + startWithoutShell.GetId() + ) + + gridSizer.Add(startWithoutShell, pos=(row, 0), span=(1, 2)) + + gridSizer.AddGrowableCol(0) + sizer.Add(gridSizer, proportion=1, flag=wx.ALL | wx.EXPAND, border=5) + border.Add(sizer, proportion=0, flag=wx.ALL | wx.EXPAND, border=3) + panel.SetSizer(border) return panel