diff -up expendable-0.0.9/main.py.save expendable-0.0.9/main.py
--- expendable-0.0.9/main.py.save 2008-11-15 10:28:02.000000000 +0000
+++ expendable-0.0.9/main.py 2010-01-06 17:52:49.800284933 +0000
@@ -2,7 +2,7 @@
## expendable
-## Copyright (C) 2008 Tim Waugh <twaugh@redhat.com>
+## Copyright (C) 2008, 2010 Tim Waugh <twaugh@redhat.com>
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -923,7 +923,7 @@ class Main:
gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
gtk.STOCK_SAVE, gtk.RESPONSE_YES)
filename = self.xmlfile.get_filename ()
- requires_filename = (filename == None)
+ requires_filename = (filename == None or self.xmlfile.is_readonly ())
if requires_filename:
filename = _("Untitled")
m.set_markup ('<span size="larger" weight="bold">' +
@@ -938,7 +938,10 @@ class Main:
response = self.file_chooser_dialog.run ()
self.file_save_as_response (self.file_chooser_dialog, response)
else:
- self.xmlfile.save ()
+ self.file_save (None)
+
+ if self.check_if_changes_made ():
+ response = gtk.RESPONSE_CANCEL
return response