diff --git a/expendable-save.patch b/expendable-save.patch new file mode 100644 index 0000000..0c556fd --- /dev/null +++ b/expendable-save.patch @@ -0,0 +1,33 @@ +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 ++## Copyright (C) 2008, 2010 Tim Waugh + + ## 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 ('' + +@@ -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 + diff --git a/expendable.spec b/expendable.spec index d95badc..1c15455 100644 --- a/expendable.spec +++ b/expendable.spec @@ -1,13 +1,15 @@ Summary: Home finances modeling program Name: expendable Version: 0.0.9 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Productivity URL: https://fedorahosted.org/expendable/ # Add "?format=raw" to the following URL to download file: Source0: https://fedorahosted.org/releases/e/x/expendable/%{name}-%{version}.tar.xz +Patch1: expendable-save.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python @@ -28,6 +30,7 @@ amount. %prep %setup -q +%patch1 -p1 -b .save %build %configure @@ -83,6 +86,9 @@ fi %{_datadir}/applications/*.desktop %changelog +* Wed Jan 9 2010 Tim Waugh 0.0.9-2 +- Fixed save-on-exit (bug #551337). + * Mon Oct 12 2009 Tim Waugh 0.0.9-1 - 0.0.9.