No longer requires gnome-vfs to play games over the network
This commit is contained in:
parent
8cd90d3352
commit
0c521a6327
|
@ -1,3 +1,4 @@
|
|||
* No longer requires GnomeVFS
|
||||
* Major code cleanup
|
||||
* Now requires pygtk >= 2.12
|
||||
* Transitioned from gtk.glade to gtk.Builder.
|
||||
|
|
2
INSTALL
2
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 )
|
||||
|
|
45
gfceu
45
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()
|
||||
|
|
Loading…
Reference in New Issue