Adium

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#15915 closed defect (fixed)

Cannot change display name on Adium 1.5

Reported by: yuok Owned by:
Milestone: Adium 1.5.1 Component: Service/MSN
Version: 1.5 Severity: normal
Keywords: Cc:
Patch Status: Accepted

Description

Summary

Cannot change display name on Adium 1.5 (12/3/15)

Steps to reproduce

  1. Open accouts Preferences
  2. chick Personal tab in MSN accout
  3. type some words in display name

Actual results

Only change display name in my Adium, not change in friend's msn list

Attachments (1)

990b919.patch (623 bytes) - added by horusl 5 years ago.
workaround

Download all attachments as: .zip

Change History (16)

comment:1 Changed 5 years ago by Robby

  • Component changed from Adium Core to Service/MSN

comment:2 Changed 5 years ago by horusl

I can confirm that.

I think it's due to the change of the way of setting alias/display name.

purple_account_set_alias only sets the alias node, in order to set the 'display-name', the original call to msn_set_public_alias is needed. (somehow, it's the reverse work of rev/e95f0ef93e76)

Let me know if that can be a potential solution. Thanks!

comment:3 follow-up: Changed 5 years ago by sphynx

Okay, I'm trying to understand this, I'm not familiar with this code myself, so I'm trying to read through it. Right now it has purple_account_set_alias which is implemented as:

void
purple_account_set_public_alias(PurpleAccount *account,
		const char *alias, PurpleSetPublicAliasSuccessCallback success_cb,
		PurpleSetPublicAliasFailureCallback failure_cb)
{
...
	if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, set_public_alias))
		prpl_info->set_public_alias(gc, alias, success_cb, failure_cb);
...
}

msn.c shows that its set_public_alias field is msn_set_public_alias. It appears that field was added specifically for msn. That would mean that the first call should already do the same as the call you added.

Have you verified that with this change it does work? In that case, we should look at why purple_account_set_alias does something different from calling purple_account_set_alias directly.

comment:4 in reply to: ↑ 3 Changed 5 years ago by horusl

Replying to sphynx:

Okay, I'm trying to understand this, I'm not familiar with this code myself, so I'm trying to read through it. Right now it has purple_account_set_alias which is implemented as:

void
purple_account_set_public_alias(PurpleAccount *account,
		const char *alias, PurpleSetPublicAliasSuccessCallback success_cb,
		PurpleSetPublicAliasFailureCallback failure_cb)
{
...
	if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, set_public_alias))
		prpl_info->set_public_alias(gc, alias, success_cb, failure_cb);
...
}

So, it's purple_account_set_public_alias not purple_account_set_alias. :-P
(I will try to read and test the difference between those calls, I don't know whether a single call to purple_account_set_public_alias is enough.)

msn.c shows that its set_public_alias field is msn_set_public_alias. It appears that field was added specifically for msn. That would mean that the first call should already do the same as the call you added.

Have you verified that with this change it does work? In that case, we should look at why purple_account_set_alias does something different from calling purple_account_set_alias directly.

The patch is tested on the latest 1.6hg. Worked.

Last edited 5 years ago by horusl (previous) (diff)

comment:5 follow-up: Changed 5 years ago by sphynx

Thanks, that explains my confusion: I can't read!

In general, we prefer to use the libpurple API functions (so purple_account_set_public_alias) instead of the prpl specific functions (like msn_set_public_alias). If you'd change that, I'd say this patch would be good to go.

Changed 5 years ago by horusl

workaround

comment:6 in reply to: ↑ 5 Changed 5 years ago by horusl

Replying to sphynx:

Thanks, that explains my confusion: I can't read!

In general, we prefer to use the libpurple API functions (so purple_account_set_public_alias) instead of the prpl specific functions (like msn_set_public_alias). If you'd change that, I'd say this patch would be good to go.

New patch submitted. Tested :)

comment:7 Changed 5 years ago by sphynx

Ticket #16000 has been marked as a duplicate of this ticket.

comment:8 Changed 5 years ago by sphynx

Ticket #15986 has been marked as a duplicate of this ticket.

comment:9 Changed 5 years ago by sphynx

  • Patch Status set to OK; Needs Check-In

comment:10 Changed 5 years ago by Thijs Alkemade <thijsalkemade@…>

  • Resolution set to fixed
  • Status changed from new to closed

(In 9bd686e1fd7c) Patch from horusl fixing MSN public display names not getting set.

Fixes #15915

comment:11 follow-up: Changed 5 years ago by sphynx

  • Milestone set to Adium 1.5.1
  • Patch Status changed from OK; Needs Check-In to Accepted

horsl: Let me know what name I should add to Copyright.txt if you're not in there already.

comment:12 in reply to: ↑ 11 ; follow-up: Changed 5 years ago by horusl

Replying to sphynx:

horusl: Let me know what name I should add to Copyright.txt if you're not in there already.

That would be great! My name is Chenguang Li.
Thanks!

comment:13 Changed 5 years ago by Robert Vehse

(In 4a5092083b6b) Credit Chenguang Li for his patch, changelog the fix. References #15915.

Also some minor reshuffiing of the other changes.

comment:14 in reply to: ↑ 12 ; follow-up: Changed 5 years ago by Robby

Replying to horusl:

Thanks!

Thanks you! I think this fix will please a lot of users. :)

comment:15 in reply to: ↑ 14 Changed 5 years ago by horusl

Replying to Robby:

Replying to horusl:

Thanks!

Thanks you! I think this fix will please a lot of users. :)

Glad I could help. 😄

Note: See TracTickets for help on using tickets.