From: Felipe C. <al5...@ma...> - 2002-11-09 20:49:33
|
On Sat, Nov 09, 2002 at 02:26:03PM +0000, Robert McQueen wrote: > On Fri, Nov 08, 2002 at 11:02:00AM -0600, Felipe Contreras wrote: > > That has to be changed, the friendly name should go on another field, let's > > say 'remote_alias', the 'alias' is never auto-updated, you specify it or > > not. > > > > -- > > Felipe Contreras > > Now I understand what you want - I agree. This is ideal. We need to add > a field to the buddy struct to hold the remote name if we want to put it > into the tooltip anyway. Then we need the same kind of logic we have for > aliases to consider the fields. Ok, what do you think of this logic: Instead of just 'show' there are 3 things: show: what will be displayed alias: local alias, what we set nick: remote nick, what the server says Whenever we set an alias, show is that alias, if not, then show is the remote nick, if there is no remote nick, well, then it's the just the name. Sure, we might not really need the show field. > Could I suggest adding a function such as display_name that takes a > *buddy and returns a pointer to the correct one, then we won't ever have > to do this big run of replacing lots of references to screennames with > alias|screen-name, and now alias|remote-name|screen-name. This > centralised function should be easy to modify in the advent of > persistent/XML/etc buddy lists and will make it easy to get the right > name out of a buddy pointer, without repeating identical logic all over > the place like we do now. Hmm, I don't know how that will work, but anyway I think we don't need to wait if there is someone (me) that wants to make this work cleanly now, and whenever the new buddy lists are implemented to update the code. I'm attaching a patch that doesn't change much, just make all aliasing and renaming of buddies more cleaner. BTW. prpls (msn, jabber) shouldn't be using struct buddy, right? -- Felipe Contreras |