[gnome-boxes] machine: Ensure thumbnail update in properties sidebar
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] machine: Ensure thumbnail update in properties sidebar
- Date: Tue, 4 Mar 2014 13:24:55 +0000 (UTC)
commit b18309719911a49007642a14c3318d16d6ee31d2
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Mon Mar 3 20:42:00 2014 +0000
machine: Ensure thumbnail update in properties sidebar
Only update thumbnail for current item and ensure thumbnail gets updated
when going to properties view.
src/machine.vala | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/machine.vala b/src/machine.vala
index 3bb4be1..415b563 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -368,7 +368,8 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
orig_pixbuf = small_screenshot;
pixbuf = draw_vm (small_screenshot, SCREENSHOT_WIDTH, SCREENSHOT_HEIGHT);
- App.window.sidebar.screenshot.set_from_pixbuf (pixbuf);
+ if (App.app.current_item == this)
+ App.window.sidebar.screenshot.set_from_pixbuf (pixbuf);
if (save)
save_pixbuf_as_screenshot (small_screenshot);
@@ -511,6 +512,11 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
disconnect_display ();
break;
+ case UIState.PROPERTIES:
+ if (pixbuf != null)
+ App.window.sidebar.screenshot.set_from_pixbuf (pixbuf);
+
+ break;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]