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.
| 8317 | 1 | /* |
| 2 | * GtkIMHtmlToolbar | |
| 3 | * | |
| 4 | * Gaim is the legal property of its developers, whose names are too numerous | |
| 5 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 6 | * source distribution. | |
| 7 | * | |
| 8 | * This program is free software; you can redistribute it and/or modify | |
| 9 | * under the terms of the GNU General Public License as published by | |
| 10 | * the Free Software Foundation; either version 2 of the License, or | |
| 11 | * (at your option) any later version. | |
| 12 | * | |
| 13 | * This program is distributed in the hope that it will be useful, | |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 | * GNU General Public License for more details. | |
| 17 | * | |
| 18 | * You should have received a copy of the GNU General Public License | |
| 19 | * along with this program; if not, write to the Free Software | |
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 21 | * | |
| 22 | */ | |
|
9713
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
8427
diff
changeset
|
23 | #ifndef _GAIM_GTKIMHTMLTOOLBAR_H_ |
|
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
8427
diff
changeset
|
24 | #define _GAIM_GTKIMHTMLTOOLBAR_H_ |
| 8317 | 25 | |
| 26 | #include <gtk/gtkvbox.h> | |
| 27 | #include "gtkimhtml.h" | |
| 28 | ||
| 29 | #ifdef __cplusplus | |
| 30 | extern "C" { | |
| 31 | #endif | |
| 32 | ||
| 10125 | 33 | #define DEFAULT_FONT_FACE "Helvetica 12" |
| 34 | ||
| 8317 | 35 | #define GTK_TYPE_IMHTMLTOOLBAR (gtk_imhtmltoolbar_get_type ()) |
| 36 | #define GTK_IMHTMLTOOLBAR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_IMHTMLTOOLBAR, GtkIMHtmlToolbar)) | |
| 37 | #define GTK_IMHTMLTOOLBAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_IMHTMLTOOLBAR, GtkIMHtmlToolbarClass)) | |
| 38 | #define GTK_IS_IMHTMLTOOLBAR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_IMHTMLTOOLBAR)) | |
| 39 | #define GTK_IS_IMHTMLTOOLBAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IMHTMLTOOLBAR)) | |
| 40 | ||
| 41 | typedef struct _GtkIMHtmlToolbar GtkIMHtmlToolbar; | |
| 42 | typedef struct _GtkIMHtmlToolbarClass GtkIMHtmlToolbarClass; | |
| 43 | ||
| 44 | struct _GtkIMHtmlToolbar { | |
| 10080 | 45 | GtkHBox box; |
| 8317 | 46 | |
| 47 | GtkWidget *imhtml; | |
| 48 | ||
| 49 | GtkTooltips *tooltips; | |
|
8319
6c18762beceb
[gaim-migrate @ 9043]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
50 | |
| 8317 | 51 | GtkWidget *bold; |
| 52 | GtkWidget *italic; | |
| 53 | GtkWidget *underline; | |
|
8319
6c18762beceb
[gaim-migrate @ 9043]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
54 | |
| 8317 | 55 | GtkWidget *larger_size; |
| 56 | GtkWidget *normal_size; | |
| 57 | GtkWidget *smaller_size; | |
| 58 | ||
| 59 | GtkWidget *font; | |
| 60 | GtkWidget *fgcolor; | |
| 61 | GtkWidget *bgcolor; | |
| 62 | ||
|
11271
939be1fdbf7a
[gaim-migrate @ 13454]
Richard Laager <rlaager@pidgin.im>
parents:
11270
diff
changeset
|
63 | GtkWidget *clear; |
|
939be1fdbf7a
[gaim-migrate @ 13454]
Richard Laager <rlaager@pidgin.im>
parents:
11270
diff
changeset
|
64 | |
| 8317 | 65 | GtkWidget *image; |
| 66 | GtkWidget *link; | |
| 67 | GtkWidget *smiley; | |
| 68 | ||
| 69 | GtkWidget *font_dialog; | |
| 70 | GtkWidget *fgcolor_dialog; | |
| 71 | GtkWidget *bgcolor_dialog; | |
| 72 | GtkWidget *link_dialog; | |
|
10138
b72c5fdc98b3
[gaim-migrate @ 11208]
Mark Doliner <markdoliner@pidgin.im>
parents:
10134
diff
changeset
|
73 | GtkWidget *smiley_dialog; |
| 8317 | 74 | GtkWidget *image_dialog; |
| 8427 | 75 | |
| 76 | char *sml; | |
| 8317 | 77 | }; |
| 78 | ||
| 79 | struct _GtkIMHtmlToolbarClass { | |
| 10080 | 80 | GtkHBoxClass parent_class; |
| 8317 | 81 | |
| 82 | }; | |
| 83 | ||
|
8319
6c18762beceb
[gaim-migrate @ 9043]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
84 | GType gtk_imhtmltoolbar_get_type (void); |
| 8317 | 85 | GtkWidget* gtk_imhtmltoolbar_new (void); |
| 86 | ||
| 87 | void gtk_imhtmltoolbar_attach (GtkIMHtmlToolbar *toolbar, GtkWidget *imhtml); | |
| 8427 | 88 | void gtk_imhtmltoolbar_associate_smileys (GtkIMHtmlToolbar *toolbar, const char *proto_id); |
| 8317 | 89 | |
| 90 | ||
| 91 | #ifdef __cplusplus | |
| 92 | } | |
| 93 | #endif | |
| 94 | ||
|
9713
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
8427
diff
changeset
|
95 | #endif /* _GAIM_GTKIMHTMLTOOLBAR_H_ */ |