# HG changeset patch # User Rob Flynn # Date 976070941 0 # Node ID 7aec3f881c98955acb576ae05f4af35d41105814 # Parent 66a70fbb2b094b6ee96eb83e2a92344fad19aac7 [gaim-migrate @ 1219] Thanks, Justin committer: Tailor Script diff -r 66a70fbb2b09 -r 7aec3f881c98 ChangeLog --- 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 diff -r 66a70fbb2b09 -r 7aec3f881c98 doc/CREDITS --- 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 : + Alphabetical Away Messages patch + G. Sumner Hayes Security Patches Brian Ryner for a little make file patch :) Ryan C. Gordon diff -r 66a70fbb2b09 -r 7aec3f881c98 src/gaim.h --- 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 *); diff -r 66a70fbb2b09 -r 7aec3f881c98 src/gaimrc.c --- 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)); + +}