| 5029 const char *text; |
5029 const char *text; |
| 5030 char **ms; |
5030 char **ms; |
| 5031 char *path; |
5031 char *path; |
| 5032 |
5032 |
| 5033 text = pidgin_conversation_theme_get_template(theme, PIDGIN_CONVERSATION_THEME_TEMPLATE_MAIN); |
5033 text = pidgin_conversation_theme_get_template(theme, PIDGIN_CONVERSATION_THEME_TEMPLATE_MAIN); |
| |
5034 if (text == NULL) |
| |
5035 return NULL; |
| |
5036 |
| 5034 ms = g_strsplit(text, "%@", 6); |
5037 ms = g_strsplit(text, "%@", 6); |
| 5035 if (ms[0] == NULL || ms[1] == NULL || ms[2] == NULL || ms[3] == NULL || ms[4] == NULL || ms[5] == NULL) { |
5038 if (ms[0] == NULL || ms[1] == NULL || ms[2] == NULL || ms[3] == NULL || ms[4] == NULL || ms[5] == NULL) { |
| 5036 g_strfreev(ms); |
5039 g_strfreev(ms); |
| 5037 return NULL; |
5040 return NULL; |
| 5038 } |
5041 } |
| 5975 const char *alias, |
5978 const char *alias, |
| 5976 const char *message, |
5979 const char *message, |
| 5977 PurpleMessageFlags flags, |
5980 PurpleMessageFlags flags, |
| 5978 time_t mtime) |
5981 time_t mtime) |
| 5979 { |
5982 { |
| 5980 GString *str = g_string_new(NULL); |
5983 GString *str; |
| 5981 const char *cur = text; |
5984 const char *cur = text; |
| 5982 const char *prev = cur; |
5985 const char *prev = cur; |
| 5983 |
5986 |
| |
5987 if (text == NULL) |
| |
5988 return g_strdup(""); |
| |
5989 |
| |
5990 str = g_string_new(NULL); |
| 5984 while ((cur = strchr(cur, '%'))) { |
5991 while ((cur = strchr(cur, '%'))) { |
| 5985 const char *replace = NULL; |
5992 const char *replace = NULL; |
| 5986 const char *fin = NULL; |
5993 const char *fin = NULL; |
| 5987 |
5994 |
| 5988 if (g_str_has_prefix(cur, "%message%")) { |
5995 if (g_str_has_prefix(cur, "%message%")) { |