[gnome-boxes] source: do not save automatically if it didn't exist
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] source: do not save automatically if it didn't exist
- Date: Mon, 6 Feb 2012 18:27:13 +0000 (UTC)
commit e57da6fd5a9aee3932dace4cf896960fc1bd3a9e
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date: Thu Feb 2 12:00:08 2012 +0100
source: do not save automatically if it didn't exist
https://bugzilla.gnome.org/show_bug.cgi?id=669409
src/collection-source.vala | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/collection-source.vala b/src/collection-source.vala
index d45f838..93f1805 100644
--- a/src/collection-source.vala
+++ b/src/collection-source.vala
@@ -68,9 +68,11 @@ private class Boxes.CollectionSource: GLib.Object, Boxes.IConfig {
owned get { return get_string ("source", "name"); }
set {
keyfile.set_string ("source", "name", value);
+ var had_file = has_file;
this.delete ();
_filename = null;
- save ();
+ if (had_file)
+ save ();
}
}
public string? source_type {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]