]> git.0d.be Git - empathy.git/commitdiff
tpaw-utils: copy empathy_make_color_whiter()
authorMarco Barisione <marco.barisione@collabora.co.uk>
Mon, 6 May 2013 16:04:23 +0000 (17:04 +0100)
committerMarco Barisione <marco.barisione@collabora.co.uk>
Tue, 20 Aug 2013 10:03:05 +0000 (11:03 +0100)
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

tp-account-widgets/tpaw-account-widget.c
tp-account-widgets/tpaw-utils.c
tp-account-widgets/tpaw-utils.h

index 2cb41cbe5323edddad0940489adffe0eb9865371..20eb64f6ec2928b514fd844a1e3e8c49a488be74 100644 (file)
 
 #include <glib/gi18n-lib.h>
 #include <dbus/dbus-protocol.h>
-#include <tp-account-widgets/tpaw-utils.h>
 
 #include "tpaw-account-widget-irc.h"
 #include "tpaw-account-widget-private.h"
 #include "tpaw-account-widget-sip.h"
 #include "empathy-ui-utils.h"
 #include "empathy-utils.h"
+#include "tpaw-utils.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_ACCOUNT
 #include "empathy-debug.h"
@@ -229,7 +229,7 @@ account_widget_set_entry_highlighting (GtkEntry *entry,
        * gives a colour which is inline with the theme but
        * slightly whiter.
        */
-      empathy_make_color_whiter (&color);
+      tpaw_make_color_whiter (&color);
 
       gtk_widget_override_background_color (GTK_WIDGET (entry), 0, &color);
     }
index 3efc422b587eeca8c130bd356195cc82eb2f8a9e..b373dac9cd9085a4a26bb43c1b6ac480ead4c60b 100644 (file)
@@ -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;
+}
index b11fa767060efcd5698a2954784b65cd839331b9..d38a7a7b55e6c928c5c36ba7165719db80a10a96 100644 (file)
@@ -24,6 +24,7 @@
 #define __TPAW_UTILS_H__
 
 #include <glib.h>
+#include <gtk/gtk.h>
 #include <telepathy-glib/telepathy-glib.h>
 
 G_BEGIN_DECLS
@@ -35,6 +36,8 @@ gchar *tpaw_protocol_icon_name (const gchar *protocol);
 const gchar *tpaw_protocol_name_to_display_name (const gchar *proto_name);
 const gchar *tpaw_service_name_to_display_name (const gchar *proto_name);
 
+void  tpaw_make_color_whiter (GdkRGBA *color);
+
 G_END_DECLS
 
 #endif /*  __TPAW_UTILS_H__ */