aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-04-07 09:48:56 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2011-05-05 14:31:26 +0800
commit385dc5af3c16b6de75d92b989585e44f953967f6 (patch)
tree97877c9b1aeb2072c271d794f84e1873716dc34d /libempathy-gtk
parent19ff66754d0afc6ef10fffba319c781dfc9d0ec9 (diff)
downloadgsoc2013-empathy-385dc5af3c16b6de75d92b989585e44f953967f6.tar
gsoc2013-empathy-385dc5af3c16b6de75d92b989585e44f953967f6.tar.gz
gsoc2013-empathy-385dc5af3c16b6de75d92b989585e44f953967f6.tar.bz2
gsoc2013-empathy-385dc5af3c16b6de75d92b989585e44f953967f6.tar.lz
gsoc2013-empathy-385dc5af3c16b6de75d92b989585e44f953967f6.tar.xz
gsoc2013-empathy-385dc5af3c16b6de75d92b989585e44f953967f6.tar.zst
gsoc2013-empathy-385dc5af3c16b6de75d92b989585e44f953967f6.zip
Change empathy_chat_get_name() from const char * -> char *
Change the name to empathy_chat_dup_name() to reflect this change. Note to reviewer: I think I've updated all the callers, but this is the commit to check carefully for new leaks :)
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-chat.c8
-rw-r--r--libempathy-gtk/empathy-chat.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 32627271c..ec8e79528 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -197,7 +197,7 @@ chat_get_property (GObject *object,
g_value_set_object (value, priv->account);
break;
case PROP_NAME:
- g_value_set_string (value, empathy_chat_get_name (chat));
+ g_value_take_string (value, empathy_chat_dup_name (chat));
break;
case PROP_ID:
g_value_set_string (value, priv->id);
@@ -3602,8 +3602,8 @@ empathy_chat_get_id (EmpathyChat *chat)
return priv->id;
}
-const gchar *
-empathy_chat_get_name (EmpathyChat *chat)
+gchar *
+empathy_chat_dup_name (EmpathyChat *chat)
{
EmpathyChatPriv *priv = GET_PRIV (chat);
const gchar *ret;
@@ -3618,7 +3618,7 @@ empathy_chat_get_name (EmpathyChat *chat)
if (!ret)
ret = priv->id;
- return ret ? ret : _("Conversation");
+ return g_strdup (ret ? ret : _("Conversation"));
}
const gchar *
diff --git a/libempathy-gtk/empathy-chat.h b/libempathy-gtk/empathy-chat.h
index 8665bf34d..8da8004ec 100644
--- a/libempathy-gtk/empathy-chat.h
+++ b/libempathy-gtk/empathy-chat.h
@@ -69,7 +69,7 @@ void empathy_chat_set_tp_chat (EmpathyChat *chat,
EmpathyTpChat *tp_chat);
TpAccount * empathy_chat_get_account (EmpathyChat *chat);
const gchar * empathy_chat_get_id (EmpathyChat *chat);
-const gchar * empathy_chat_get_name (EmpathyChat *chat);
+gchar * empathy_chat_dup_name (EmpathyChat *chat);
const gchar * empathy_chat_get_subject (EmpathyChat *chat);
EmpathyContact * empathy_chat_get_remote_contact (EmpathyChat *chat);
GtkWidget * empathy_chat_get_contact_menu (EmpathyChat *chat);