main_screen

remove all DBUS handler,and in related plugins

wifi
use wpa-connect to do the connecting / scanning , use wpa_cli to do disconnect
This commit is contained in:
cuu
2021-10-10 00:20:47 +08:00
parent 0461450ea9
commit d463dd10ec
14 changed files with 274 additions and 195 deletions

View File

@@ -16,7 +16,7 @@ import (
"github.com/cuu/gogame/color"
"github.com/cuu/gogame/event"
"github.com/cuu/gogame/time"
"github.com/clockworkpi/LauncherGoDev/sysgo"
"github.com/clockworkpi/LauncherGoDev/sysgo/UI"
)
@@ -292,8 +292,8 @@ func (self *GateWayPage) ApplyGateWay( gateway string ) bool {
}
}
}else { // wlan0
if self.Screen.DBusManager.IsWifiConnectedNow() == true {
UI.System("sudo dhclient wlan0")
if self.Screen.IsWifiConnectedNow() == true {
UI.System(fmt.Sprintf("sudo dhclient %s",sysgo.WifiDev))
return true
}else {
self.Screen.MsgBox.SetText("Wi-Fi is not connected")