Mercurial > pidgin
changeset 15219:4bf7801a2539
[gaim-migrate @ 18009]
Add a max_filesize attribute to the icon_spec struct. It's not
actually used yet--I'll update the UI to do that later.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 15 Dec 2006 10:35:18 +0000 |
parents | ec96d6d2fa6d |
children | 152756b02fca |
files | libgaim/protocols/bonjour/bonjour.c libgaim/protocols/jabber/jabber.c libgaim/protocols/msn/msn.c libgaim/protocols/oscar/libaim.c libgaim/protocols/oscar/libicq.c libgaim/protocols/qq/qq.c libgaim/protocols/silc/silc.c libgaim/protocols/yahoo/yahoo.c libgaim/prpl.h |
diffstat | 9 files changed, 24 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/libgaim/protocols/bonjour/bonjour.c Fri Dec 15 08:39:53 2006 +0000 +++ b/libgaim/protocols/bonjour/bonjour.c Fri Dec 15 10:35:18 2006 +0000 @@ -356,7 +356,7 @@ OPT_PROTO_NO_PASSWORD, NULL, /* user_splits */ NULL, /* protocol_options */ - /* {"png", 0, 0, 96, 96, GAIM_ICON_SCALE_DISPLAY}, */ /* icon_spec */ + /* {"png", 0, 0, 96, 96, 0, GAIM_ICON_SCALE_DISPLAY}, */ /* icon_spec */ NO_BUDDY_ICONS, /* not yet */ /* icon_spec */ bonjour_list_icon, /* list_icon */ bonjour_list_emblems, /* list_emblems */
--- a/libgaim/protocols/jabber/jabber.c Fri Dec 15 08:39:53 2006 +0000 +++ b/libgaim/protocols/jabber/jabber.c Fri Dec 15 10:35:18 2006 +0000 @@ -1852,7 +1852,7 @@ OPT_PROTO_CHAT_TOPIC | OPT_PROTO_UNIQUE_CHATNAME | OPT_PROTO_MAIL_CHECK, NULL, /* user_splits */ NULL, /* protocol_options */ - {"png,gif,jpeg", 32, 32, 96, 96, GAIM_ICON_SCALE_SEND | GAIM_ICON_SCALE_DISPLAY}, /* icon_spec */ + {"png,gif,jpeg", 32, 32, 96, 96, 8191, GAIM_ICON_SCALE_SEND | GAIM_ICON_SCALE_DISPLAY}, /* icon_spec */ jabber_list_icon, /* list_icon */ jabber_list_emblems, /* list_emblems */ jabber_status_text, /* status_text */
--- a/libgaim/protocols/msn/msn.c Fri Dec 15 08:39:53 2006 +0000 +++ b/libgaim/protocols/msn/msn.c Fri Dec 15 10:35:18 2006 +0000 @@ -1954,7 +1954,7 @@ OPT_PROTO_MAIL_CHECK, NULL, /* user_splits */ NULL, /* protocol_options */ - {"png", 0, 0, 96, 96, GAIM_ICON_SCALE_SEND}, /* icon_spec */ + {"png", 0, 0, 96, 96, 0, GAIM_ICON_SCALE_SEND}, /* icon_spec */ msn_list_icon, /* list_icon */ msn_list_emblems, /* list_emblems */ msn_status_text, /* status_text */
--- a/libgaim/protocols/oscar/libaim.c Fri Dec 15 08:39:53 2006 +0000 +++ b/libgaim/protocols/oscar/libaim.c Fri Dec 15 10:35:18 2006 +0000 @@ -32,7 +32,7 @@ NULL, /* user_splits */ NULL, /* protocol_options */ /* The mimimum icon size below is not needed in AIM 6.0 */ - {"gif,jpeg,bmp,ico", 48, 48, 50, 50, + {"gif,jpeg,bmp,ico", 48, 48, 50, 50, 7168, GAIM_ICON_SCALE_SEND | GAIM_ICON_SCALE_DISPLAY}, /* icon_spec */ oscar_list_icon_aim, /* list_icon */ oscar_list_emblems, /* list_emblems */
--- a/libgaim/protocols/oscar/libicq.c Fri Dec 15 08:39:53 2006 +0000 +++ b/libgaim/protocols/oscar/libicq.c Fri Dec 15 10:35:18 2006 +0000 @@ -32,7 +32,7 @@ OPT_PROTO_MAIL_CHECK | OPT_PROTO_IM_IMAGE, NULL, /* user_splits */ NULL, /* protocol_options */ - {"gif,jpeg,bmp,ico", 48, 48, 50, 50, + {"gif,jpeg,bmp,ico", 48, 48, 50, 50, 7168, GAIM_ICON_SCALE_SEND | GAIM_ICON_SCALE_DISPLAY}, /* icon_spec */ oscar_list_icon_icq, /* list_icon */ oscar_list_emblems, /* list_emblems */
--- a/libgaim/protocols/qq/qq.c Fri Dec 15 08:39:53 2006 +0000 +++ b/libgaim/protocols/qq/qq.c Fri Dec 15 10:35:18 2006 +0000 @@ -653,7 +653,7 @@ OPT_PROTO_CHAT_TOPIC | OPT_PROTO_USE_POINTSIZE, NULL, /* user_splits */ NULL, /* protocol_options */ - {"png", 96, 96, 96, 96, GAIM_ICON_SCALE_SEND}, /* icon_spec */ + {"png", 96, 96, 96, 96, 0, GAIM_ICON_SCALE_SEND}, /* icon_spec */ _qq_list_icon, /* list_icon */ _qq_list_emblems, /* list_emblems */ _qq_status_text, /* status_text */
--- a/libgaim/protocols/silc/silc.c Fri Dec 15 08:39:53 2006 +0000 +++ b/libgaim/protocols/silc/silc.c Fri Dec 15 10:35:18 2006 +0000 @@ -1734,7 +1734,7 @@ NULL, /* user_splits */ NULL, /* protocol_options */ #ifdef SILC_ATTRIBUTE_USER_ICON - {"jpeg,gif,png,bmp", 0, 0, 96, 96, GAIM_ICON_SCALE_DISPLAY}, /* icon_spec */ + {"jpeg,gif,png,bmp", 0, 0, 96, 96, 0, GAIM_ICON_SCALE_DISPLAY}, /* icon_spec */ #else NO_BUDDY_ICONS, #endif
--- a/libgaim/protocols/yahoo/yahoo.c Fri Dec 15 08:39:53 2006 +0000 +++ b/libgaim/protocols/yahoo/yahoo.c Fri Dec 15 10:35:18 2006 +0000 @@ -3821,7 +3821,7 @@ OPT_PROTO_MAIL_CHECK | OPT_PROTO_CHAT_TOPIC, NULL, /* user_splits */ NULL, /* protocol_options */ - {"png,gif,jpeg", 96, 96, 96, 96, GAIM_ICON_SCALE_SEND}, + {"png,gif,jpeg", 96, 96, 96, 96, 0, GAIM_ICON_SCALE_SEND}, yahoo_list_icon, yahoo_list_emblems, yahoo_status_text,
--- a/libgaim/prpl.h Fri Dec 15 08:39:53 2006 +0000 +++ b/libgaim/prpl.h Fri Dec 15 10:35:18 2006 +0000 @@ -46,22 +46,15 @@ * it should give this prpl, and what kind of image file it should expect back. * Dimensions less than 1 should be ignored and the image not scaled. */ -typedef struct { - char *format; /**< This is a comma-delimited list of image formats or NULL if icons are not supported. - * Neither the core nor the prpl will actually check to see if the data it's given matches this; it's - * entirely up to the UI to do what it wants */ - int min_width; /**< The minimum width of this icon */ - int min_height; /**< The minimum height of this icon */ - int max_width; /**< The maximum width of this icon */ - int max_height; /**< The maximum height of this icon */ - GaimIconScaleRules scale_rules; /**< How to stretch this icon */ -} GaimBuddyIconSpec; +typedef struct _GaimBuddyIconSpec GaimBuddyIconSpec; /** * This \#define exists just to make it easier to fill out the buddy icon * field in the prpl info struct for protocols that couldn't care less. */ -#define NO_BUDDY_ICONS {NULL, 0, 0, 0, 0, 0} +#define NO_BUDDY_ICONS {NULL, 0, 0, 0, 0, 0, 0} + +#include <unistd.h> #include "blist.h" #include "conversation.h" @@ -73,6 +66,18 @@ #include "status.h" #include "whiteboard.h" +struct _GaimBuddyIconSpec { + char *format; /**< This is a comma-delimited list of image formats or NULL if icons are not supported. + * Neither the core nor the prpl will actually check to see if the data it's given matches this; it's + * entirely up to the UI to do what it wants */ + int min_width; /**< The minimum width of this icon */ + int min_height; /**< The minimum height of this icon */ + int max_width; /**< The maximum width of this icon */ + int max_height; /**< The maximum height of this icon */ + size_t max_filesize; /**< The maximum number of bytes */ + GaimIconScaleRules scale_rules; /**< How to stretch this icon */ +}; + struct proto_chat_entry { const char *label; const char *identifier;