Mercurial > pidgin.yaz
changeset 15:b9cc0a3a68b2
[gaim-migrate @ 24]
Fixed problem with away messages.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Thu, 23 Mar 2000 10:18:02 +0000 |
parents | d5119dc66284 |
children | 5cdd1f11db02 |
files | ChangeLog src/gaimrc.c |
diffstat | 2 files changed, 13 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Mar 23 09:53:31 2000 +0000 +++ b/ChangeLog Thu Mar 23 10:18:02 2000 +0000 @@ -8,6 +8,8 @@ (thanks to Eric Warmenhoven for the patch) * Support for displaying true type fonts * Fixed the Lag-Meter Option + * Fixed problem with saving away messages which contain spaces + and numbers. version 0.9.11: * <STRIKE>Strike Tag Support</STRIKE> :-)
--- a/src/gaimrc.c Thu Mar 23 09:53:31 2000 +0000 +++ b/src/gaimrc.c Thu Mar 23 10:18:02 2000 +0000 @@ -183,12 +183,15 @@ return; p = parse_line(buf); - a = g_new0(struct away_message, 1); + if (!strcmp(p->option, "message")) + { + a = g_new0(struct away_message, 1); - g_snprintf(a->name, sizeof(a->name), "%s", p->option); - g_snprintf(a->message, sizeof(a->message), "%s", p->value[0]); - filter_break(a->message); - away_messages = g_list_append(away_messages, a); + 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_list_append(away_messages, a); + } } } @@ -201,9 +204,7 @@ while (awy) { a = (struct away_message *)awy->data; - // escape_text(a->name); - // escape_text(a->message); - fprintf(f, "\t%s { %s }\n", escape_text2(a->name), escape_text2(a->message)); + fprintf(f, "\tmessage { %s } { %s }\n", escape_text2(a->name), escape_text2(a->message)); awy = awy->next; } @@ -474,7 +475,7 @@ if ((f = fopen(buf,"r"))) { fgets(buf, sizeof(buf), f); sscanf(buf, "# .gaimrc v%d", &ver); - if ( (ver <= 0) || (buf[0] != '#')) { + if ( (ver <= 1) || (buf[0] != '#')) { fclose(f); set_defaults(); save_prefs(); @@ -514,7 +515,7 @@ if (getenv("HOME")) { g_snprintf(buf, sizeof(buf), "%s/.gaimrc", getenv("HOME")); if ((f = fopen(buf,"w"))) { - fprintf(f, "# .gaimrc v%d\n", 1); + fprintf(f, "# .gaimrc v%d\n", 2); gaimrc_write_users(f); gaimrc_write_options(f); gaimrc_write_away(f);