[gnome-boxes] Show cd icon, not thumbnail in properties during install



commit 02a1c08999eb5d22100fdb0cc5ff94418effe273
Author: Alexander Larsson <alexl redhat com>
Date:   Wed Oct 31 14:08:51 2012 +0100

    Show cd icon, not thumbnail in properties during install
    
    Also, don't allow clicking on it to connect to the vm.
    
    The image is squashed a bit, need to figure out how to keep
    the aspect ratio of it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=677714

 src/machine.vala |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/src/machine.vala b/src/machine.vala
index c52ba45..c06b7c9 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -602,8 +602,20 @@ private class Boxes.MachineActor: Boxes.UI {
             } else {
                 thumbnail_screenshot = new GtkClutter.Texture ();
                 thumbnail_screenshot.set_reactive (true);
+
+                Gdk.Pixbuf pixbuf = null;
+                if (previous_ui_state == UIState.WIZARD) {
+                    var theme = Gtk.IconTheme.get_for_screen (App.app.window.get_screen ());
+                    try {
+                        pixbuf = theme.load_icon ("media-optical", Machine.SCREENSHOT_HEIGHT, 0);
+                    } catch (GLib.Error err) {
+                        warning (err.message);
+                    }
+                } else {
+                    pixbuf = machine.pixbuf;
+                }
                 try {
-                    thumbnail_screenshot.set_from_pixbuf (machine.pixbuf);
+                    thumbnail_screenshot.set_from_pixbuf (pixbuf);
                 } catch (GLib.Error err) {
                     warning (err.message);
                 }
@@ -623,7 +635,7 @@ private class Boxes.MachineActor: Boxes.UI {
                 });
 
                 machine.display.set_enable_inputs (display_widget, false);
-            } else {
+            } else if (previous_ui_state != UIState.WIZARD) {
                 click.clicked.connect (() => {
                     App.app.connect_to (machine, thumbnail.allocation.x1, thumbnail.allocation.y1);
                     update_thumbnail (null, false);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]