[virt-tools-list] [PATCH] display: remove useless identation level

Fabiano Fidêncio fidencio at redhat.com
Tue Apr 7 13:36:04 UTC 2015


---
 src/virt-viewer-display.c | 44 +++++++++++++++++++++-----------------------
 1 file changed, 21 insertions(+), 23 deletions(-)

diff --git a/src/virt-viewer-display.c b/src/virt-viewer-display.c
index 829ee07..8ff444f 100644
--- a/src/virt-viewer-display.c
+++ b/src/virt-viewer-display.c
@@ -795,31 +795,29 @@ void virt_viewer_display_get_preferred_monitor_geometry(VirtViewerDisplay* self,
     topx = MAX(topx, 0);
     topy = MAX(topy, 0);
 
-    {
-        if (virt_viewer_display_get_fullscreen(VIRT_VIEWER_DISPLAY(self))) {
-            GdkRectangle physical_monitor;
-            GdkScreen *screen = gtk_widget_get_screen(GTK_WIDGET(self));
-            int n = virt_viewer_display_get_monitor(VIRT_VIEWER_DISPLAY(self));
-            if (n == -1)
-                n = gdk_screen_get_monitor_at_window(screen,
-                                                     gtk_widget_get_window(GTK_WIDGET(self)));
-            gdk_screen_get_monitor_geometry(screen, n, &physical_monitor);
-            preferred->x = physical_monitor.x;
-            preferred->y = physical_monitor.y;
-            preferred->width = physical_monitor.width;
-            preferred->height = physical_monitor.height;
-        } else {
-            gtk_widget_get_allocation(GTK_WIDGET(self), preferred);
-            preferred->x = topx;
-            preferred->y = topy;
-        }
+    if (virt_viewer_display_get_fullscreen(VIRT_VIEWER_DISPLAY(self))) {
+        GdkRectangle physical_monitor;
+        GdkScreen *screen = gtk_widget_get_screen(GTK_WIDGET(self));
+        int n = virt_viewer_display_get_monitor(VIRT_VIEWER_DISPLAY(self));
+        if (n == -1)
+            n = gdk_screen_get_monitor_at_window(screen,
+                                                 gtk_widget_get_window(GTK_WIDGET(self)));
+        gdk_screen_get_monitor_geometry(screen, n, &physical_monitor);
+        preferred->x = physical_monitor.x;
+        preferred->y = physical_monitor.y;
+        preferred->width = physical_monitor.width;
+        preferred->height = physical_monitor.height;
+    } else {
+        gtk_widget_get_allocation(GTK_WIDGET(self), preferred);
+        preferred->x = topx;
+        preferred->y = topy;
+    }
 
-        if (virt_viewer_display_get_zoom(VIRT_VIEWER_DISPLAY(self))) {
-            guint zoom = virt_viewer_display_get_zoom_level(VIRT_VIEWER_DISPLAY(self));
+    if (virt_viewer_display_get_zoom(VIRT_VIEWER_DISPLAY(self))) {
+        guint zoom = virt_viewer_display_get_zoom_level(VIRT_VIEWER_DISPLAY(self));
 
-            preferred->width = round(preferred->width * NORMAL_ZOOM_LEVEL / zoom);
-            preferred->height = round(preferred->height * NORMAL_ZOOM_LEVEL / zoom);
-        }
+        preferred->width = round(preferred->width * NORMAL_ZOOM_LEVEL / zoom);
+        preferred->height = round(preferred->height * NORMAL_ZOOM_LEVEL / zoom);
     }
 }
 
-- 
2.3.4




More information about the virt-tools-list mailing list