aboutsummaryrefslogtreecommitdiffstats
path: root/tp-account-widgets/tpaw-utils.c
diff options
context:
space:
mode:
authorMarco Barisione <marco.barisione@collabora.co.uk>2013-05-07 00:04:23 +0800
committerMarco Barisione <marco.barisione@collabora.co.uk>2013-08-20 18:03:05 +0800
commit654aaea6780716ff7973530859d2b1b86e2f7ca3 (patch)
tree30b7bab3668601861dea05d3a1d4cff118713917 /tp-account-widgets/tpaw-utils.c
parent3de3a5ab30345befbbccfbcb5bdc19d4fd28339b (diff)
downloadgsoc2013-empathy-654aaea6780716ff7973530859d2b1b86e2f7ca3.tar
gsoc2013-empathy-654aaea6780716ff7973530859d2b1b86e2f7ca3.tar.gz
gsoc2013-empathy-654aaea6780716ff7973530859d2b1b86e2f7ca3.tar.bz2
gsoc2013-empathy-654aaea6780716ff7973530859d2b1b86e2f7ca3.tar.lz
gsoc2013-empathy-654aaea6780716ff7973530859d2b1b86e2f7ca3.tar.xz
gsoc2013-empathy-654aaea6780716ff7973530859d2b1b86e2f7ca3.tar.zst
gsoc2013-empathy-654aaea6780716ff7973530859d2b1b86e2f7ca3.zip
tpaw-utils: copy empathy_make_color_whiter()
This commit also changes the licence of the moved code from GPL to LGPL. See GOSSIP-RELICENSING.txt for details. https://bugzilla.gnome.org/show_bug.cgi?id=699492
Diffstat (limited to 'tp-account-widgets/tpaw-utils.c')
-rw-r--r--tp-account-widgets/tpaw-utils.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tp-account-widgets/tpaw-utils.c b/tp-account-widgets/tpaw-utils.c
index 3efc422b5..b373dac9c 100644
--- a/tp-account-widgets/tpaw-utils.c
+++ b/tp-account-widgets/tpaw-utils.c
@@ -156,3 +156,13 @@ tpaw_service_name_to_display_name (const gchar *service_name)
return service_name;
}
+
+void
+tpaw_make_color_whiter (GdkRGBA *color)
+{
+ const GdkRGBA white = { 1.0, 1.0, 1.0, 1.0 };
+
+ color->red = (color->red + white.red) / 2;
+ color->green = (color->green + white.green) / 2;
+ color->blue = (color->blue + white.blue) / 2;
+}