aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-avatar-chooser.c
Commit message (Collapse)AuthorAgeFilesLines
* max_width, max_height and max_size are defined as guint in ↵xclaesse2008-11-281-1/+1
| | | | | | EmpathyTpContactFactory and telepathy spec. git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1923 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Use proper format string for max-size propertyhasselmm2008-11-141-1/+1
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1718 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Trivial simplification of the mathxclaesse2008-11-111-1/+1
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1714 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Try to keep the original image format in avatar chooser. This avoid droping ↵xclaesse2008-11-111-58/+69
| | | | | | alpha layer when converting from PNG to JPEG. git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1713 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Improve error message.xclaesse2008-11-111-2/+3
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1712 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Report error to the user when converting the avatar fails.xclaesse2008-11-111-4/+37
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1711 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Cleanup code and add some commentsxclaesse2008-11-111-6/+17
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1710 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Make a dichotomic search for the optimal image size. Cleanup some codexclaesse2008-11-111-112/+121
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1708 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Correctly resize the image to fit required max width/heightxclaesse2008-11-111-13/+33
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1707 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Add empathy_pixbuf_from_data_and_mime instead of breaking API.xclaesse2008-11-111-2/+4
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1706 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Don't modify EmpathyAvatar::format if gdkpixbuf disagreesxclaesse2008-11-111-4/+4
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1705 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Use two g_asserts rather than g_assert (foo && bar).xclaesse2008-11-111-2/+4
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1704 4ee84921-47dd-4033-b63a-18d7a039a3e4
* can_satisfy_mime_type_requirements: assume out params != NULLxclaesse2008-11-111-10/+2
| | | | | | (I never actually removed the assertion that they be non-NULL.) git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1703 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Prefer png or jpeg if possible when converting avatarsxclaesse2008-11-111-20/+34
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1702 4ee84921-47dd-4033-b63a-18d7a039a3e4
* If setting an avatar from an EmpathyAvatar, just ref it.xclaesse2008-11-111-25/+66
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1699 4ee84921-47dd-4033-b63a-18d7a039a3e4
* AvatarChooser: clarify why _scale_down_if_necessary is cheap.xclaesse2008-11-111-2/+7
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1698 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Make can_satisfy_mime_type_requirements accept NULL out params.xclaesse2008-11-111-6/+24
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1697 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Flip iterating across format_mime_types and accepted_mime_types.xclaesse2008-11-111-2/+2
| | | | | | | | This better reflects the purpose of the conditional; "for each mime type we can convert to, is it acceptable?" is clearer than "for each acceptable mime type, can we convert to it?". git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1696 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Use l and strv for list and strv iterators, not i and jxclaesse2008-11-111-7/+7
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1695 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Coding style: cuddle a bracexclaesse2008-11-111-2/+1
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1693 4ee84921-47dd-4033-b63a-18d7a039a3e4
* AvatarChooser: don't set contact_factory to NULL after unreffing.xclaesse2008-11-111-3/+2
| | | | | | The object is being destroyed anyway. git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1692 4ee84921-47dd-4033-b63a-18d7a039a3e4
* AvatarChooser: Remove empathy_ prefix from static functions.xclaesse2008-11-111-10/+10
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1691 4ee84921-47dd-4033-b63a-18d7a039a3e4
* AvatarChooser needs no ContactFactory property; it's a singleton.xclaesse2008-11-111-29/+4
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1690 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Coding style: no blank lines in local variable declarationsxclaesse2008-11-111-4/+0
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1689 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Coding style: use FIXME rather than TODO.xclaesse2008-11-111-5/+5
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1688 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Coding style: only one blank line between functions.xclaesse2008-11-111-5/+0
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1687 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Coding style: use braces for one-statement blocks in AvatarChooserxclaesse2008-11-111-9/+19
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1686 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Check the contact factory is still ready when avatar picker is OKed.xclaesse2008-11-111-0/+13
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1685 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Don't explicitly check for the new avatar being zero bytesxclaesse2008-11-111-1/+1
| | | | | | | empathy_pixbuf_from_data will whine if it can't parse the image, which it won't be able to. git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1684 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Don't clear user's avatar if a file can't be read.xclaesse2008-11-111-2/+0
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1683 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Implement scaling and converting avatars before sending.xclaesse2008-11-111-65/+265
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1682 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Track whether avatar is being set locally, or received from elsewhere.xclaesse2008-11-111-12/+17
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1680 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Use e_avatar_chooser_clear_image() helper.xclaesse2008-11-111-1/+1
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1679 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Ref result of empathy_contact_factory_get_tp_factoryxclaesse2008-11-111-2/+2
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1678 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Make avatar chooser (in)sensitive when the TpContactFactory becomes (not) readyxclaesse2008-11-111-10/+62
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1677 4ee84921-47dd-4033-b63a-18d7a039a3e4
* AvatarChooser: Add McAccount and EmpathyContactFactory propertiesxclaesse2008-11-111-2/+96
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1675 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Don't automatically resize and png-ify avatars.xclaesse2008-11-111-34/+37
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1669 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Consolidate hardcoding avatars to PNG to one function.xclaesse2008-11-111-1/+7
| | | | | | | (Incidentally, return "image/png" rather than "png" for the mime type, as the latter is not a mime type.) git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1668 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Keep a priv pointer in the object struct instead of using ↵xclaesse2008-05-061-5/+5
| | | | | | G_TYPE_INSTANCE_GET_PRIVATE all the time. git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1082 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Make use of tp-glib debug system.xclaesse2008-05-011-7/+6
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1066 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Move modules that make no sense to be used in other applicaton from ↵xclaesse2008-03-141-1/+0
| | | | | | libempathy-gtk/ to src/ git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@789 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Fix leaksxclaesse2008-03-111-10/+11
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@739 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Drop gnome-vfs dependency and use gio instead. Fixes bug #514380 (Cosimo ↵xclaesse2008-03-111-20/+29
| | | | | | Cecchi). git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@737 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Update collabora copyright to 2008xclaesse2008-03-031-1/+1
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@688 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Move empathy-conf to libempathy-gtk. libempathy do not depend directly on ↵xclaesse2008-01-231-1/+2
| | | | | | gconf anymore. git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@597 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Change EMPATHY_AVATAR_CHOOSER_TYPE to EMPATHY_TYPE_AVATAR_CHOOSERxclaesse2008-01-161-2/+2
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@562 4ee84921-47dd-4033-b63a-18d7a039a3e4
* Fix setting avatar. (Sjoerd Simons)xclaesse2008-01-051-1/+1
| | | | git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@530 4ee84921-47dd-4033-b63a-18d7a039a3e4
* 2007-11-03 Xavier Claessens <xclaesse@gmail.com>xclaesse2007-11-041-2/+6
| | | | | | | | | | | | | | | | * libempathy-gtk/empathy-contact-widget.c: * libempathy-gtk/empathy-avatar-chooser.c: * libempathy-gtk/empathy-avatar-chooser.h: * python/pyempathy/pyempathy.defs: * libempathy/empathy-contact-factory.c: * libempathy/empathy-contact-factory.h: Rename empathy_contact_factory_set_name() to _set_alias(). Implements empathy_contact_factory_set_avatar(). Return the mime_type in empathy_avatar_chooser_get_image_data(). git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@417 4ee84921-47dd-4033-b63a-18d7a039a3e4
* 2007-10-09 Xavier Claessens <xclaesse@gmail.com>xclaesse2007-10-091-23/+15
| | | | | | | | | | | | * libempathy-gtk/empathy-contact-widget.glade: * libempathy-gtk/empathy-contact-widget.c: * libempathy-gtk/empathy-avatar-chooser.c: * libempathy-gtk/empathy-avatar-image.c: Makes avatar looks better in information and edit dialogs. git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@364 4ee84921-47dd-4033-b63a-18d7a039a3e4
* 2007-10-08 Xavier Claessens <xclaesse@gmail.com>xclaesse2007-10-091-0/+572
* libempathy-gtk/empathy-ui-utils.c: * libempathy-gtk/empathy-ui-utils.h: * libempathy-gtk/empathy-contact-widget.c: * libempathy-gtk/empathy-contact-widget.h: * libempathy-gtk/empathy-avatar-chooser.c: * libempathy-gtk/empathy-avatar-chooser.h: * libempathy-gtk/empathy-avatar-image.c: * libempathy-gtk/empathy-avatar-image.h: * libempathy-gtk/Makefile.am: * src/empathy.c: Implement EmpathyAvatarChooser and EmpathyAvatarImage and make use of them in contact information windows. That means we can now enlarge avatars when clicking on it and we can set our own avatar if we edit our own contact. git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@363 4ee84921-47dd-4033-b63a-18d7a039a3e4