# HG changeset patch # User Sean Egan # Date 1020500491 0 # Node ID 332df87cf3d6bb892eca19e55d8b0e904f8dabc9 # Parent 20769d05df16721d9d0ce54fb26a048a8e0f95e1 [gaim-migrate @ 3222] Self-aliasing from the account editor. You can edit how your screenname shows up in sent messages without having yourself on your list. This is strictly client-side only--has no affect on what your buddies see. I'm thinking it might not be a bad idea to add the alias somewhere in the various select-account menus and lists. This could potentially fix the can't-tell-what-IRC-account-I'm-joining-channels-in problem, but I'm not sure the best way to do it right now--I'll do it tommorow. IM me if you have good ideas. committer: Tailor Script diff -r 20769d05df16 -r 332df87cf3d6 ChangeLog --- a/ChangeLog Sat May 04 04:20:42 2002 +0000 +++ b/ChangeLog Sat May 04 08:21:31 2002 +0000 @@ -10,6 +10,8 @@ Brian Bernas) * Hide and unhide functions for the filectl plugin. (Thanks, Ari Pollak) + * Added helpful stuff to the Help menu. + * Self-aliasing from the account editor. version 0.57 (04/25/2002): * New authorization method for Yahoo! diff -r 20769d05df16 -r 332df87cf3d6 src/conversation.c --- a/src/conversation.c Sat May 04 04:20:42 2002 +0000 +++ b/src/conversation.c Sat May 04 08:21:31 2002 +0000 @@ -1764,6 +1764,8 @@ b = find_buddy(c->gc, c->gc->username); if (b && strcmp(b->name, b->show)) who = b->show; + else if (c->gc->user->alias[0]) + who = c->gc->user->alias; else if (c->gc->displayname[0]) who = c->gc->displayname; else diff -r 20769d05df16 -r 332df87cf3d6 src/core.h --- a/src/core.h Sat May 04 04:20:42 2002 +0000 +++ b/src/core.h Sat May 04 08:21:31 2002 +0000 @@ -38,8 +38,12 @@ /* Really user states are controlled by the PRPLs now. We just use this for event_away */ #define UC_UNAVAILABLE 1 +/* This is far too long to be practical, but MSN users are probably used to long aliases */ +#define SELF_ALIAS_LEN 400 + struct aim_user { char username[64]; + char alias[SELF_ALIAS_LEN]; char password[32]; char user_info[2048]; int options; diff -r 20769d05df16 -r 332df87cf3d6 src/gaimrc.c --- a/src/gaimrc.c Sat May 04 04:20:42 2002 +0000 +++ b/src/gaimrc.c Sat May 04 08:21:31 2002 +0000 @@ -534,6 +534,19 @@ g_snprintf(u->iconfile, sizeof(u->iconfile), "%s", p->value[0]); + if (!fgets(buf, sizeof(buf), f)) + return u; + + if (!strcmp(buf, "\t}")) + return u; + + p = parse_line(buf); + + if (strcmp(p->option, "alias")) + return u; + + g_snprintf(u->alias, sizeof(u->alias), "%s", p->value[0]); + return u; } @@ -570,9 +583,9 @@ fprintf(f, " { %s }", u->proto_opt[i]); fprintf(f, "\n"); fprintf(f, "\t\ticonfile { %s }\n", u->iconfile); + fprintf(f, "\t\talias { %s }\n", u->alias); } - static void gaimrc_read_users(FILE *f) { char buf[2048]; diff -r 20769d05df16 -r 332df87cf3d6 src/multi.c --- a/src/multi.c Sat May 04 04:20:42 2002 +0000 +++ b/src/multi.c Sat May 04 08:21:31 2002 +0000 @@ -275,6 +275,8 @@ a->protocol = u->protocol; txt = gtk_entry_get_text(GTK_ENTRY(u->name)); g_snprintf(a->username, sizeof(a->username), "%s", txt); + txt = gtk_entry_get_text(GTK_ENTRY(u->alias)); + g_snprintf(a->alias, sizeof(a->alias), "%s", txt); txt = gtk_entry_get_text(GTK_ENTRY(u->pass)); if (a->options & OPT_USR_REM_PASS) g_snprintf(a->password, sizeof(a->password), "%s", txt); @@ -553,6 +555,15 @@ hbox = gtk_hbox_new(FALSE, 5); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); + + label = gtk_label_new(_("Alias:")); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); + + u->alias = gtk_entry_new(); + gtk_box_pack_start(GTK_BOX(hbox), u->alias, TRUE, TRUE, 0); + + hbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); gtk_widget_show(hbox); label = gtk_label_new(_("Protocol:")); @@ -567,6 +578,7 @@ if (u->user) { gtk_entry_set_text(GTK_ENTRY(u->name), u->user->username); + gtk_entry_set_text(GTK_ENTRY(u->alias), u->user->alias); gtk_entry_set_text(GTK_ENTRY(u->pass), u->user->password); } diff -r 20769d05df16 -r 332df87cf3d6 src/ui.h --- a/src/ui.h Sat May 04 04:20:42 2002 +0000 +++ b/src/ui.h Sat May 04 08:21:31 2002 +0000 @@ -242,6 +242,7 @@ GtkWidget *mod; GtkWidget *main; GtkWidget *name; + GtkWidget *alias; GtkWidget *pwdbox; GtkWidget *pass; GtkWidget *rempass;