Esempio n. 1
0
def wifi_connect_done(client: NM.Client, res: Gio.AsyncResult,
                      button: Gtk.Button):
    created = client.add_connection_finish(res)
    logger.debug('NetworkManager created connection: {}', created)
    if created:
        button.set_label(_('Saved'))
        button.set_sensitive(False)
Esempio n. 2
0
    def _on_connection_added(self, client: NM.Client, result: Gio.AsyncResult,
                             conn_uuid: str) -> None:
        try:
            self.connection = client.add_connection_finish(result)
        except GLib.Error as e:
            self.error_handler(e)

        self.store_uuid(conn_uuid)