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

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



From: "Zeeshan Ali (Khattak)" <zeeshanak 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


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