def load_nap_settings(self): dprint("Loading NAP settings") def reply(): pass def err(excp): d = NetworkErrorDialog( excp, "You might not be able to connect to the Bluetooth network via this machine" ) d.expander.props.margin_left = 9 d.run() d.destroy() m = Mechanism() m.ReloadNetwork(reply_handler=reply, error_handler=err)
def load_nap_settings(self): logging.info("Loading NAP settings") def reply(*_): pass def err(_obj, result, _user_data): d = NetworkErrorDialog( result, "You might not be able to connect to the Bluetooth network via this machine" ) d.expander.props.margin_left = 9 d.run() d.destroy() m = Mechanism() m.ReloadNetwork(result_handler=reply, error_handler=err)
def load_nap_settings(self): dprint("Loading NAP settings") def reply(): pass def err(excp): lines = str(excp).splitlines() d = Gtk.MessageDialog(None, buttons=Gtk.ButtonsType.OK, type=Gtk.MessageType.ERROR) d.props.text = _("Failed to apply network settings") d.props.secondary_text = lines[-1] + "\n\n" + _( "You might not be able to connect to the Bluetooth network via this machine" ) d.run() d.destroy() m = Mechanism() m.ReloadNetwork(reply_handler=reply, error_handler=err)