diff --git a/in/wicd=wpath.py.in b/in/wicd=wpath.py.in index c5a5fee..985874f 100755 --- a/in/wicd=wpath.py.in +++ b/in/wicd=wpath.py.in @@ -58,8 +58,7 @@ no_install_init = %NO_INSTALL_INIT% no_install_man = %NO_INSTALL_MAN% no_install_kde = %NO_INSTALL_KDE% no_install_acpi = %NO_INSTALL_ACPI% -no_install_install = %NO_INSTALL_INSTALL% -no_install_license = %NO_INSTALL_LICENSE% +no_install_docs = %NO_INSTALL_DOCS% def chdir(file): """Change directory to the location of the specified file. diff --git a/in/wpath.py.in b/in/wpath.py.in deleted file mode 100644 index bd491be..0000000 --- a/in/wpath.py.in +++ /dev/null @@ -1 +0,0 @@ -link wicd=wpath.py.in \ No newline at end of file diff --git a/in/wpath.py.in b/in/wpath.py.in new file mode 120000 index 0000000..920fa33 --- /dev/null +++ b/in/wpath.py.in @@ -0,0 +1 @@ +wicd=wpath.py.in \ No newline at end of file diff --git a/init/slackware/rc.wicd b/init/slackware/rc.wicd index f043e27..343051e 100755 --- a/init/slackware/rc.wicd +++ b/init/slackware/rc.wicd @@ -17,6 +17,10 @@ wicd_start() { else echo "Starting wicd daemon..." wicd 2>/dev/null 1>&2 + # Activate the pm-utils sleep hook + if [ ! -x /usr/lib/pm-utils/sleep.d/55wicd ]; then + chmod +x /usr/lib/pm-utils/sleep.d/55wicd + fi fi } @@ -28,6 +32,11 @@ wicd_stop() { else pkill -f python.*wicd-daemon.py 2>/dev/null fi + # Deactivate the pm-utils sleep hook + if [ -x /usr/lib/pm-utils/sleep.d/55wicd ]; then + chmod -x /usr/lib/pm-utils/sleep.d/55wicd + fi + } # See how we were called and take appropriate action @@ -49,3 +58,4 @@ case $1 in ;; esac + diff --git a/wicd/misc.py b/wicd/misc.py index a76bd46..2c46ec1 100644 --- a/wicd/misc.py +++ b/wicd/misc.py @@ -21,6 +21,7 @@ import os import locale import gettext import sys +import re from threading import Thread from subprocess import Popen, STDOUT, PIPE, call from commands import getoutput @@ -347,13 +348,13 @@ def detect_desktop_environment(): def get_sudo_cmd(msg): """ Returns a graphical sudo command for generic use. """ - sudo_prog = misc.choose_sudo_prog() + sudo_prog = choose_sudo_prog() if not sudo_prog: return None - if sudo_prog.endswith("gksu") or sudo_prog.endswith("ktsuss"): + if re.search("(ktsuss|gksu|gksudo)$", sudo_prog): msg_flag = "-m" else: msg_flag = "--caption" - misc.LaunchAndWait([sudo_prog, msg_flag, msg]) + return [sudo_prog, msg_flag, msg] def choose_sudo_prog(): """ Try to intelligently decide which graphical sudo program to use. """ diff --git a/wicd/netentry.py b/wicd/netentry.py index f2f0b54..2e94691 100644 --- a/wicd/netentry.py +++ b/wicd/netentry.py @@ -570,11 +570,12 @@ class WiredNetworkEntry(NetworkEntry): profile = self.combo_profile_names.get_active_text() cmdend = [os.path.join(wpath.lib, "configscript.py"), profile, "wired"] if os.getuid() != 0: - cmdbase = misc.get_sudo_cmd() + cmdbase = misc.get_sudo_cmd(language['scripts_need_pass']) if not cmdbase: error(None, language["no_sudo_prog"]) return cmdbase.extend(cmdend) + misc.LaunchAndWait(cmdbase) else: misc.LaunchAndWait(cmdend) @@ -839,11 +840,12 @@ class WirelessNetworkEntry(NetworkEntry): cmdend = [os.path.join(wpath.lib, "configscript.py"), str(self.networkID), "wireless"] if os.getuid() != 0: - cmdbase = misc.get_sudo_cmd() + cmdbase = misc.get_sudo_cmd(language['scripts_need_pass']) if not cmdbase: error(None, language["no_sudo_prog"]) return cmdbase.extend(cmdend) + misc.LaunchAndWait(cmdbase) else: misc.LaunchAndWait(cmdend) diff --git a/wicd/prefs.py b/wicd/prefs.py index 3709d97..e4761c0 100644 --- a/wicd/prefs.py +++ b/wicd/prefs.py @@ -241,7 +241,7 @@ class PreferencesDialog(object): daemon.SetAlwaysShowWiredInterface(self.wiredcheckbox.get_active()) daemon.SetAutoReconnect(self.reconnectcheckbox.get_active()) daemon.SetDebugMode(self.debugmodecheckbox.get_active()) - daemon.SetSignalDisplayType(self.displaytypecheckbox.get_active()) + daemon.SetSignalDisplayType(int(self.displaytypecheckbox.get_active())) if self.showlistradiobutton.get_active(): daemon.SetWiredAutoConnectMethod(2) elif self.lastusedradiobutton.get_active(): diff --git a/wicd/wpath.py b/wicd/wpath.py old mode 100644 new mode 100755 index 3ce2d6b..6dbedc8 --- a/wicd/wpath.py +++ b/wicd/wpath.py @@ -58,8 +58,7 @@ no_install_init = False no_install_man = False no_install_kde = False no_install_acpi = False -no_install_install = False -no_install_license = False +no_install_docs = False def chdir(file): """Change directory to the location of the specified file.