From b5f6fcc702307db2ca531644b9f76c6efea62514 Mon Sep 17 00:00:00 2001 From: Andrew Psaltis Date: Thu, 29 Jan 2009 15:55:32 -0500 Subject: [PATCH 1/2] Merged in (only) r261 of rworkman's branch, which quotes the strings in the wicd-client script. Also, the revision numbers of the mainline have changed on me. r263 contained all of the translations that I requested. --- in/scripts=wicd-client.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/in/scripts=wicd-client.in b/in/scripts=wicd-client.in index 49288fc..a8e2a93 100755 --- a/in/scripts=wicd-client.in +++ b/in/scripts=wicd-client.in @@ -3,15 +3,15 @@ BOLD=$(tput bold) BLUE=$(tput setaf 4) NC=$(tput sgr0) # check_firstrun() -if [ ! -d ~/.wicd ]; then - mkdir -p ~/.wicd +if [ ! -d "~/.wicd" ]; then + mkdir -p "~/.wicd" fi # Make sure the user knows WHEREAREMYFILES ;-) -if [ -e %DOCDIR%WHEREAREMYFILES ] && [ ! -L ~/.wicd/WHEREAREMYFILES ]; then - ln -s %DOCDIR%WHEREAREMYFILES ~/.wicd/WHEREAREMYFILES +if [ -e "%DOCDIR%WHEREAREMYFILES" ] && [ ! -L "~/.wicd/WHEREAREMYFILES" ]; then + ln -s "%DOCDIR%WHEREAREMYFILES" "~/.wicd/WHEREAREMYFILES" fi if [ "$DISPLAY" = "" ] && [ -x "%BIN%wicd-curses" ]; then - if [ ! -f ~/.wicd/CLIENT_CURSES_WARNING ]; then + if [ ! -f "~/.wicd/CLIENT_CURSES_WARNING" ]; then printf "NOTICE: You do not have an X server active on this console, \n" printf "so ${BOLD}${BLUE}wicd-curses${NC} will be started instead. \n" printf "Please see the wicd-client and/or wicd-curses manual pages \n" @@ -21,7 +21,7 @@ if [ "$DISPLAY" = "" ] && [ -x "%BIN%wicd-curses" ]; then printf "Press enter to continue... \n" read _junk - cat >> ~/.wicd/CLIENT_CURSES_WARNING << EOF + cat >> "~/.wicd/CLIENT_CURSES_WARNING" << EOF The wicd-client script checks for the existence of this file to determine whether it should warn the user before launching wicd-curses instead, in the event of the gui client being launched outside of the X Window environment. From e030e5980d95047c38f7abc830d20a335fdbda12 Mon Sep 17 00:00:00 2001 From: Andrew Psaltis Date: Thu, 29 Jan 2009 23:25:02 -0500 Subject: [PATCH 2/2] curses/wicd-curses.py: Applied some typographical changes from rworkman Fixed the script showing dialog for wireless networks. --- curses/wicd-curses.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/curses/wicd-curses.py b/curses/wicd-curses.py index 8db06ee..ab6029f 100644 --- a/curses/wicd-curses.py +++ b/curses/wicd-curses.py @@ -259,17 +259,16 @@ def run_configscript(parent,netname,nettype): configfile = wpath.etc+netname+'-settings.conf' header = 'profile' if nettype == 'wired' else 'BSSID' profname = netname if nettype == 'wired' else wireless.GetWirelessProperty( - netname,'bssid') - + int(netname),'bssid') theText = [ - """To avoid various complications, wicd-curses does not support directly editing the scripts directly. However, you can edit them manually. First, (as root)", open the "%s" config file, and look for the section labeled by the %s in question. In this case, this is: + """To avoid various complications, wicd-curses does not support editing the scripts directly. However, you can edit them manually. First, (as root)", open the "%s" config file, and look for the section labeled by the %s in question. For example, this network is: [%s] -Once here, you can adjust (or add) the "beforescript", "afterscript", and "disconnectscript" variables as needed, to change the preconnect, postconnect, and disconnect scripts respectively. +You can also configure the wireless networks by looking for the "[]" field in the config file. -Alternatively, you can configure the wireless networks by ESSID, by looking for the "[]" field in the config file.""" % (configfile,header,profname)] - dialog = TextDialog(theText,16,80) +Once there, you can adjust (or add) the "beforescript", "afterscript", and "disconnectscript" variables as needed, to change the preconnect, postconnect, and disconnect 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.""" % (configfile,header,profname)] + dialog = TextDialog(theText,20,80) dialog.run(ui,parent) # This code works with many distributions, but not all of them. So, to # limit complications, it has been deactivated. If you want to run it, @@ -828,7 +827,7 @@ class appGUI(): netname = self.wiredCB.get_body().get_selected_profile() else: nettype = 'wireless' - netname = str(self.wiredLB.get_focus()[1]) + netname = str(self.wlessLB.get_focus()[1]) run_configscript(self.frame,netname,nettype) if "O" in keys: exitcode,data = AdHocDialog().run(ui,self.frame)