diff src/savedstatuses.c @ 10420:854c972ea863

[gaim-migrate @ 11671] The ability to add, modify and _save_ new statuses. This hopefully brings our functionality slightly past where it is in oldstatus. This could use a bit of testing, but I think it's pretty good. We still can't edit substatuses. Primitive types like "unset" should be hidden from the status selector dropdown. "Online" and "offline" should maybe be hidden... but someone in #gaim mentioned that it might be a good way to choose which accounts are offline for a given status. Eh. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 26 Dec 2004 05:23:51 +0000
parents c9b1f3fac753
children 3232e1a33899
line wrap: on
line diff
--- a/src/savedstatuses.c	Sun Dec 26 02:03:14 2004 +0000
+++ b/src/savedstatuses.c	Sun Dec 26 05:23:51 2004 +0000
@@ -445,6 +445,8 @@
 {
 	GaimSavedStatus *status;
 
+	g_return_val_if_fail(gaim_savedstatus_find(title) == NULL, NULL);
+
 	status = g_new0(GaimSavedStatus, 1);
 	status->title = g_strdup(title);
 	status->type = type;
@@ -456,6 +458,17 @@
 	return status;
 }
 
+void
+gaim_savedstatus_set_message(GaimSavedStatus *status, const char *message)
+{
+	g_return_if_fail(status != NULL);
+
+	g_free(status->message);
+	status->message = g_strdup(message);
+
+	schedule_save();
+}
+
 gboolean
 gaim_savedstatus_delete(const char *title)
 {