def edit_scripts(self, widget=None, event=None):
     """ Launch the script editting dialog. """
     if os.getuid() != 0:
         try:
             sudo_prog = misc.choose_sudo_prog()
             msg = "You must enter your password to configure scripts"
             if sudo_prog.endswith("gksu") or sudo_prog.endswith("ktsuss"):
                 msg_flag = "-m"
             else:
                 msg_flag = "--caption"
             misc.LaunchAndWait([sudo_prog, msg_flag, msg,
                                 wpath.lib + "configscript.py",
                                 str(self.networkID), "wireless"])
         except IOError:
             error(None, "Could not find a graphical sudo program." + \
                   "  Script editor could no be launched.")
     else:
         misc.LaunchAndWait(["./configscript.py", str(self.networkID),
                            "wireless"])
 def edit_scripts(self, widget=None, event=None):
     """ Launch the script editting dialog. """
     profile = self.combo_profile_names.get_active_text()
     if os.getuid() != 0:
         try:
             sudo_prog = misc.choose_sudo_prog()
             msg = "You must enter your password to configure scripts"
             if sudo_prog.endswith("gksu") or sudo_prog.endswith("ktsuss"):
                 msg_flag = "-m"
             else:
                 msg_flag = "--caption"
             misc.LaunchAndWait([sudo_prog, msg_flag, msg,
                                 wpath.lib + "configscript.py", profile,
                                 "wired"])
         except misc.WicdError:
             error(None, "Could not find a graphical sudo program." + \
                   "  Script editor could not be launched.")
     else:
         misc.LaunchAndWait([wpath.lib + "configscript.py", profile, "wired"])