Esempio n. 1
0
    def _threaded_disconnect(self):
        '''
        This is needed so we can show a spinner while the user is
        disconnecting
        '''
        disconnect(self._wiface)

        def done():
            self._disconnect_screen()
            self._win.get_window().set_cursor(None)
            self._connect_btn.stop_spinner()
            self._connect_btn.set_sensitive(True)

        GObject.idle_add(done)
Esempio n. 2
0
def disconnect_wifi():
    from kano.network import KwifiCache, disconnect
    from kano.gtk3.kano_dialog import KanoDialog

    iface = get_wlan_device()
    disconnect(iface)
    wificache = KwifiCache()
    wificache.empty()

    kdialog = KanoDialog(
        # Text from the content team.
        _("Disconnect complete - you're now offline."),
    )
    kdialog.run()

    return 0