Exemple #1
0
def addCitiesForCountry(countryName):
    try:
        cities = VPNServerManager.getInstance().getCities(countryName)
        for city in cities:
            label = '%s (%d)' % (city[0], city[2])
            gui.addDir(arguments, label, _VPN, thumbnail=city[1], server=city[3], isFolder=False, countryName = countryName)
    except NoConnectionError:
        gui.DialogOK(__language__(30003), __language__(30004), __language__(30005))
Exemple #2
0
def addCitiesForCountry(countryName):
    try:
        cities = VPNServerManager.getInstance().getCities(countryName)
        for city in cities:
            label = '%s (%d)' % (city[0], city[2])
            gui.addDir(arguments,
                       label,
                       _VPN,
                       thumbnail=city[1],
                       server=city[3],
                       isFolder=False,
                       countryName=countryName)
    except NoConnectionError:
        gui.DialogOK(__language__(30003), __language__(30004),
                     __language__(30005))
Exemple #3
0
def Main():
    common.CheckVersion()
    common.CheckUsername()

    if config.isVPNCustom():
        connectToCustomServer()
        return

    gui.addDir(arguments, __language__(30001), _SETTINGS,  isFolder=False)
    gui.addDir(arguments, __language__(30002),   _KILL,      isFolder=False)
    gui.addDir(arguments, ' ',             _SEPARATOR, isFolder=False)

    try:
        for country in VPNServerManager.getInstance().getCountries():
            gui.addDir(arguments, country[0], _COUNTRY, abrv=country[1], thumbnail=country[2])
    except NoConnectionError:
        gui.DialogOK( __language__(30003),  __language__(30004), __language__(30005))
Exemple #4
0
def Main():
    common.CheckVersion()
    common.CheckUsername()

    if config.isVPNCustom():
        connectToCustomServer()
        return

    gui.addDir(arguments, __language__(30001), _SETTINGS, isFolder=False)
    gui.addDir(arguments, __language__(30002), _KILL, isFolder=False)
    gui.addDir(arguments, ' ', _SEPARATOR, isFolder=False)

    try:
        for country in VPNServerManager.getInstance().getCountries():
            gui.addDir(arguments,
                       country[0],
                       _COUNTRY,
                       abrv=country[1],
                       thumbnail=country[2])
    except NoConnectionError:
        gui.DialogOK(__language__(30003), __language__(30004),
                     __language__(30005))