Hi<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 27, 2012 at 10:16 AM, Christophe Fergeau <span dir="ltr"><<a href="mailto:cfergeau@redhat.com" target="_blank">cfergeau@redhat.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> +/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */<br><div>
> +/*<br>
> + * Virt Viewer: A virtual machine console viewer<br>
> + *<br>
> + * Copyright (C) 2012 Red Hat, Inc.<br>
> + *<br>
> + * This program is free software; you can redistribute it and/or modify<br>
> + * it under the terms of the GNU General Public License as published by<br>
> + * the Free Software Foundation; either version 2 of the License, or<br>
<br>
</div>Should we use LGPL here in case we want to move that code to a library?<br><div></div></blockquote><div><br>I wanted to be consistant with the rest of virt-viewer code. I agree in general that it would be nicer to make virt-viewer LGPL. Daniel, do you mind having LGPL code for that file? what is your opinion about switching virt-viewer to LGPL by default?<br>
 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
> +gint<br>
> +virt_viewer_file_get_fullscreen(VirtViewerFile* self)<br>
> +{<br>
> +    return virt_viewer_file_get_int(self, "fullscreen");<br>
> +}<br>
> +<br>
> +void<br>
> +virt_viewer_file_set_fullscreen(VirtViewerFile* self, gint value)<br>
> +{<br>
> +    virt_viewer_file_set_int(self, "fullscreen", value);<br>
> +    g_object_notify(G_OBJECT(self), "fullscreen");<br>
> +}<br>
<br>
</div>For the values that you document as being 0/1, the setter could do<br>
virt_viewer_file_set_int(self, "fullscreen", !!value); to ensure that we<br>
indeed write 0 or 1 in the file. Why not describe these properties as being </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
boolean and use a boolean property and g_key_file_get_boolean?<br>
<span><font color="#888888"><br></font></span></blockquote><div><br>Probably legacy: those values used to be flags fields before I turned them to more descriptive boolean. I don't like the fact that GKeyFile may change 0 or 1 to true or false on your back either, but this is perhaps minor (when using key_file_set_boolean), as we don't even have save helper atm, although it could come quickly. And it could be more future-proof if it has different values or behaviour later on, even if that can be handled by new keys too.. <br>
</div></div><br clear="all">Like many things, pros and cons.. Do you want to turn them in boolean then?<br><br>-- <br>Marc-André Lureau<br>
</div>