From 7205b82ad9abb002a2947dee16b1bb6ae2cb5511 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Mon, 22 Sep 2008 08:17:49 +0000 Subject: [PATCH] UI improvements and code cleanup; changelog for details --- ChangeLog | 4 + gfceux | 21 +++- gfceux.glade | 340 ++++++++++++++++++++++++++++----------------------- gfceux.xml | 339 +++++++++++++++++++++++++++----------------------- 4 files changed, 394 insertions(+), 310 deletions(-) diff --git a/ChangeLog b/ChangeLog index 525eca73..6a898e9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +* Updated UI slightly. Moved sound and advanced tabs; made autoscaling + configuration a bit more intuitive; rearranged some items; made some + text more clear +* Changed gfceu code references to gfceux * Fixed error in which gfceux would display an ugly error message if the fceux binary could not be found. * Working on new config system for input. you can try by configuring diff --git a/gfceux b/gfceux index aeba1dfe..520fe23b 100755 --- a/gfceux +++ b/gfceux @@ -1,7 +1,7 @@ #!/usr/bin/python # gfceux - Graphical launcher for fceux. # Designed on Ubuntu, with platfrom independence in mind. -version = "2.0.2" +version = "2.0.2svn" title = "gfceux" # Copyright (C) 2008 Lukas Sabota ## @@ -117,6 +117,11 @@ 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) widgets.get_object("xscale_spin").set_value(options.xscale_spin) widgets.get_object("yscale_spin").set_value(options.yscale_spin) @@ -208,9 +213,9 @@ options = None optionsfile = os.getenv('HOME') + '/.fceultra/gfceux_options.dat' widgets = None -class GfceuApp: +class GfceuxApp: def __init__(self): - self.fceux_binary = self.find_fceu() + self.fceux_binary = self.find_fceux() self.load_ui() options = GameOptions() @@ -252,7 +257,7 @@ class GfceuApp: if fatal: sys.exit(code) - def find_fceu(self): + def find_fceux(self): bin = find_binary('fceux') if bin == None: self.print_error('Could not find the fceux binary.\n\ @@ -413,6 +418,12 @@ class GfceuApp: return self.launch('"'+ options.romfile +'"') + + def autoscale_check_toggled(self, menuitem, data=None): + 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) def about_button_clicked(self, menuitem, data=None): widgets.get_object("about_dialog").set_name('GFCE UltraX '+version) @@ -632,5 +643,5 @@ if __name__ == '__main__': parser = OptionParser(version='%prog '+ version) parser.parse_args() - app = GfceuApp() + app = GfceuxApp() diff --git a/gfceux.glade b/gfceux.glade index 7713367d..fd6c5fc0 100644 --- a/gfceux.glade +++ b/gfceux.glade @@ -1,6 +1,6 @@ - + @@ -579,6 +579,19 @@ 1 + + + True + <small><i>(Press Alt+Enter to toggle fullscreen in-game.)</i></small> + True + True + + + False + False + 2 + + True @@ -588,38 +601,7 @@ 0 True True - - - False - 2 - - - - - True - - - True - X scale: - - - False - 5 - - - - - True - True - 1 1 5 0.5 1 10 - 1 - True - - - False - 1 - - + False @@ -627,35 +609,97 @@ - + True + 0 + GTK_SHADOW_NONE - + True - Y scale: + 12 + + + True + + + True + + + True + X scale: + + + False + 5 + + + + + True + True + 2 1 5 0.5 1 10 + 1 + True + + + False + 1 + + + + + False + + + + + True + + + True + Y scale: + + + False + 5 + + + + + True + True + 2 1 10 0.5 1 10 + 1 + True + GTK_UPDATE_IF_VALID + + + False + 1 + + + + + False + 1 + + + + - - False - 5 - - + True - True - 1 1 10 0.5 1 10 - 1 - True - GTK_UPDATE_IF_VALID + <b>Manual Scaling</b> + True - False - 1 + label_item - False 4 @@ -676,34 +720,26 @@ True True + 2 32 + False + False 1 - - False - 5 - - - - - True - <small><i>(Press Alt+Enter to toggle fullscreen in-game.)</i></small> - True - True - False False - 6 + 5 2 + False @@ -718,93 +754,7 @@ - - True - 5 - 5 - - - True - - - True - gtk-dialog-info - - - False - False - - - - - True - If you would like to specify any command line options to FCE Ultra, specify them below. For a complete option reference, consult the official FCE Ultra documentation. - -Invalid options may cause GFCE Ultra to perform incorrectly. - - True - - - False - False - 1 - - - - - False - False - 5 - - - - - True - - - True - Extra Parameters: - - - False - False - 5 - - - - - True - True - - - 5 - 1 - - - - - False - 1 - - - - - 3 - - - - - True - Advanced - - - tab - 3 - False - - - - + True 5 @@ -856,6 +806,7 @@ Invalid options may cause GFCE Ultra to perform incorrectly. True True + 6 11000 @@ -889,6 +840,7 @@ Invalid options may cause GFCE Ultra to perform incorrectly. True True + 3 48 @@ -905,14 +857,99 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - 4 + 3 + + + + + True + Sound + + + tab + 3 False + + + True + 5 + 5 + + + True + + + True + gtk-dialog-info + + + False + False + + + + + True + If you would like to specify any command line options to FCE UltraX, specify them below. For a complete option reference, visit http://fceux.com . + +Invalid options may cause GFCE UltraX to behave incorrectly. + + True + + + False + False + 1 + + + + + False + False + 5 + + + + + True + + + True + Extra Parameters: + + + False + False + 5 + + + + + True + True + + + 5 + 1 + + + + + False + 1 + + + + + 4 + + True - Sound + Advanced tab @@ -1167,7 +1204,6 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - True False Network diff --git a/gfceux.xml b/gfceux.xml index 3fb1f252..b6be8ccd 100644 --- a/gfceux.xml +++ b/gfceux.xml @@ -1,5 +1,5 @@ - + 5 @@ -7,7 +7,7 @@ 1 0.5 10 - 1 + 2 10 @@ -15,7 +15,7 @@ 1 0.5 10 - 1 + 2 65536 @@ -578,6 +578,19 @@ 1 + + + True + <small><i>(Press Alt+Enter to toggle fullscreen in-game.)</i></small> + True + True + + + False + False + 2 + + True @@ -586,38 +599,7 @@ True True True - - - False - 2 - - - - - True - - - True - X scale: - - - False - 5 - - - - - True - True - adjustment1 - 1 - True - - - False - 1 - - + False @@ -625,35 +607,94 @@ - + True + 0 + GTK_SHADOW_NONE - + True - Y scale: + 12 + + + True + + + True + + + True + X scale: + + + False + 5 + + + + + True + True + adjustment1 + 1 + True + + + False + 1 + + + + + False + + + + + True + + + True + Y scale: + + + False + 5 + + + + + True + True + adjustment2 + 1 + True + GTK_UPDATE_IF_VALID + + + False + 1 + + + + + False + 1 + + + + - - False - 5 - - - + + True - True - adjustment2 - 1 - True - GTK_UPDATE_IF_VALID + <b>Manual Scaling</b> + True - - False - 1 - - False 4 @@ -674,32 +715,27 @@ True True + 2 32 + False + False 1 False + False 5 - - - True - <small><i>(Press Alt+Enter to toggle fullscreen in-game.)</i></small> - True - True - - - False - False - 6 - - + + 2 + False + @@ -712,89 +748,7 @@ - - True - 5 - 5 - - - True - - - True - gtk-dialog-info - - - False - False - - - - - True - If you would like to specify any command line options to FCE Ultra, specify them below. For a complete option reference, consult the official FCE Ultra documentation. - -Invalid options may cause GFCE Ultra to perform incorrectly. - - True - - - False - False - 1 - - - - - False - False - 5 - - - - - True - - - True - Extra Parameters: - - - False - False - 5 - - - - - True - True - - - 5 - 1 - - - - - False - 1 - - - - - - - True - Advanced - - - 3 - False - - - - + True 5 @@ -844,6 +798,7 @@ Invalid options may cause GFCE Ultra to perform incorrectly. True True + 6 11000 @@ -877,6 +832,7 @@ Invalid options may cause GFCE Ultra to perform incorrectly. True True + 3 48 @@ -892,15 +848,93 @@ Invalid options may cause GFCE Ultra to perform incorrectly. + + + + True + Sound + - 4 + 3 False + + + True + 5 + 5 + + + True + + + True + gtk-dialog-info + + + False + False + + + + + True + If you would like to specify any command line options to FCE UltraX, specify them below. For a complete option reference, visit http://fceux.com . + +Invalid options may cause GFCE UltraX to behave incorrectly. + + True + + + False + False + 1 + + + + + False + False + 5 + + + + + True + + + True + Extra Parameters: + + + False + False + 5 + + + + + True + True + + + 5 + 1 + + + + + False + 1 + + + + True - Sound + Advanced 4 @@ -1148,7 +1182,6 @@ Invalid options may cause GFCE Ultra to perform incorrectly. - True False Network