From 0c521a6327fa2472465294a02a2b686074c7180e Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Tue, 24 Jun 2008 04:41:05 +0000 Subject: [PATCH] No longer requires gnome-vfs to play games over the network --- ChangeLog | 1 + INSTALL | 2 -- gfceu | 45 ++------------------------------------------- 3 files changed, 3 insertions(+), 45 deletions(-) diff --git a/ChangeLog b/ChangeLog index e2dac599..877407c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* No longer requires GnomeVFS * Major code cleanup * Now requires pygtk >= 2.12 * Transitioned from gtk.glade to gtk.Builder. diff --git a/INSTALL b/INSTALL index eb210c0a..86a50427 100644 --- a/INSTALL +++ b/INSTALL @@ -9,5 +9,3 @@ Python (tested with 2.5); (Ubuntu package name: python) 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 -Optional: -GnomeVFS 2 (tested with 2.14.1) (Ubuntu package name libgnomevfs2-0 ) diff --git a/gfceu b/gfceu index 5df29922..b8e7df9c 100644 --- a/gfceu +++ b/gfceu @@ -41,17 +41,6 @@ except ImportError: On Debian based systems (like Ubuntu), try this command:\n\ 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() == '': self.msg('Please specify a ROM to open in the main tab.', True) 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() - myfile.close() - romfile = '/tmp/gfceu.nes' - else: - romfile = options.romfile - - self.launch('"'+romfile+'"') + self.launch('"'+ options.romfile +'"') def about_button_clicked(self, menuitem, data=None): widgets.get_object("about_dialog").set_name('GNOME FCE Ultra '+version) @@ -465,11 +428,7 @@ class GfceuApp: gtk.FILE_CHOOSER_ACTION_OPEN, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) - if have_gnomevfs: - chooser.set_property("local-only", False) - else: - chooser.set_property("local-only", True) - + chooser.set_property("local-only", False) chooser.set_default_response(gtk.RESPONSE_OK) filter=gtk.FileFilter()