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