[virt-tools-list] [virt-viewer] Minor simplification/optimization of VirtViewerDisplay

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Tue Apr 3 19:13:09 UTC 2012


From: "Zeeshan Ali (Khattak)" <zeeshanak at gnome.org>

---
 src/virt-viewer-display.c |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/virt-viewer-display.c b/src/virt-viewer-display.c
index 40d23ad..fcff490 100644
--- a/src/virt-viewer-display.c
+++ b/src/virt-viewer-display.c
@@ -342,19 +342,15 @@ virt_viewer_display_size_request(GtkWidget *widget,
     requisition->height = border_width * 2;
 
     if (priv->dirty) {
-        if (priv->zoom)
+        if (priv->zoom) {
             requisition->width += priv->desktopWidth * priv->zoom_level / 100;
-        else
-            requisition->width += priv->desktopWidth;
-    } else {
-        requisition->width += 50;
-    }
-    if (priv->dirty) {
-        if (priv->zoom)
             requisition->height += priv->desktopHeight * priv->zoom_level / 100;
-        else
+        } else {
+            requisition->width += priv->desktopWidth;
             requisition->height += priv->desktopHeight;
+        }
     } else {
+        requisition->width += 50;
         requisition->height += 50;
     }
 
-- 
1.7.7.6




More information about the virt-tools-list mailing list