Skip to content

Commit

Permalink
[infobar] add missing def after merge from openatv/enigma2
Browse files Browse the repository at this point in the history
  • Loading branch information
koivo committed Feb 21, 2017
1 parent 5b72954 commit 46c32e5
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions lib/python/Screens/InfoBarGenerics.py
Original file line number Diff line number Diff line change
Expand Up @@ -6271,6 +6271,35 @@ def goStandby(self, answer = None):
print "[InfoBarSleepTimer] goto deep standby"
quitMainloop(1)

#########################################################################################
# for displayed power or record timer messages in foreground and for callback execution #
#########################################################################################
class InfoBarOpenOnTopHelper:
def __init__(self):
pass

def openInfoBarMessage(self, message, messageboxtyp, timeout=-1):
try:
self.session.open(MessageBox, message, messageboxtyp, timeout=timeout)
except Exception, e:
print "[InfoBarOpenMessage] Exception:", e

def openInfoBarMessageWithCallback(self, callback, message, messageboxtyp, timeout=-1, default=True):
try:
self.session.openWithCallback(callback, MessageBox, message, messageboxtyp, timeout=timeout, default=default)
except Exception, e:
print "[openInfoBarMessageWithCallback] Exception:", e

def openInfoBarSession(self, session, option=None):
try:
if option is None:
self.session.open(session)
else:
self.session.open(session, option)
except Exception, e:
print "[openInfoBarSession] Exception:", e
#########################################################################################

print bcolors.OKGREEN + "~~~~ read box informations ~~~~~~~~~" + bcolors.ENDC
print bcolors.OKBLUE + "MachineName =", getMachineName() + bcolors.ENDC
print bcolors.OKBLUE + "MachineBrand =", getMachineBrand() + bcolors.ENDC
Expand Down

0 comments on commit 46c32e5

Please sign in to comment.