Skip to content

Commit

Permalink
bug fix in Right Panel: update Customize "Enable" checkbox when toggl…
Browse files Browse the repository at this point in the history
…e via win controller button
  • Loading branch information
ilius committed Mar 21, 2024
1 parent 6b1999d commit 1e2edc2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions scal3/ui_gtk/customize_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions scal3/ui_gtk/right_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 4 additions & 0 deletions scal3/ui_gtk/starcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1e2edc2

Please sign in to comment.