[gnome-boxes/wip/image-import: 17/18] collection-view: Don't let user launch under-import VMs
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/wip/image-import: 17/18] collection-view: Don't let user launch under-import VMs
- Date: Fri, 7 Jun 2013 00:30:37 +0000 (UTC)
commit c131df9721ba9583af0caf4bda617b1259cef255
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Jun 6 03:29:04 2013 +0300
collection-view: Don't let user launch under-import VMs
Launching of such VMs doesn't make any sense.
src/collection-view.vala | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/collection-view.vala b/src/collection-view.vala
index 78f8835..e92cae1 100644
--- a/src/collection-view.vala
+++ b/src/collection-view.vala
@@ -312,6 +312,13 @@ private class Boxes.CollectionView: Boxes.UI {
main_view.get_style_context ().add_class ("boxes-icon-view");
main_view.item_activated.connect ((view, id, path) => {
var item = get_item_for_path (path);
+ if (item is LibvirtMachine && (item as LibvirtMachine).importing) {
+ // FIXME: Better error message!
+ var msg = _("Launching of a box that is being imported, is not possible.");
+ App.app.notificationbar.display_error (msg);
+
+ return;
+ }
App.app.select_item (item);
});
main_view.view_selection_changed.connect (() => {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]