[gnome-boxes/gnome-3-16] machine: Ensure "Saving …" status goes away on error
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/gnome-3-16] machine: Ensure "Saving …" status goes away on error
- Date: Tue, 12 May 2015 21:12:30 +0000 (UTC)
commit a35f27931e139dbaec9a3efd962136b1407e971b
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Mon Apr 27 17:04:36 2015 +0100
machine: Ensure "Saving…" status goes away on error
If saving of machine fails, the "Saving…" status message under the
machine thumbnail in overview does not disappear. This patch ensures
that it does.
https://bugzilla.gnome.org/show_bug.cgi?id=748381
src/machine.vala | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/machine.vala b/src/machine.vala
index 4159eab..81cd884 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -264,9 +264,11 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
this.info = (info != null)? info + "\n" : "";
this.info += _("Saving…");
- yield save_real ();
-
- this.info = info;
+ try {
+ yield save_real ();
+ } finally {
+ this.info = info;
+ }
}
public void schedule_autosave () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]