[gnome-control-center/wip/oholy/default-avatar: 1/2] user-accounts: Remove a redundant parameter
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/oholy/default-avatar: 1/2] user-accounts: Remove a redundant parameter
- Date: Fri, 3 May 2019 07:32:54 +0000 (UTC)
commit fac47c04c308a7f694d74628d8bfad9bcc742ccc
Author: Ondrej Holy <oholy redhat com>
Date: Fri May 3 08:55:52 2019 +0200
user-accounts: Remove a redundant parameter
The `round_image()` function has the `icon_size` parameter, which is not
used by that function, because the size is determined from a pixbuf size.
Let's remove that redundant `icon_size` parameter.
panels/user-accounts/cc-avatar-chooser.c | 2 +-
panels/user-accounts/cc-user-image.c | 2 +-
panels/user-accounts/user-utils.c | 3 +--
panels/user-accounts/user-utils.h | 3 +--
4 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/panels/user-accounts/cc-avatar-chooser.c b/panels/user-accounts/cc-avatar-chooser.c
index 2a75b0366..393276807 100644
--- a/panels/user-accounts/cc-avatar-chooser.c
+++ b/panels/user-accounts/cc-avatar-chooser.c
@@ -373,7 +373,7 @@ create_face_widget (gpointer item,
if (source_pixbuf == NULL)
return NULL;
- pixbuf = round_image (source_pixbuf, AVATAR_CHOOSER_PIXEL_SIZE);
+ pixbuf = round_image (source_pixbuf);
image = gtk_image_new_from_pixbuf (pixbuf);
gtk_image_set_pixel_size (GTK_IMAGE (image), AVATAR_CHOOSER_PIXEL_SIZE);
gtk_widget_show (image);
diff --git a/panels/user-accounts/cc-user-image.c b/panels/user-accounts/cc-user-image.c
index d8a871967..26a430d44 100644
--- a/panels/user-accounts/cc-user-image.c
+++ b/panels/user-accounts/cc-user-image.c
@@ -54,7 +54,7 @@ render_user_icon (ActUser *user,
icon_size * scale,
NULL);
if (source_pixbuf)
- pixbuf = round_image (source_pixbuf, icon_size * scale);
+ pixbuf = round_image (source_pixbuf);
}
if (pixbuf != NULL) {
diff --git a/panels/user-accounts/user-utils.c b/panels/user-accounts/user-utils.c
index c5dfa9c05..d283435df 100644
--- a/panels/user-accounts/user-utils.c
+++ b/panels/user-accounts/user-utils.c
@@ -447,8 +447,7 @@ is_valid_username (const gchar *username, gchar **tip)
}
GdkPixbuf *
-round_image (GdkPixbuf *pixbuf,
- gint icon_size)
+round_image (GdkPixbuf *pixbuf)
{
GdkPixbuf *dest = NULL;
cairo_surface_t *surface;
diff --git a/panels/user-accounts/user-utils.h b/panels/user-accounts/user-utils.h
index a40f0d5d1..91a1db805 100644
--- a/panels/user-accounts/user-utils.h
+++ b/panels/user-accounts/user-utils.h
@@ -43,8 +43,7 @@ gboolean is_username_used (const gchar *username);
gboolean is_valid_name (const gchar *name);
gboolean is_valid_username (const gchar *name,
gchar **tip);
-GdkPixbuf *round_image (GdkPixbuf *pixbuf,
- gint icon_size);
+GdkPixbuf *round_image (GdkPixbuf *pixbuf);
void generate_user_avatar (ActUser *user);
void set_user_icon_data (ActUser *user,
GdkPixbuf *pixbuf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]