diff --git a/scal3/ui_gtk/customize_dialog.py b/scal3/ui_gtk/customize_dialog.py index 359223880..a3a5cc049 100644 --- a/scal3/ui_gtk/customize_dialog.py +++ b/scal3/ui_gtk/customize_dialog.py @@ -375,6 +375,7 @@ def addPageObj(self, page): ) pack(hbox, prefItem.getWidget()) pack(page.pageWidget, hbox, 0, 0) + item.enablePrefItem = prefItem if item.itemListCustomizable and item.items: self._addPageItemsTree(page) diff --git a/scal3/ui_gtk/right_panel.py b/scal3/ui_gtk/right_panel.py index b0e7f45ed..9eebea63b 100644 --- a/scal3/ui_gtk/right_panel.py +++ b/scal3/ui_gtk/right_panel.py @@ -102,11 +102,18 @@ def __init__(self): styleClass="right-panel-plugins", ) # --- + self.enablePrefItem = None # will be set in customize_dialog.py + # --- self.addItems() # --- self.show_all() self.onBorderWidthChange() + def onToggleFromMainWin(self): + if self.enablePrefItem is None: + return + self.enablePrefItem.set(not self.enablePrefItem.get()) + def appendItem(self, item): CustomizableCalObj.appendItem(self, item) swin = gtk.ScrolledWindow() diff --git a/scal3/ui_gtk/starcal.py b/scal3/ui_gtk/starcal.py index b73a66346..f7f2383da 100755 --- a/scal3/ui_gtk/starcal.py +++ b/scal3/ui_gtk/starcal.py @@ -495,6 +495,10 @@ def _onToggleRightPanel(self): self.rightPanel.enable = enable self.rightPanel.showHide() self.rightPanel.onDateChange() + + # update Enable checkbutton in Customize dialog + self.rightPanel.onToggleFromMainWin() + if ui.mainWinRightPanelResizeOnToggle: ww, wh = self.get_size() mw = ui.mainWinRightPanelWidth