Mercurial > pidgin
changeset 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 | 66a70fbb2b09 |
children | 265abea9db72 |
files | ChangeLog doc/CREDITS src/gaim.h src/gaimrc.c |
diffstat | 4 files changed, 23 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Dec 05 23:37:45 2000 +0000 +++ b/ChangeLog Wed Dec 06 02:49:01 2000 +0000 @@ -1,6 +1,7 @@ GAIM: The Pimpin' Penguin IM Clone thats good for the soul! version 0.11.0: + * Away messages arranged alphabetically (Thanks Justin) version 0.11.0-pre2 (12/04/2000): * Fixed a segfault with a bad util.c
--- a/doc/CREDITS Tue Dec 05 23:37:45 2000 +0000 +++ b/doc/CREDITS Wed Dec 06 02:49:01 2000 +0000 @@ -50,6 +50,9 @@ ergofobe: GNOME Url handler patch +Justin M. Ward <justin@yossman.net>: + Alphabetical Away Messages patch + G. Sumner Hayes <IM: SumnerFool> Security Patches Brian Ryner for a little make file patch :) Ryan C. Gordon
--- a/src/gaim.h Tue Dec 05 23:37:45 2000 +0000 +++ b/src/gaim.h Wed Dec 06 02:49:01 2000 +0000 @@ -721,6 +721,7 @@ extern void load_prefs(); extern void save_prefs(); +gint sort_awaymsg_list(gconstpointer, gconstpointer); /* Functions in dialogs.c */ extern void alias_dialog(struct buddy_show *);
--- a/src/gaimrc.c Tue Dec 05 23:37:45 2000 +0000 +++ b/src/gaimrc.c Wed Dec 06 02:49:01 2000 +0000 @@ -211,7 +211,7 @@ g_snprintf(a->name, sizeof(a->name), "%s", p->value[0]); g_snprintf(a->message, sizeof(a->message), "%s", p->value[1]); filter_break(a->message); - away_messages = g_slist_append(away_messages, a); + away_messages = g_slist_insert_sorted(away_messages, a, sort_awaymsg_list); } /* auto { time } { default message } */ else if (!strcmp(p->option, "auto")) @@ -889,3 +889,20 @@ } } + + +/* This function is called by g_slist_insert_sorted to compare the item + * being compared to the rest of the items on the list. + */ + +gint sort_awaymsg_list(gconstpointer a, gconstpointer b) +{ + struct away_message *msg_a; + struct away_message *msg_b; + + msg_a = (struct away_message *)a; + msg_b = (struct away_message *)b; + + return (strcmp(msg_a->name, msg_b->name)); + +}