[virt-tools-list] [virt-viewer][PATCH 1/5 v2] display: remove useless identation level
Christophe Fergeau
cfergeau at redhat.com
Wed Apr 22 09:19:40 UTC 2015
ACK series, though I'm not a big fan of calling
spice_channel_get_error() from arbitrary places (it's basically only
usable from virt_viewer_session_spice_main_channel_event()).
Christophe
On Wed, Apr 15, 2015 at 12:03:20PM +0200, Fabiano Fidêncio wrote:
> ---
> 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 ddbb045..3efe24c 100644
> --- a/src/virt-viewer-display.c
> +++ b/src/virt-viewer-display.c
> @@ -798,31 +798,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.5
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20150422/17dd48f3/attachment.sig>
More information about the virt-tools-list
mailing list