[gnome-boxes] Better naming for new VM boxes
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Better naming for new VM boxes
- Date: Tue, 8 May 2012 14:14:43 +0000 (UTC)
commit 3e7fd98d23da11014119fa8c4b9f8e8510287703
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Apr 25 04:10:06 2012 +0300
Better naming for new VM boxes
* Remove redundant check for availability of OS info. This is already
taken care of elsewhere when label is selected.
* Resolve name conflict by appending ' 2' rather than '-1'.
https://bugzilla.gnome.org/show_bug.cgi?id=674328
src/vm-creator.vala | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index 51005ca..f3666a0 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -139,12 +139,12 @@ private class Boxes.VMCreator {
}
private async string create_domain_name_from_media (InstallerMedia install_media) throws GLib.Error {
- var base_name = (install_media.os != null) ? install_media.os.name : install_media.label;
+ var base_name = install_media.label;
var name = base_name;
var pool = yield get_storage_pool ();
- for (var i = 1; connection.find_domain_by_name (name) != null || pool.get_volume (name) != null; i++)
- name = base_name + "-" + i.to_string ();
+ for (var i = 2; connection.find_domain_by_name (name) != null || pool.get_volume (name) != null; i++)
+ name = base_name + " " + i.to_string ();
return name;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]