Example #1
0
def popupSysBox():
    if not getID() == "":
        addon = xbmcaddon.Addon(getID())
        dialog_text_l = ""
        dialog_text_r = ""
        data_left = getSystemData(addon, True, True, False, False)
        data_right = getSystemData(addon, False, False, False, True)
        for line in data_left:
            if line.startswith("[B]") and not dialog_text_l == "": dialog_text_l = dialog_text_l + "\n"
            dialog_text_l = dialog_text_l + line + "\n"
        for line in data_right:
            if line.startswith("[B]") and not dialog_text_r == "": dialog_text_r = dialog_text_r + "\n"
            dialog_text_r = dialog_text_r + line + "\n"    
        showInfoBox("System Information", dialog_text_l, dialog_text_r)
    else:
        errorTrace("sysbox.py", "VPN service is not ready")
Example #2
0
def popupSysBox():
    if not getID() == "":
        addon = xbmcaddon.Addon(getID())
        dialog_text_l = ""
        dialog_text_r = ""
        data_left = getSystemData(addon, True, True, False, False)
        data_right = getSystemData(addon, False, False, False, True)
        for line in data_left:
            if line.startswith("[B]") and not dialog_text_l == "": dialog_text_l = dialog_text_l + "\n"
            dialog_text_l = dialog_text_l + line + "\n"
        for line in data_right:
            if line.startswith("[B]") and not dialog_text_r == "": dialog_text_r = dialog_text_r + "\n"
            dialog_text_r = dialog_text_r + line + "\n"    
        showInfoBox("System Information", dialog_text_l, dialog_text_r)
    else:
        errorTrace("sysbox.py", "VPN service is not ready")
Example #3
0
def listSystem(addon):
    lines = getSystemData(addon, True, True, True, True)
    for line in lines:
        url = base_url + "?back"
        li = xbmcgui.ListItem(line, iconImage=getIconPath() + "enhanced.png")
        xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)
    xbmcplugin.endOfDirectory(addon_handle)
    return
Example #4
0
def listSystem(addon):
    lines = getSystemData(addon, True, True, True, True)
    for line in lines:
        url = base_url + "?back"
        li = xbmcgui.ListItem(line, iconImage=getIconPath()+"enhanced.png")
        xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)
    xbmcplugin.endOfDirectory(addon_handle)
    return
    win = InfoBox("infotextbox.xml",
                  path,
                  caption=caption,
                  text_left=text_l,
                  text_right=text_r)
    win.doModal()
    del win


debugTrace("-- Entered infopopup.py --")

if not getID() == "":
    addon = xbmcaddon.Addon(getID())
    dialog_text_l = ""
    dialog_text_r = ""
    data_left = getSystemData(addon, True, True, False, False)
    data_right = getSystemData(addon, False, False, False, True)
    for line in data_left:
        if line.startswith("[B]") and not dialog_text_l == "":
            dialog_text_l = dialog_text_l + "\n"
        dialog_text_l = dialog_text_l + line + "\n"
    for line in data_right:
        if line.startswith("[B]") and not dialog_text_r == "":
            dialog_text_r = dialog_text_r + "\n"
        dialog_text_r = dialog_text_r + line + "\n"
    showInfoBox("System Information", dialog_text_l, dialog_text_r)
else:
    errorTrace("infopopup.py", "VPN service is not ready")

debugTrace("-- Exit infopopup.py --")
Example #6
0
    def onAction(self, action):
        actionId = action.getId()
        if actionId in [ACTION_PREVIOUS_MENU, ACTION_NAV_BACK]:
            return self.close()
        

def showInfoBox(caption, text_l, text_r):
    path = xbmcaddon.Addon("service.vpn.manager").getAddonInfo("path")
    win = InfoBox("infotextbox.xml", path, caption=caption, text_left=text_l, text_right=text_r)
    win.doModal()
    del win
    
    
debugTrace("-- Entered infopopup.py --")

addon = xbmcaddon.Addon("service.vpn.manager")
dialog_text_l = ""
dialog_text_r = ""
data_left = getSystemData(addon, True, True, False, False)
data_right = getSystemData(addon, False, False, False, True)
for line in data_left:
    if line.startswith("[B]") and not dialog_text_l == "": dialog_text_l = dialog_text_l + "\n"
    dialog_text_l = dialog_text_l + line + "\n"
for line in data_right:
    if line.startswith("[B]") and not dialog_text_r == "": dialog_text_r = dialog_text_r + "\n"
    dialog_text_r = dialog_text_r + line + "\n"    
showInfoBox("System Information", dialog_text_l, dialog_text_r)

debugTrace("-- Exit infopopup.py --")