Wed, 21 Dec 2005 18:43:39 +0000
[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.
| 10418 | 1 | /** |
|
10469
3edb0348ba88
[gaim-migrate @ 11751]
Mark Doliner <markdoliner@pidgin.im>
parents:
10447
diff
changeset
|
2 | * @file gtksavedstatuses.h GTK+ Saved Status Editor UI |
| 10418 | 3 | * @ingroup gtkui |
| 4 | * | |
| 5 | * gaim | |
| 6 | * | |
| 7 | * Gaim is the legal property of its developers, whose names are too numerous | |
| 8 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 | * source distribution. | |
| 10 | * | |
| 11 | * This program is free software; you can redistribute it and/or modify | |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation; either version 2 of the License, or | |
| 14 | * (at your option) any later version. | |
| 15 | * | |
| 16 | * This program is distributed in the hope that it will be useful, | |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 | * GNU General Public License for more details. | |
| 20 | * | |
| 21 | * You should have received a copy of the GNU General Public License | |
| 22 | * along with this program; if not, write to the Free Software | |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 | */ | |
| 25 | #ifndef _GAIM_GTKSAVEDSTATUSES_H_ | |
| 26 | #define _GAIM_GTKSAVEDSTATUSES_H_ | |
| 27 | ||
|
10421
34797f8b5742
[gaim-migrate @ 11672]
Mark Doliner <markdoliner@pidgin.im>
parents:
10418
diff
changeset
|
28 | #include "savedstatuses.h" |
| 10418 | 29 | #include "status.h" |
| 30 | ||
| 31 | /** | |
| 32 | * Shows the status window. | |
| 33 | */ | |
| 34 | void gaim_gtk_status_window_show(void); | |
| 35 | ||
| 36 | /** | |
| 37 | * Hides the status window. | |
| 38 | */ | |
| 39 | void gaim_gtk_status_window_hide(void); | |
| 40 | ||
| 41 | /** | |
|
10447
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10421
diff
changeset
|
42 | * Shows a status editor (used for adding a new saved status or |
|
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10421
diff
changeset
|
43 | * editing an already existing saved status). |
|
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10421
diff
changeset
|
44 | * |
|
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10421
diff
changeset
|
45 | * @param status The saved status to edit, or @c NULL if you |
|
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10421
diff
changeset
|
46 | * want to add a new saved status. |
|
10421
34797f8b5742
[gaim-migrate @ 11672]
Mark Doliner <markdoliner@pidgin.im>
parents:
10418
diff
changeset
|
47 | */ |
|
34797f8b5742
[gaim-migrate @ 11672]
Mark Doliner <markdoliner@pidgin.im>
parents:
10418
diff
changeset
|
48 | void gaim_gtk_status_editor_show(GaimSavedStatus *status); |
|
34797f8b5742
[gaim-migrate @ 11672]
Mark Doliner <markdoliner@pidgin.im>
parents:
10418
diff
changeset
|
49 | |
|
34797f8b5742
[gaim-migrate @ 11672]
Mark Doliner <markdoliner@pidgin.im>
parents:
10418
diff
changeset
|
50 | /** |
| 10418 | 51 | * Returns the gtkstatus handle. |
| 52 | * | |
| 53 | * @return The handle to the GTK+ status system. | |
| 54 | */ | |
| 55 | void *gaim_gtk_status_get_handle(void); | |
| 56 | ||
| 57 | /** | |
| 58 | * Initializes the GTK+ status system. | |
| 59 | */ | |
| 60 | void gaim_gtk_status_init(void); | |
| 61 | ||
| 62 | /** | |
| 63 | * Uninitializes the GTK+ status system. | |
| 64 | */ | |
| 65 | void gaim_gtk_status_uninit(void); | |
| 66 | ||
| 12195 | 67 | /** |
| 68 | * Creates a dropdown menu of saved statuses and calls a callback | |
| 69 | * when one is selected | |
| 70 | * | |
|
12245
f16b735e91c9
[gaim-migrate @ 14547]
Mark Doliner <markdoliner@pidgin.im>
parents:
12195
diff
changeset
|
71 | * @param status The default saved_status to show as 'selected' |
| 12195 | 72 | * @param callback The callback to call when the selection changes |
| 73 | * @return The menu widget | |
| 74 | */ | |
| 75 | GtkWidget *gaim_gtk_status_menu(GaimSavedStatus *status, GCallback callback); | |
| 76 | ||
| 10418 | 77 | #endif /* _GAIM_GTKSAVEDSTATUSES_H_ */ |