aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorMarco Barisione <marco.barisione@collabora.co.uk>2013-05-06 21:39:09 +0800
committerMarco Barisione <marco.barisione@collabora.co.uk>2013-08-20 18:03:05 +0800
commit4e0f97a1942d1ae0b4b3846d43e3769fdb076b44 (patch)
treeef82dba3325ec71b80ed3deb7ed48fc130a36ddc /libempathy-gtk
parent88819ece017f0693803f33bb560e4d01140174c1 (diff)
downloadgsoc2013-empathy-4e0f97a1942d1ae0b4b3846d43e3769fdb076b44.tar
gsoc2013-empathy-4e0f97a1942d1ae0b4b3846d43e3769fdb076b44.tar.gz
gsoc2013-empathy-4e0f97a1942d1ae0b4b3846d43e3769fdb076b44.tar.bz2
gsoc2013-empathy-4e0f97a1942d1ae0b4b3846d43e3769fdb076b44.tar.lz
gsoc2013-empathy-4e0f97a1942d1ae0b4b3846d43e3769fdb076b44.tar.xz
gsoc2013-empathy-4e0f97a1942d1ae0b4b3846d43e3769fdb076b44.tar.zst
gsoc2013-empathy-4e0f97a1942d1ae0b4b3846d43e3769fdb076b44.zip
tpaw-utils: move functions for protocol and service display information
The following functions were moved from empathy to tp-aw and renamed accordingly: * empathy_protocol_icon_name; * empathy_protocol_name_to_display_name; * empathy_service_name_to_display_name. This commit also changes the licence of the moved code (all copyrighted by Collabora Ltd.) from GPL to LGPL. https://bugzilla.gnome.org/show_bug.cgi?id=699492
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-protocol-chooser.c13
-rw-r--r--libempathy-gtk/empathy-theme-adium.c3
2 files changed, 9 insertions, 7 deletions
diff --git a/libempathy-gtk/empathy-protocol-chooser.c b/libempathy-gtk/empathy-protocol-chooser.c
index d2fec3041..f2414ad10 100644
--- a/libempathy-gtk/empathy-protocol-chooser.c
+++ b/libempathy-gtk/empathy-protocol-chooser.c
@@ -25,6 +25,7 @@
#include <glib/gi18n-lib.h>
#include <tp-account-widgets/tpaw-connection-managers.h>
+#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-ui-utils.h"
#include "empathy-utils.h"
@@ -229,10 +230,10 @@ protocol_choosers_add_cm (EmpathyProtocolChooser *chooser,
g_hash_table_insert (priv->protocols,
g_strdup (proto_name), g_strdup (cm_name));
- icon_name = empathy_protocol_icon_name (proto_name);
+ icon_name = tpaw_protocol_icon_name (proto_name);
pixbuf = empathy_pixbuf_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
- display_name = empathy_protocol_name_to_display_name (proto_name);
+ display_name = tpaw_protocol_name_to_display_name (proto_name);
gtk_list_store_insert_with_values (priv->store,
NULL, 0,
@@ -247,7 +248,7 @@ protocol_choosers_add_cm (EmpathyProtocolChooser *chooser,
if (!tp_strdiff (proto_name, "jabber") &&
!tp_strdiff (cm_name, "gabble"))
{
- display_name = empathy_service_name_to_display_name ("google-talk");
+ display_name = tpaw_service_name_to_display_name ("google-talk");
pixbuf = empathy_pixbuf_from_icon_name ("im-google-talk",
GTK_ICON_SIZE_BUTTON);
@@ -262,7 +263,7 @@ protocol_choosers_add_cm (EmpathyProtocolChooser *chooser,
g_clear_object (&pixbuf);
- display_name = empathy_service_name_to_display_name ("facebook");
+ display_name = tpaw_service_name_to_display_name ("facebook");
pixbuf = empathy_pixbuf_from_icon_name ("im-facebook",
GTK_ICON_SIZE_BUTTON);
@@ -591,9 +592,9 @@ empathy_protocol_chooser_create_account_settings (EmpathyProtocolChooser *self)
goto out;
if (service != NULL)
- display_name = empathy_service_name_to_display_name (service);
+ display_name = tpaw_service_name_to_display_name (service);
else
- display_name = empathy_protocol_name_to_display_name (
+ display_name = tpaw_protocol_name_to_display_name (
tp_protocol_get_name (proto));
/* Create account */
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index 31715c305..d5b935681 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -23,6 +23,7 @@
#include "empathy-theme-adium.h"
#include <glib/gi18n-lib.h>
+#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-gsettings.h"
#include "empathy-images.h"
@@ -901,7 +902,7 @@ theme_adium_add_message (EmpathyThemeAdium *self,
/* Get information */
sender = empathy_message_get_sender (msg);
account = empathy_contact_get_account (sender);
- service_name = empathy_protocol_name_to_display_name
+ service_name = tpaw_protocol_name_to_display_name
(tp_account_get_protocol_name (account));
if (service_name == NULL)
service_name = tp_account_get_protocol_name (account);