mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-13 18:28:50 +01:00
update wifi
This commit is contained in:
parent
4f7fcc6433
commit
38e217ef49
@ -137,13 +137,13 @@ class NetItem(Widget):
|
|||||||
|
|
||||||
|
|
||||||
lock_icon = NetItemIcon()
|
lock_icon = NetItemIcon()
|
||||||
lock_icon._ImgSurf = MyIconPool._Icons["lock"]
|
lock_icon._ImgSurf = MyIconPool.GiveIconSurface("lock")
|
||||||
lock_icon._CanvasHWND = self._Parent._CanvasHWND
|
lock_icon._CanvasHWND = self._Parent._CanvasHWND
|
||||||
lock_icon._Parent = self
|
lock_icon._Parent = self
|
||||||
self._Icons["lock"] = lock_icon
|
self._Icons["lock"] = lock_icon
|
||||||
|
|
||||||
done_icon = NetItemIcon()
|
done_icon = NetItemIcon()
|
||||||
done_icon._ImgSurf = MyIconPool._Icons["done"]
|
done_icon._ImgSurf = MyIconPool.GiveIconSurface("done")
|
||||||
done_icon._CanvasHWND = self._Parent._CanvasHWND
|
done_icon._CanvasHWND = self._Parent._CanvasHWND
|
||||||
done_icon._Parent = self
|
done_icon._Parent = self
|
||||||
|
|
||||||
|
|||||||
@ -202,7 +202,7 @@ class WifiInfoPage(Page):
|
|||||||
|
|
||||||
|
|
||||||
class WifiListSelector(PageSelector):
|
class WifiListSelector(PageSelector):
|
||||||
_BackgroundColor = MySkinManager.GiveColor('Line')
|
_BackgroundColor = MySkinManager.GiveColor('Front')
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
@ -222,9 +222,9 @@ class WifiListSelector(PageSelector):
|
|||||||
self._PosY = y
|
self._PosY = y
|
||||||
self._Height = h
|
self._Height = h
|
||||||
|
|
||||||
#aa_round_rect(self._Parent._CanvasHWND,
|
aa_round_rect(self._Parent._CanvasHWND,
|
||||||
# (x,y,self._Width,h),self._BackgroundColor,4,0,self._BackgroundColor)
|
(x,y,self._Width,h),self._BackgroundColor,4,0,self._BackgroundColor)
|
||||||
pygame.draw.rect(self._Parent._CanvasHWND,self._BackgroundColor,(x,y,self._Width,h),0)
|
|
||||||
|
|
||||||
class WifiListMessageBox(Label):
|
class WifiListMessageBox(Label):
|
||||||
_Parent = None
|
_Parent = None
|
||||||
@ -238,7 +238,7 @@ class WifiListMessageBox(Label):
|
|||||||
padding = 10
|
padding = 10
|
||||||
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('White'),(x-padding,y-padding, w+padding*2,h+padding*2))
|
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('White'),(x-padding,y-padding, w+padding*2,h+padding*2))
|
||||||
|
|
||||||
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'),(x-padding,y-padding, w+padding*2,h+padding*2),1)
|
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Black'),(x-padding,y-padding, w+padding*2,h+padding*2),1)
|
||||||
|
|
||||||
self._CanvasHWND.blit(my_text,(x,y,w,h))
|
self._CanvasHWND.blit(my_text,(x,y,w,h))
|
||||||
|
|
||||||
@ -568,7 +568,23 @@ class WifiList(Page):
|
|||||||
password_inputed = "".join(myvars.PasswordPage._Textarea._MyWords)
|
password_inputed = "".join(myvars.PasswordPage._Textarea._MyWords)
|
||||||
if is_wifi_connected_now() == False:
|
if is_wifi_connected_now() == False:
|
||||||
self.ConfigWireless(password_inputed)
|
self.ConfigWireless(password_inputed)
|
||||||
|
else:
|
||||||
|
for i in range(0,10):
|
||||||
|
if is_wifi_connected_now() == True:
|
||||||
|
self.ShowBox(MyLangManager.Tr("Launching"))
|
||||||
|
self._Daemon.Disconnect()
|
||||||
|
self._Daemon.SetForcedDisconnect(True)
|
||||||
|
self._Connecting = False
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
|
||||||
|
pygame.time.delay(100)
|
||||||
|
|
||||||
|
if is_wifi_connected_now() == False:
|
||||||
|
self.ConfigWireless(password_inputed)
|
||||||
|
else:
|
||||||
|
self.ShowBox(MyLangManager.Tr("Disconnect first"))
|
||||||
|
|
||||||
def OnReturnBackCb(self):
|
def OnReturnBackCb(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user