[gnome-control-center] user-accounts: Simplify scale-factor handling
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] user-accounts: Simplify scale-factor handling
- Date: Wed, 3 May 2017 08:35:56 +0000 (UTC)
commit 466264e78d9ada0063aa1818e4c760fbd6654247
Author: Ondrej Holy <oholy redhat com>
Date: Tue Feb 14 08:31:13 2017 +0100
user-accounts: Simplify scale-factor handling
Remove redundant on_scale_factor_changed function and call render_image
function directly.
https://bugzilla.gnome.org/show_bug.cgi?id=778458
panels/user-accounts/um-user-image.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/panels/user-accounts/um-user-image.c b/panels/user-accounts/um-user-image.c
index 4ac96b6..5f30bac 100644
--- a/panels/user-accounts/um-user-image.c
+++ b/panels/user-accounts/um-user-image.c
@@ -61,16 +61,6 @@ um_user_image_set_user (UmUserImage *image,
}
static void
-on_scale_factor_changed (GObject *object,
- GParamSpec *pspec,
- gpointer data)
-{
- UmUserImage *image = UM_USER_IMAGE (object);
-
- render_image (image);
-}
-
-static void
um_user_image_finalize (GObject *object)
{
UmUserImage *image = UM_USER_IMAGE (object);
@@ -93,7 +83,7 @@ um_user_image_init (UmUserImage *image)
{
image->priv = UM_USER_IMAGE_GET_PRIVATE (image);
- g_signal_connect (image, "notify::scale-factor", G_CALLBACK (on_scale_factor_changed), NULL);
+ g_signal_connect_swapped (image, "notify::scale-factor", G_CALLBACK (render_image), image);
g_signal_connect_swapped (image, "notify::pixel-size", G_CALLBACK (render_image), image);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]