[gnome-initial-setup/wip/feborges/generate-user-pics] account: Generate user picture when the name entry focus out
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/wip/feborges/generate-user-pics] account: Generate user picture when the name entry focus out
- Date: Wed, 25 Jul 2018 15:04:58 +0000 (UTC)
commit f1f123691f8698181eeb15ce153b6f698c160808
Author: Felipe Borges <felipeborges gnome org>
Date: Wed Jul 25 16:44:49 2018 +0200
account: Generate user picture when the name entry focus out
Instead of re-generate as the user types.
gnome-initial-setup/pages/account/gis-account-page-local.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/gnome-initial-setup/pages/account/gis-account-page-local.c
b/gnome-initial-setup/pages/account/gis-account-page-local.c
index 5b135c4..0794d62 100644
--- a/gnome-initial-setup/pages/account/gis-account-page-local.c
+++ b/gnome-initial-setup/pages/account/gis-account-page-local.c
@@ -279,8 +279,16 @@ validate (GisAccountPageLocal *page)
static gboolean
on_focusout (GisAccountPageLocal *page)
{
+ GisAccountPageLocalPrivate *priv = gis_account_page_local_get_instance_private (page);
+ const gchar *name = gtk_entry_get_text (GTK_ENTRY (priv->fullname_entry));
+
validate (page);
+ priv->generated_avatar = generate_user_picture (name);
+ if (!priv->avatar_is_set)
+ gtk_image_set_from_surface (GTK_IMAGE (priv->avatar_image),
+ priv->generated_avatar);
+
return FALSE;
}
@@ -314,11 +322,6 @@ fullname_changed (GtkWidget *w,
priv->valid_name = FALSE;
- priv->generated_avatar = generate_user_picture (name);
- if (!priv->avatar_is_set)
- gtk_image_set_from_surface (GTK_IMAGE (priv->avatar_image),
- priv->generated_avatar);
-
/* username_changed() is called consequently due to changes */
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]