From: Luke S. <lsc...@gm...> - 2002-11-10 00:15:27
|
On Sat, Nov 09, 2002 at 02:51:58PM -0600, Felipe Contreras wrote: > 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. > > > > 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. > > 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? I do not think that the prpls can avoid using struct buddy and struct group. i know oscar uses them. luke -- -This email is made of 100% recycled electrons. |