From 0b512f29f4cbe271b0e338a06baf0f47bea05097 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 8 Jan 2010 03:31:35 +0000 Subject: [PATCH] fixed indentation issue changed default uninstlal folder to /usr/local --- src/main.py | 39 +++++++++++++++++++-------------------- uninstall.py | 2 +- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/main.py b/src/main.py index 16902fa0..2a489f8e 100755 --- a/src/main.py +++ b/src/main.py @@ -365,13 +365,12 @@ class GfceuxApp: network = '' if options.host_radio: - """ if options.host_pass == '': netpass = ' ' else: netpass = ' --pass ' + '"' + options.host_pass + '" ' network = '--net localhost --port '+\ - str(options.host_port) + netpass + ' '""" + str(options.host_port) + netpass + ' ' network = '' if local: @@ -383,27 +382,27 @@ class GfceuxApp: self.msg('Command: ' + command) - if options.host_radio: - xterm_binary = find_binary("xterm") - if xterm_binary == None: - gfceu_error("Cannot find xterm on this system. You will not \n\ - be informed of server output.", 102, True, False) - args = [self.server_binary] - else: - args = [xterm_binary, "-e", self.server_binary] - args.append('--port') - args.append(str(options.host_port)) - if options.host_pass: - args.append("--password") - args.append(options.host_pass) - pid = Popen(args).pid - + if options.host_radio: + xterm_binary = find_binary("xterm") + if xterm_binary == None: + gfceu_error("Cannot find xterm on this system. You will not \n\ + be informed of server output.", 102, True, False) + args = [self.server_binary] + else: + args = [xterm_binary, "-e", self.server_binary] + args.append('--port') + args.append(str(options.host_port)) + if options.host_pass: + args.append("--password") + args.append(options.host_pass) + pid = Popen(args).pid + widgets.get_object("main_window").hide() # os.system() is a blocker, so we must force # gtk to process our events. while gtk.events_pending(): - gtk.main_iteration_do() + gtk.main_iteration_do() os.system(command) widgets.get_object("main_window").show() @@ -621,9 +620,9 @@ class GfceuxApp: def host_radio_clicked(self, menuitem, data=None): if widgets.get_object("host_radio").get_active(): - self.server_binary = find_binary('fceux-server') + options.server_binary = find_binary('fceux-server') - if self.server_binary == None: + if options.server_binary == None: if os.name == 'nt': self.print_error("The fceux server software cannot be found. \n\ Ensure that it is installed in the same directory as \n\ diff --git a/uninstall.py b/uninstall.py index 75b56b5a..3ccfb1a1 100755 --- a/uninstall.py +++ b/uninstall.py @@ -13,7 +13,7 @@ import os import dircache import sys -prefix = "/usr/" +prefix = "/usr/local" try: if sys.argv[1]: prefix = sys.argv[1]