src/gtknotify.h

Wed, 21 Dec 2005 18:43:39 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Wed, 21 Dec 2005 18:43:39 +0000
changeset 12601
be19ef28e2ce
parent 9713
bb37562302a1
permissions
-rw-r--r--

[gaim-migrate @ 14935]
Jason LeBrun wrote to gaim-devel:

"I have found a small quirk in the way gdk_pixbuf_loader works. When you
are using it without signalling, the proper way to use it is to call
gdk_pixbuf_loader_close *before* calling gdk_pixbuf_loader_get_animation
or gdk_pixbuf_loader_get_pixbuf. The call to gdk_pixbuf_loader_close
signals that no more writes will be occuring.

In particular, this affects images that are less than 1k in size. If
gdk_pixbuf_loader_close is not called before _get_animation, the loader
will not return anything unless it has received more than 1k of data
(the file type sniffing buffer size) or it has been closed.

So, the proper order of calls for loaders in the gtk*.c code is:

gdk_pixbuf_loader_new();
gdk_pixbuf_loader_write();
gdk_pixbuf_loader_close();
gdk_pixbuf_loader_get_animation();"

I know we fixed a bug by changing this in one place. I've gone through and updated the rest.

5437
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * @file gtknotify.h GTK+ Notification API
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 * @ingroup gtkui
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 *
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 * gaim
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6 *
8046
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7035
diff changeset
7 * Gaim is the legal property of its developers, whose names are too numerous
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7035
diff changeset
8 * to list here. Please refer to the COPYRIGHT file distributed with this
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7035
diff changeset
9 * source distribution.
6465
bd201d637ff4 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 5437
diff changeset
10 *
5437
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * This program is free software; you can redistribute it and/or modify
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * it under the terms of the GNU General Public License as published by
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * the Free Software Foundation; either version 2 of the License, or
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * (at your option) any later version.
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 *
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful,
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * GNU General Public License for more details.
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 *
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 * along with this program; if not, write to the Free Software
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 */
9713
bb37562302a1 [gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
25 #ifndef _GAIM_GTKNOTIFY_H_
bb37562302a1 [gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
26 #define _GAIM_GTKNOTIFY_H_
5437
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
27
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28 #include "notify.h"
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30 /**
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31 * Returns the UI operations structure for GTK+ notification functions.
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32 *
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 * @return The GTK+ UI notify operations structure.
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
34 */
7035
76bca80cd91d [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 6465
diff changeset
35 GaimNotifyUiOps *gaim_gtk_notify_get_ui_ops(void);
5437
4bd5c5d271e6 [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36
9713
bb37562302a1 [gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
37 #endif /* _GAIM_GTKNOTIFY_H_ */

mercurial