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

Marc-André Lureau marcandre.lureau at gmail.com
Tue Apr 3 22:20:10 UTC 2012


looks fine to me, ack

On Tue, Apr 3, 2012 at 9:13 PM, Zeeshan Ali (Khattak)
<zeeshanak at gnome.org> wrote:
> 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
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list



-- 
Marc-André Lureau




More information about the virt-tools-list mailing list