No longer requires gnome-vfs to play games over the network

This commit is contained in:
punkrockguy318 2008-06-24 04:41:05 +00:00
parent 8cd90d3352
commit 0c521a6327
3 changed files with 3 additions and 45 deletions

View File

@ -1,3 +1,4 @@
* No longer requires GnomeVFS
* Major code cleanup * Major code cleanup
* Now requires pygtk >= 2.12 * Now requires pygtk >= 2.12
* Transitioned from gtk.glade to gtk.Builder. * Transitioned from gtk.glade to gtk.Builder.

View File

@ -9,5 +9,3 @@ Python (tested with 2.5); (Ubuntu package name: python)
PyGTK, and GTK; (Ubuntu package name: (python-gtk2 libgtk2.0-0) PyGTK, and GTK; (Ubuntu package name: (python-gtk2 libgtk2.0-0)
FCE UltraX - You're going to need the latest fceux for gfceu .7 to work FCE UltraX - You're going to need the latest fceux for gfceu .7 to work
Optional:
GnomeVFS 2 (tested with 2.14.1) (Ubuntu package name libgnomevfs2-0 )

45
gfceu
View File

@ -41,17 +41,6 @@ except ImportError:
On Debian based systems (like Ubuntu), try this command:\n\ On Debian based systems (like Ubuntu), try this command:\n\
sudo apt-get install python-gtk2 libgtk2.0-0" sudo apt-get install python-gtk2 libgtk2.0-0"
try:
import gnomevfs
have_gnomevfs = True
except ImportError:
print "The gnomevfs libraries cannot be found.\n\
To enable ROM loading over the network, ensure that gnomevfs is installed on\
this system.\n\
On Debian based systems (like Ubuntu), try this command:\n\
sudo apt-get install python-gtk2 libgnomevfs2-0"
have_gnomevfs = False
@ -424,34 +413,8 @@ class GfceuApp:
if widgets.get_object("rom_entry").get_text() == '': if widgets.get_object("rom_entry").get_text() == '':
self.msg('Please specify a ROM to open in the main tab.', True) self.msg('Please specify a ROM to open in the main tab.', True)
return return
if options.network_rom:
try:
myvfs = gnomevfs.Handle(options.romfile)
# FIXME
# Smarter way of handling this? Copying direct error information?
except gnomevfs.HostNotFoundError:
gfceu_error("Remote ROM host not found.", 7, True, False)
return
except:
gfceu_error("Failed to open the network ROM.", 6, True, False)
return
myfile = file('/tmp/gfceu.nes', 'wb')
while 1:
try:
myfile.write(myvfs.read(1024))
except gnomevfs.EOFError:
break
except:
gfceu_error("Failed to open the network ROM.", 10, True, False)
return
myvfs.close() self.launch('"'+ options.romfile +'"')
myfile.close()
romfile = '/tmp/gfceu.nes'
else:
romfile = options.romfile
self.launch('"'+romfile+'"')
def about_button_clicked(self, menuitem, data=None): def about_button_clicked(self, menuitem, data=None):
widgets.get_object("about_dialog").set_name('GNOME FCE Ultra '+version) widgets.get_object("about_dialog").set_name('GNOME FCE Ultra '+version)
@ -465,11 +428,7 @@ class GfceuApp:
gtk.FILE_CHOOSER_ACTION_OPEN, gtk.FILE_CHOOSER_ACTION_OPEN,
(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
gtk.STOCK_OPEN, gtk.RESPONSE_OK)) gtk.STOCK_OPEN, gtk.RESPONSE_OK))
if have_gnomevfs: chooser.set_property("local-only", False)
chooser.set_property("local-only", False)
else:
chooser.set_property("local-only", True)
chooser.set_default_response(gtk.RESPONSE_OK) chooser.set_default_response(gtk.RESPONSE_OK)
filter=gtk.FileFilter() filter=gtk.FileFilter()