Mercurial > pidgin
diff src/dialogs.c @ 4227:a614423c648f
[gaim-migrate @ 4471]
This is a patch from Nathan Walp that adds a
"char server_alias[BUDDY_ALIAS_MAXLEN]" to struct buddy, and a preference
option to show the server alias instead of the alias set by you. It
shouldn't cause any problems. But then again, faceprint is a crazy patch
writer, with an emphasis on crazy, if you know what I mean. Huh? Get it?
"Crazy"? I kill me. But right after I kill Time Warner.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 07 Jan 2003 17:44:34 +0000 |
parents | 511c2b63caa4 |
children | 9641bd9c79f5 |
line wrap: on
line diff
--- a/src/dialogs.c Tue Jan 07 16:18:08 2003 +0000 +++ b/src/dialogs.c Tue Jan 07 17:44:34 2003 +0000 @@ -3760,7 +3760,10 @@ static void do_alias_bud(GtkWidget *w, struct buddy *b) { const char *al = gtk_entry_get_text(GTK_ENTRY(aliasname)); - g_snprintf(b->show, sizeof(b->show), "%s", (al && strlen(al)) ? al : b->name); + if (al && strlen(al)) + g_snprintf(b->alias, sizeof(b->alias), "%s", al); + else + b->alias[0] = '\0'; handle_buddy_rename(b, b->name); serv_alias_buddy(b); destroy_dialog(aliasdlg, aliasdlg); @@ -3811,7 +3814,7 @@ gtk_box_pack_start(GTK_BOX(topbox), bbox, FALSE, FALSE, 0); gtk_entry_set_text(GTK_ENTRY(aliasentry), b->name); - gtk_entry_set_text(GTK_ENTRY(aliasname), b->show); + gtk_entry_set_text(GTK_ENTRY(aliasname), b->alias); /* Put the buttons in the box */ bbox = gtk_hbox_new(FALSE, 5); @@ -4408,8 +4411,6 @@ char *prevname = g_strdup(b->name); if (g) serv_remove_buddy(b->gc, b->name, g->name); - if (!strcmp(b->name, b->show)) - g_snprintf(b->show, sizeof(b->show), "%s", new_name); g_snprintf(b->name, sizeof(b->name), "%s", new_name); serv_add_buddy(b->gc, b->name); handle_buddy_rename(b, prevname);