Add icon-name, icon-search-path, and icon-resource-path to PurpleProtocol
Review Request #790 — Created July 8, 2021 and submitted
These are now used by pidgin_create_icon_from_protocol which will attempt to
load the icon for the protocol from the default GtkIconTheme if the protocol
has a non NULL value for icon-name.pidgin_ui_init was also updated to add icon-search-path and icon-resource-path
to the default GtkIconTheme when a protocol is registered. It also scans all of
the protocols that have been already been registered as that happens before the
ui is initialized.
Removed old local icon and then ran with an inverted icon to make sure pidgin was displaying the icon from the resource.
- Change Summary:
-
Updated to work with the gtk_icon_theme_api
- Summary:
-
Add an icon method to PurpleProtocolClass and port irc to itAdd icon-name, icon-search-path, and icon-resource-path to PurpleProtocol
- Description:
-
~ This updates the pidgin_create_icon_from_protocol to check the new method first and then fall back to the existing list_icon method.
~ These are now used by pidgin_create_icon_from_protocol which will attempt to
+ load the icon for the protocol from the default GtkIconTheme if the protocol + has a non NULL value for icon-name. ~ I opted for a 128x128px icon just kind of on a whim but figured higher resolution is better. We could pass a size parameter to icon function and then avoid some scaling, as the protocol could specify different resources, but then that means a new enum in libpurple that's very ui specific, but maybe that's fine.
~ ~ I didn't move the svg because I removed some additional shadows that were in the original svg. If we want I can go back and do the remove but it was just easier for me at the moment.
~ pidgin_ui_init was also updated to add icon-search-path and icon-resource-path
~ to the default GtkIconTheme when a protocol is registered. It also scans all of ~ the protocols that have been already been registered as that happens before the + ui is initialized. - Testing Done:
-
~ Ran locally with an inverted icon to make sure pidgin was displaying the icon from the resource.
~ Removed old local icon and then ran with an inverted icon to make sure pidgin was displaying the icon from the resource.
- Commit:
-
c9a3f984cf3c28468ab07ff9
- Diff:
-
Revision 2 (+309 -5)
- Commit:
-
28468ab07ff94e7a90c391af
- Diff:
-
Revision 3 (+309 -5)
- Change Summary:
-
Make the docs actually build
- Commit:
-
4e7a90c391af9713338010e9
- Diff:
-
Revision 4 (+309 -5)