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
--- 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 @@
+ $(srcdir)/buddyicon.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 @@
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 @@
+ * 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; * @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 @@
- PurpleIconScaleRules scale_rules;
+ PurpleBuddyIconScaleFlags scale_rules; @@ -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
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 @@
-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: