[gnome-boxes] remote-machine: Save name on change
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] remote-machine: Save name on change
- Date: Sat, 16 Aug 2014 16:27:55 +0000 (UTC)
commit fa7b6529c3b7966cfe4489f81d82fb2307f0cfef
Author: Adrien Plazas <kekun plazas laposte net>
Date: Wed Mar 12 15:22:11 2014 +0100
remote-machine: Save name on change
This patch ensures that the machine's name is saved everytime it changes.
Also, together with following patches this allows editing name through
window's title.
https://bugzilla.gnome.org/show_bug.cgi?id=692383
src/remote-machine.vala | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/remote-machine.vala b/src/remote-machine.vala
index 1cccc68..b8d3afb 100644
--- a/src/remote-machine.vala
+++ b/src/remote-machine.vala
@@ -18,6 +18,8 @@ private class Boxes.RemoteMachine: Boxes.Machine, Boxes.IPropertiesProvider {
config.access_last_time = get_real_time ();
load_screenshot ();
+
+ notify["name"].connect (save_name);
}
private Display? create_display () throws Boxes.Error {
@@ -53,7 +55,7 @@ private class Boxes.RemoteMachine: Boxes.Machine, Boxes.IPropertiesProvider {
var property = add_string_property (ref list, _("Name"), source.name);
property.editable = true;
property.changed.connect ((property, name) => {
- source.name = name;
+ this.name = name;
return true;
});
@@ -93,4 +95,8 @@ private class Boxes.RemoteMachine: Boxes.Machine, Boxes.IPropertiesProvider {
// FIXME: Implement this. We don't currently need it because we don't set any properties here that
requires a
// restart and this method is currently used for that purpose only.
public override void restart () {}
+
+ private void save_name () {
+ source.name = name;
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]