[virt-tools-list] [virt-viewer: PATCH 4/4] Auto fill the username field in the auth dialog

Fabiano Fidêncio fabiano at fidencio.org
Thu Sep 25 12:28:14 UTC 2014


On Wed, Sep 24, 2014 at 1:49 PM, Fabiano Fidêncio <fidencio at redhat.com>
wrote:

> ---
>  src/virt-viewer.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/src/virt-viewer.c b/src/virt-viewer.c
> index 9f51b2f..828b6e5 100644
> --- a/src/virt-viewer.c
> +++ b/src/virt-viewer.c
> @@ -640,6 +640,12 @@
> virt_viewer_auth_libvirt_credentials(virConnectCredentialPtr cred,
>      if (username || password) {
>          VirtViewerWindow *vwin =
> virt_viewer_app_get_main_window(VIRT_VIEWER_APP(app));
>          GtkWindow *win = virt_viewer_window_get_window(vwin);
> +
> +        if (*username == NULL) {
> +            /* username will be freed inside the
> virt_viewer_auth_collect_credentials() */
> +            *username = g_strdup (g_get_user_name());
> +        }
> +
>          priv->auth_cancelled = !virt_viewer_auth_collect_credentials(win,
>
> "libvirt",
>
> app->priv->uri,
> --
> 1.9.3
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
>


self NACK!
-- 
Fabiano Fidêncio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20140925/d2504656/attachment.htm>


More information about the virt-tools-list mailing list