libpurple/protocols/gg/status.c

branch
soc.2012.gg
changeset 33342
26ba5e4e8c24
parent 33340
5f00ed891179
child 33348
2394cd23ce8f
--- a/libpurple/protocols/gg/status.c	Fri Aug 17 17:22:23 2012 +0200
+++ b/libpurple/protocols/gg/status.c	Fri Aug 17 17:44:23 2012 +0200
@@ -17,7 +17,6 @@
 ggp_status_get_ssdata(PurpleConnection *gc);
 
 static gchar * ggp_status_validate_description(const gchar* msg);
-static int ggp_status_from_purplestatus(PurpleStatus *status, gchar **message);
 
 ////
 
@@ -92,7 +91,7 @@
 	return types;
 }
 
-static int ggp_status_from_purplestatus(PurpleStatus *status, gchar **message)
+int ggp_status_from_purplestatus(PurpleStatus *status, gchar **message)
 {
 	const char *status_id = purple_status_get_id(status);
 	const char *status_message =
@@ -163,6 +162,14 @@
 	}
 }
 
+const gchar * ggp_status_get_name(const gchar *purple_status)
+{
+	if (g_strcmp0(purple_status, "freeforchat") == 0)
+		return _("Chatty");
+	return purple_primitive_get_name_from_type(
+		purple_primitive_get_type_from_id(purple_status));
+}
+
 /*******************************************************************************
  * Own status.
  ******************************************************************************/

mercurial