Mercurial > pidgin.yaz
comparison src/gaimrc.c @ 1209:7aec3f881c98
[gaim-migrate @ 1219]
Thanks, Justin
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Wed, 06 Dec 2000 02:49:01 +0000 |
parents | f4d4a14752ee |
children | 0baf39dc5437 |
comparison
equal
deleted
inserted
replaced
1208:66a70fbb2b09 | 1209:7aec3f881c98 |
---|---|
209 a = g_new0(struct away_message, 1); | 209 a = g_new0(struct away_message, 1); |
210 | 210 |
211 g_snprintf(a->name, sizeof(a->name), "%s", p->value[0]); | 211 g_snprintf(a->name, sizeof(a->name), "%s", p->value[0]); |
212 g_snprintf(a->message, sizeof(a->message), "%s", p->value[1]); | 212 g_snprintf(a->message, sizeof(a->message), "%s", p->value[1]); |
213 filter_break(a->message); | 213 filter_break(a->message); |
214 away_messages = g_slist_append(away_messages, a); | 214 away_messages = g_slist_insert_sorted(away_messages, a, sort_awaymsg_list); |
215 } | 215 } |
216 /* auto { time } { default message } */ | 216 /* auto { time } { default message } */ |
217 else if (!strcmp(p->option, "auto")) | 217 else if (!strcmp(p->option, "auto")) |
218 { | 218 { |
219 auto_away = atoi(p->value[0]); | 219 auto_away = atoi(p->value[0]); |
887 chmod(buf, S_IRUSR | S_IWUSR); | 887 chmod(buf, S_IRUSR | S_IWUSR); |
888 } | 888 } |
889 } | 889 } |
890 } | 890 } |
891 | 891 |
892 | |
893 | |
894 /* This function is called by g_slist_insert_sorted to compare the item | |
895 * being compared to the rest of the items on the list. | |
896 */ | |
897 | |
898 gint sort_awaymsg_list(gconstpointer a, gconstpointer b) | |
899 { | |
900 struct away_message *msg_a; | |
901 struct away_message *msg_b; | |
902 | |
903 msg_a = (struct away_message *)a; | |
904 msg_b = (struct away_message *)b; | |
905 | |
906 return (strcmp(msg_a->name, msg_b->name)); | |
907 | |
908 } |