changeset 7256:c93493c59ac3

[gaim-migrate @ 7833] Added gaim_conversation_set_name(). committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Tue, 14 Oct 2003 03:28:26 +0000
parents e78c6f6e759c
children 31abca48a631
files src/conversation.c src/conversation.h
diffstat 2 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/conversation.c	Tue Oct 14 03:26:11 2003 +0000
+++ b/src/conversation.c	Tue Oct 14 03:28:26 2003 +0000
@@ -1163,6 +1163,17 @@
 	return conv->unseen;
 }
 
+void
+gaim_conversation_set_name(GaimConversation *conv, const char *name)
+{
+	g_return_if_fail(conv != NULL);
+
+	if (conv->name != NULL)
+		g_free(conv->name);
+
+	conv->name = (name == NULL ? NULL : g_strdup(name));
+}
+
 const char *
 gaim_conversation_get_name(const GaimConversation *conv)
 {
--- a/src/conversation.h	Tue Oct 14 03:26:11 2003 +0000
+++ b/src/conversation.h	Tue Oct 14 03:28:26 2003 +0000
@@ -599,6 +599,14 @@
 GaimUnseenState gaim_conversation_get_unseen(const GaimConversation *conv);
 
 /**
+ * Sets the specified conversation's name.
+ *
+ * @param conv The conversation.
+ * @param name The conversation's name.
+ */
+void gaim_conversation_set_name(GaimConversation *conv, const char *name);
+
+/**
  * Returns the specified conversation's name.
  *
  * @param conv The conversation.