Fix several issues with PidginAvatar in a conversation
Review Request #1689 — Created Aug. 30, 2022 and submitted
- The
content-fit
option is only in GTK 4.8+. - A static file can't be set as a
GdkPixbuf
, which causes warnings when
hovering over the avatar. - The custom icon menu didn't work as it only checked for an attached buddy.
- Changing the custom icon didn't cause a refresh in the buddy icon; this is
fixed now, but in a slightly annoying way. - Changing the custom icon in the buddy list doesn't change the icon in the
conversation window; this is not yet fixed due to missing signals.
The latter two can probably be fixed better when buddies/contacts have better
signals.
Hovered over avatar in a conversation, which didn't cause any warnings.
Picked all options in Custom Icon menu from a conversation, and they all worked as expected (except for a few buddy list / conversation interactions noted above.)Also, only tested IM conversations; probably broken in chat conversations, since there are no checks for it?
- Change Summary:
-
Deduplicate
pidgin_avatar_update
. - Description:
-
- The
content-fit
option is only in GTK 4.8+.
- A static file can't be set as a
GdkPixbuf
, which causes warnings when
hovering over the avatar.
- The custom icon menu didn't work as it only checked for an attached buddy.
- Changing the custom icon didn't cause a refresh in the buddy icon; this is
fixed now, but in a slightly annoying way.
~ - Changing the custom icon in the buddy icon doesn't change the icon in the
conversation window; this is not yet fixed due to missing signals.
~ - Changing the custom icon in the buddy list doesn't change the icon in the
conversation window; this is not yet fixed due to missing signals.
The latter two can probably be fixed better when buddies/contacts have better
signals. - The
- Testing Done:
-
Hovered over avatar in a conversation, which didn't cause any warnings.
Picked all options in Custom Icon menu from a conversation, and they all worked as expected (except for a few buddy list / conversation interactions noted above.) + + Also, only tested IM conversations; probably broken in chat conversations, since there are no checks for it?
- Commits:
-
Summary ID f7d58250371fc806f2c67051f8aac5df0ae1dfdf da25e732558ad813712c3788d416372d56d746f2 - Diff:
-
Revision 2 (+412 -332)
- Change Summary:
-
pidgin_avatar_find_buddy_icon
already checksPURPLE_IS_IM_CONVERSATION
internally, so we can change types and drop the cast at the caller, which reduces the ternary.The
PURPLE_IS_BUDDY
check was missing around that call as well. - Commits:
-
Summary ID da25e732558ad813712c3788d416372d56d746f2 fc028f30e52a4e0bd0a8121b17f714f78e6ea761 - Diff:
-
Revision 3 (+412 -332)