def run_configscript(parent, netname, nettype): """ Run configuration script. """ configfile = wpath.etc + netname + '-settings.conf' if nettype != 'wired': header = 'profile' else: header = 'BSSID' if nettype == 'wired': profname = nettype else: profname = wireless.GetWirelessProperty(int(netname), 'bssid') theText = [ _('To avoid various complications, wicd-curses does not support directly ' 'editing the scripts. However, you can edit them manually. First, (as root), ' 'open the "$A" config file, and look for the section labeled by the $B in ' 'question. In this case, this is:').replace('$A', configfile).replace( '$B', header), "\n\n[" + profname + "]\n\n", _('You can also configure the wireless networks by looking for the "[<ESSID>]" ' 'field in the config file.'), _('Once there, you can adjust (or add) the "beforescript", "afterscript", ' '"predisconnectscript" and "postdisconnectscript" variables as needed, to ' 'change the preconnect, postconnect, predisconnect and postdisconnect scripts ' 'respectively. Note that you will be specifying the full path to the scripts ' '- not the actual script contents. You will need to add/edit the script ' 'contents separately. Refer to the wicd manual page for more information.' ) ] dialog = TextDialog(theText, 20, 80) dialog.run(ui, parent)
def about_dialog(body): """ About dialog. """ # This looks A LOT better when it is actually displayed. I promise :-). # The ASCII Art "Wicd" was made from the "smslant" font on one of those # online ASCII big text generators. theText = [ ('green', " /// \\\\\\"), " _ ___ __\n", ('green', " /// \\\\\\"), " | | /| / (_)______/ /\n", ('green', " /// \\\\\\"), " | |/ |/ / / __/ _ / \n", ('green', "/|| // \\\\ ||\\"), " |__/|__/_/\__/\_,_/ \n", ('green', "||| ||"), "(|^|)", ('green', "|| |||"), " ($VERSION) \n".replace("$VERSION", daemon.Hello()), ('green', "\\|| \\\\"), " |+| ", ('green', "// ||/ \n"), ('green', " \\\\\\"), " |+| ", ('green', "///"), " http://launchpad.net/wicd\n", ('green', " \\\\\\"), " |+| ", ('green', "///"), " ", _('Brought to you by:'), "\n", ('green', " \\\\\\"), " |+| ", ('green', "///"), " * Tom Van Braeckel\n", " __|+|__ * Adam Blackburn\n", " ___|+|___ * Dan O'Reilly\n", " ____|+|____ * Andrew Psaltis\n", " |-----------| * David Paleino\n" ] about = TextDialog(theText, 18, 55, header=('header', _('About Wicd'))) about.run(ui, body)
def about_dialog(body): """ About dialog. """ # This looks A LOT better when it is actually displayed. I promise :-). # The ASCII Art "Wicd" was made from the "smslant" font on one of those # online ASCII big text generators. theText = [ ('green', " /// \\\\\\"), " _ ___ __\n", ('green', " /// \\\\\\"), " | | /| / (_)______/ /\n", ('green', " /// \\\\\\"), " | |/ |/ / / __/ _ / \n", ('green', "/|| // \\\\ ||\\"), " |__/|__/_/\__/\_,_/ \n", ('green', "||| ||"), "(|^|)", ('green', "|| |||"), " ($VERSION) \n".replace("$VERSION", daemon.Hello()), ('green', "\\|| \\\\"), " |+| ", ('green', "// ||/ \n"), ('green', " \\\\\\"), " |+| ", ('green', "///"), " http://wicd.net\n", ('green', " \\\\\\"), " |+| ", ('green', "///"), " ", _('Brought to you by:'), "\n", ('green', " \\\\\\"), " |+| ", ('green', "///"), " Adam Blackburn\n", " ___|+|___ Dan O'Reilly\n", " ____|+|____ Andrew Psaltis\n", " |-----------| David Paleino\n", "-----------------------------------------------------"] about = TextDialog(theText, 16, 55, header=('header', _('About Wicd'))) about.run(ui, body)
def run_configscript(parent, netname, nettype): """ Run configuration script. """ configfile = wpath.etc + netname + '-settings.conf' if nettype != 'wired': header = 'profile' else: header = 'BSSID' if nettype == 'wired': profname = nettype else: profname = wireless.GetWirelessProperty(int(netname), 'bssid') theText = [ _('To avoid various complications, wicd-curses does not support directly ' 'editing the scripts. However, you can edit them manually. First, (as root), ' 'open the "$A" config file, and look for the section labeled by the $B in ' 'question. In this case, this is:'). replace('$A', configfile).replace('$B', header), "\n\n[" + profname + "]\n\n", _('You can also configure the wireless networks by looking for the "[<ESSID>]" ' 'field in the config file.'), _('Once there, you can adjust (or add) the "beforescript", "afterscript", ' '"predisconnectscript" and "postdisconnectscript" variables as needed, to ' 'change the preconnect, postconnect, predisconnect and postdisconnect scripts ' 'respectively. Note that you will be specifying the full path to the scripts ' '- not the actual script contents. You will need to add/edit the script ' 'contents separately. Refer to the wicd manual page for more information.') ] dialog = TextDialog(theText, 20, 80) dialog.run(ui, parent)
def about_dialog(body): """ About dialog. """ # This looks A LOT better when it is actually displayed. I promise :-). # The ASCII Art "Wicd" was made from the "smslant" font on one of those # online ASCII big text generators. theText = [ ("green", " /// \\\\\\"), " _ ___ __\n", ("green", " /// \\\\\\"), " | | /| / (_)______/ /\n", ("green", " /// \\\\\\"), " | |/ |/ / / __/ _ / \n", ("green", "/|| // \\\\ ||\\"), " |__/|__/_/\__/\_,_/ \n", ("green", "||| ||"), "(|^|)", ("green", "|| |||"), " ($VERSION) \n".replace("$VERSION", daemon.Hello()), ("green", "\\|| \\\\"), " |+| ", ("green", "// ||/ \n"), ("green", " \\\\\\"), " |+| ", ("green", "///"), " http://launchpad.net/wicd\n", ("green", " \\\\\\"), " |+| ", ("green", "///"), " ", _("Brought to you by:"), "\n", ("green", " \\\\\\"), " |+| ", ("green", "///"), " * Tom Van Braeckel\n", " __|+|__ * Adam Blackburn\n", " ___|+|___ * Dan O'Reilly\n", " ____|+|____ * Andrew Psaltis\n", " |-----------| * David Paleino\n", ] about = TextDialog(theText, 18, 55, header=("header", _("About Wicd"))) about.run(ui, body)