changed coding style to 4 spaces for indent (from 2). note to self: never use two spaces again its impossible to read
This commit is contained in:
parent
b0d4eb7035
commit
a006cb249a
32
gfceux
32
gfceux
|
@ -119,11 +119,13 @@ def give_widgets():
|
|||
widgets.get_object("fullscreen_check").set_active(options.fullscreen_check)
|
||||
widgets.get_object("opengl_check").set_active(options.opengl_check)
|
||||
widgets.get_object("autoscale_check").set_active(options.autoscale_check)
|
||||
|
||||
# set/unset sensitivity on manual scaling
|
||||
if widgets.get_object("autoscale_check").get_active():
|
||||
widgets.get_object("scaling_frame").set_sensitive(False)
|
||||
else:
|
||||
widgets.get_object("scaling_frame").set_sensitive(True)
|
||||
# TODO: idk if i like this really
|
||||
#if widgets.get_object("autoscale_check").get_active():
|
||||
# widgets.get_object("scaling_frame").set_sensitive(False)
|
||||
#else:
|
||||
# widgets.get_object("scaling_frame").set_sensitive(True)
|
||||
widgets.get_object("xscale_spin").set_value(options.xscale_spin)
|
||||
widgets.get_object("yscale_spin").set_value(options.yscale_spin)
|
||||
|
||||
|
@ -204,8 +206,6 @@ def find_binary(file):
|
|||
if os.path.isfile(os.path.join(x, file)):
|
||||
return os.path.join(x,file)
|
||||
|
||||
|
||||
|
||||
return None
|
||||
|
||||
|
||||
|
@ -348,7 +348,6 @@ class GfceuxApp:
|
|||
|
||||
|
||||
# Netplay is fucked right now
|
||||
|
||||
if options.join_radio:
|
||||
if options.join_pass == '':
|
||||
netpass = ''
|
||||
|
@ -364,11 +363,9 @@ class GfceuxApp:
|
|||
if options.host_pass == '':
|
||||
netpass = ' '
|
||||
else:
|
||||
# netpass = ' --pass ' + '"' + options.host_pass + '" '
|
||||
netpass = ' --pass ' + options.host_pass
|
||||
netpass = ' --pass ' + '"' + options.host_pass + '" '
|
||||
network = '--net localhost --port '+\
|
||||
str(options.host_port) + netpass + ' '
|
||||
"""
|
||||
str(options.host_port) + netpass + ' '"""
|
||||
network = ''
|
||||
|
||||
if local:
|
||||
|
@ -414,7 +411,6 @@ class GfceuxApp:
|
|||
|
||||
### Callbacks
|
||||
def launch_button_clicked(self, arg1):
|
||||
|
||||
global options
|
||||
options.romfile = widgets.get_object("rom_entry").get_text()
|
||||
if widgets.get_object("rom_entry").get_text() == '':
|
||||
|
@ -547,6 +543,7 @@ class GfceuxApp:
|
|||
widgets.get_object("movie_entry").set_text("")
|
||||
widgets.get_object("lua_entry").set_text("")
|
||||
options.romfile = x
|
||||
|
||||
# fix this global its ugly
|
||||
gamepad_config = "0"
|
||||
|
||||
|
@ -573,11 +570,8 @@ class GfceuxApp:
|
|||
key = kg.get_key()
|
||||
cp = FceuxConfigParser(configfile)
|
||||
cp.writeKey(d[widget.name], key)
|
||||
print d[widget.name]
|
||||
|
||||
|
||||
def gamepad_clicked_old(self, widget, data=None):
|
||||
|
||||
d = {'gp1_button' : '1',
|
||||
'gp2_button' : '2',
|
||||
'gp3_button' : '3',
|
||||
|
@ -599,7 +593,6 @@ class GfceuxApp:
|
|||
msgbox.run()
|
||||
msgbox.hide()
|
||||
|
||||
|
||||
def join_radio_clicked(self, menuitem, data=None):
|
||||
global options
|
||||
widgets.get_object("join_frame").set_sensitive(True)
|
||||
|
@ -609,6 +602,8 @@ class GfceuxApp:
|
|||
options.no_network_radio = False
|
||||
|
||||
def host_radio_clicked(self, menuitem, data=None):
|
||||
"""
|
||||
this is broken in fceux right now
|
||||
if widgets.get_object("host_radio").get_active():
|
||||
self.server_binary = find_binary('fceu-server')
|
||||
|
||||
|
@ -630,6 +625,8 @@ class GfceuxApp:
|
|||
options.join_radio = False
|
||||
options.host_radio = True
|
||||
options.no_network_radio = False
|
||||
"""
|
||||
pass
|
||||
|
||||
def no_network_radio_clicked(self, menuitem, data=None):
|
||||
widgets.get_object("join_frame").set_sensitive(False)
|
||||
|
@ -643,11 +640,8 @@ class GfceuxApp:
|
|||
save_options()
|
||||
gtk.main_quit()
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = OptionParser(version='%prog '+ version)
|
||||
parser.parse_args()
|
||||
|
||||
app = GfceuxApp()
|
||||
|
||||
|
|
Loading…
Reference in New Issue