enigma2: Hotfixed endless recursion crashes caused by summary screen handling cleanup
[opendreambox.git] / meta-opendreambox / recipes-dreambox / enigma2 / enigma2-4.3.0r11-dm7080 / 0005-Fixed-endless-recursion-crashes-caused-by-summary-sc.patch
1 From 512e77f66fa1f82a54f3637a58234ba2d622183e Mon Sep 17 00:00:00 2001
2 From: ghost <andreas.monzner@dream-property.net>
3 Date: Tue, 9 Aug 2016 20:37:36 +0200
4 Subject: [PATCH] Fixed endless recursion crashes caused by summary screen
5  handling cleanup TODO: Gradualy remove in some old screens the duplicated
6  onChangedEntry handlers
7
8 ---
9  usr/lib/enigma2/python/Components/ConfigList.py | 6 +++---
10  usr/lib/enigma2/python/Screens/Setup.py         | 6 +++---
11  2 files changed, 6 insertions(+), 6 deletions(-)
12
13 diff --git a/usr/lib/enigma2/python/Components/ConfigList.py b/usr/lib/enigma2/python/Components/ConfigList.py
14 index 43b553d..35fc3af 100644
15 --- a/usr/lib/enigma2/python/Components/ConfigList.py
16 +++ b/usr/lib/enigma2/python/Components/ConfigList.py
17 @@ -183,15 +183,15 @@ class ConfigListScreen(object):
18                 self["config"] = ConfigList(list, session = session)
19                 self.setup_title = ""
20  
21 -               self.onChangedEntry = []
22 +               self.onConfigEntryChanged = []
23                 if on_change:
24 -                       self.onChangedEntry.append(on_change)
25 +                       self.onConfigEntryChanged.append(on_change)
26  
27                 if not self.handleInputHelpers in self["config"].onSelectionChanged:
28                         self["config"].onSelectionChanged.append(self.handleInputHelpers)
29  
30         def _changedEntry(self):
31 -               for fnc in self.onChangedEntry:
32 +               for fnc in self.onConfigEntryChanged:
33                         fnc()
34  
35         def handleInputHelpers(self):
36 diff --git a/usr/lib/enigma2/python/Screens/Setup.py b/usr/lib/enigma2/python/Screens/Setup.py
37 index d8d4f99..52e9a74 100644
38 --- a/usr/lib/enigma2/python/Screens/Setup.py
39 +++ b/usr/lib/enigma2/python/Screens/Setup.py
40 @@ -30,19 +30,19 @@ class SetupSummary(Screen):
41  
42         def __init__(self, session, parent):
43                 Screen.__init__(self, session, parent = parent)
44 -               self["SetupTitle"] = StaticText(_(parent.setup_title) or parent["Title"].text)
45 +               self["SetupTitle"] = StaticText(_(parent.setup_title) if parent.setup_title else parent["Title"].text)
46                 self["SetupEntry"] = StaticText("")
47                 self["SetupValue"] = StaticText("")
48                 self.onShow.append(self.addWatcher)
49                 self.onHide.append(self.removeWatcher)
50  
51         def addWatcher(self):
52 -               self.parent.onChangedEntry.append(self.selectionChanged)
53 +               self.parent.onConfigEntryChanged.append(self.selectionChanged)
54                 self.parent["config"].onSelectionChanged.append(self.selectionChanged)
55                 self.selectionChanged()
56  
57         def removeWatcher(self):
58 -               self.parent.onChangedEntry.remove(self.selectionChanged)
59 +               self.parent.onConfigEntryChanged.remove(self.selectionChanged)
60                 self.parent["config"].onSelectionChanged.remove(self.selectionChanged)
61  
62         def selectionChanged(self):
63 -- 
64 2.1.4
65