Wed, 09 Dec 2015 22:29:06 -0800
Move PurpleIconScaleRules to BuddyIcon API
Move PurpleIconScaleRules to a more sensible place
Moved from protocols.h to buddyicon.h
Changed name from PurpleIconScaleRules to PurpleBuddyIconScaleFlags
| ChangeLog.API | file | annotate | diff | comparison | revisions | |
| libpurple/Makefile.am | file | annotate | diff | comparison | revisions | |
| libpurple/buddyicon.c | file | annotate | diff | comparison | revisions | |
| libpurple/buddyicon.h | file | annotate | diff | comparison | revisions | |
| libpurple/protocols.h | file | annotate | diff | comparison | revisions | |
| pidgin/gtkutils.c | file | annotate | diff | comparison | revisions | |
| pidgin/gtkutils.h | file | annotate | diff | comparison | revisions |
--- a/ChangeLog.API Wed Dec 09 20:11:47 2015 -0800 +++ b/ChangeLog.API Wed Dec 09 22:29:06 2015 -0800 @@ -275,6 +275,7 @@ * purple_conversation_get_gc renamed to purple_conversation_get_connection * purple_dnsquery_a now takes a PurpleAccount as the first parameter + * PurpleIconScaleRules renamed to PurpleBuddyIconScaleFlags * purple_imgstore_add renamed to purple_imgstore_new * purple_imgstore_add_with_id renamed to purple_imgstore_new_with_id * purple_network_listen now takes the protocol family as the second
--- a/libpurple/Makefile.am Wed Dec 09 20:11:47 2015 -0800 +++ b/libpurple/Makefile.am Wed Dec 09 22:29:06 2015 -0800 @@ -253,6 +253,7 @@ purple_enumheaders = \ $(srcdir)/account.h \ + $(srcdir)/buddyicon.h \ $(srcdir)/cipher.h \ $(srcdir)/connection.h \ $(srcdir)/conversation.h \
--- a/libpurple/buddyicon.c Wed Dec 09 20:11:47 2015 -0800 +++ b/libpurple/buddyicon.c Wed Dec 09 22:29:06 2015 -0800 @@ -1129,7 +1129,7 @@ PurpleBuddyIconSpec * purple_buddy_icon_spec_new(char *format, int min_width, int min_height, int max_width, int max_height, size_t max_filesize, - PurpleIconScaleRules scale_rules) + PurpleBuddyIconScaleFlags scale_rules) { PurpleBuddyIconSpec *icon_spec;
--- a/libpurple/buddyicon.h Wed Dec 09 20:11:47 2015 -0800 +++ b/libpurple/buddyicon.h Wed Dec 09 22:29:06 2015 -0800 @@ -51,6 +51,18 @@ #include "util.h" /** + * PurpleBuddyIconScaleFlags: + * @PURPLE_ICON_SCALE_DISPLAY: We scale the icon when we display it + * @PURPLE_ICON_SCALE_SEND: We scale the icon before we send it to the server + */ +typedef enum /*< flags >*/ +{ + PURPLE_ICON_SCALE_DISPLAY = 0x01, + PURPLE_ICON_SCALE_SEND = 0x02 + +} PurpleBuddyIconScaleFlags; + +/** * PurpleBuddyIconSpec: * @format: This is a comma-delimited list of image formats or %NULL if icons * are not supported. Neither the core nor the protocol will actually @@ -75,7 +87,7 @@ int max_width; int max_height; size_t max_filesize; - PurpleIconScaleRules scale_rules; + PurpleBuddyIconScaleFlags scale_rules; }; G_BEGIN_DECLS @@ -482,7 +494,7 @@ */ PurpleBuddyIconSpec *purple_buddy_icon_spec_new(char *format, int min_width, int min_height, int max_width, int max_height, size_t max_filesize, - PurpleIconScaleRules scale_rules); + PurpleBuddyIconScaleFlags scale_rules); /** * purple_buddy_icon_spec_get_scaled_size:
--- a/libpurple/protocols.h Wed Dec 09 20:11:47 2015 -0800 +++ b/libpurple/protocols.h Wed Dec 09 22:29:06 2015 -0800 @@ -50,18 +50,6 @@ /* Basic Protocol Information */ /**************************************************************************/ -/** - * PurpleIconScaleRules: - * @PURPLE_ICON_SCALE_DISPLAY: We scale the icon when we display it - * @PURPLE_ICON_SCALE_SEND: We scale the icon before we send it to the server - */ -typedef enum /*< flags >*/ -{ - PURPLE_ICON_SCALE_DISPLAY = 0x01, - PURPLE_ICON_SCALE_SEND = 0x02 - -} PurpleIconScaleRules; - typedef struct _PurpleProtocolChatEntry PurpleProtocolChatEntry; /**
--- a/pidgin/gtkutils.c Wed Dec 09 20:11:47 2015 -0800 +++ b/pidgin/gtkutils.c Wed Dec 09 22:29:06 2015 -0800 @@ -1622,7 +1622,7 @@ g_free(basename); } -void pidgin_buddy_icon_get_scale_size(GdkPixbuf *buf, PurpleBuddyIconSpec *spec, PurpleIconScaleRules rules, int *width, int *height) +void pidgin_buddy_icon_get_scale_size(GdkPixbuf *buf, PurpleBuddyIconSpec *spec, PurpleBuddyIconScaleFlags rules, int *width, int *height) { *width = gdk_pixbuf_get_width(buf); *height = gdk_pixbuf_get_height(buf);
--- a/pidgin/gtkutils.h Wed Dec 09 20:11:47 2015 -0800 +++ b/pidgin/gtkutils.h Wed Dec 09 22:29:06 2015 -0800 @@ -535,7 +535,7 @@ * * Convenience wrapper for purple_buddy_icon_spec_get_scaled_size */ -void pidgin_buddy_icon_get_scale_size(GdkPixbuf *buf, PurpleBuddyIconSpec *spec, PurpleIconScaleRules rules, int *width, int *height); +void pidgin_buddy_icon_get_scale_size(GdkPixbuf *buf, PurpleBuddyIconSpec *spec, PurpleBuddyIconScaleFlags rules, int *width, int *height); /** * pidgin_create_protocol_icon: