Skip to content

Commit

Permalink
Merge pull request #1051 from ims21/patch1
Browse files Browse the repository at this point in the history
Partnerbox - added onSelectionChanged method to E2TimerMenu
  • Loading branch information
ims21 authored Jan 1, 2025
2 parents 474c653 + 23cba20 commit 0382cf1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions partnerbox/src/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1648,6 +1648,12 @@ def __init__(self, enigma_type):
self.iconRepeat = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/timer_rep.svg"))
self.iconZapped = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/timer_zap.svg"))
self.iconDisabled = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/timer_off.svg"))
self.onSelectionChanged = []

def _selectionChanged(self):
current = self.getCurrent()
for callback in self.onSelectionChanged:
callback(current)

def buildEntry(self, timer):
width = self.l.getItemSize().width()
Expand Down Expand Up @@ -1810,6 +1816,7 @@ def getCurrent(self):

def postWidgetCreate(self, instance):
instance.setContent(self.l)
instance.selectionChanged.get().append(self._selectionChanged)

def preWidgetRemove(self, instance):
instance.setContent(None)
Expand Down

0 comments on commit 0382cf1

Please sign in to comment.