Mercurial > pidgin
annotate src/gtkimhtml.h @ 4622:56dde5f7d3a8
[gaim-migrate @ 4913]
Fixed the "Closing a chat crashes gaim" bug, I think.
There was a double-free going on with the chat topic and the user who set
the topic. The first did checks to see if it was NULL, and if not, freed
it. The second just freed it. The second should NOT have existed!
Probably explains why I could only duplicate it in channels with no
topic.
Let me know if this still crashes for anybody. It stopped crashing here.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 27 Feb 2003 10:05:05 +0000 |
parents | 8299114f5693 |
children | 66c2388046fb |
rev | line source |
---|---|
1428 | 1 /* |
2 * GtkIMHtml | |
3 * | |
4 * Copyright (C) 2000, Eric Warmenhoven <warmenhoven@yahoo.com> | |
5 * | |
6 * This program is free software; you can redistribute it and/or modify | |
7 * under the terms of the GNU General Public License as published by | |
8 * the Free Software Foundation; either version 2 of the License, or | |
9 * (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 * | |
20 */ | |
21 | |
22 #ifndef __GTK_IMHTML_H | |
23 #define __GTK_IMHTML_H | |
24 | |
25 #include <gdk/gdk.h> | |
3922 | 26 #include <gtk/gtktextview.h> |
1428 | 27 |
28 #ifdef __cplusplus | |
29 extern "C" { | |
30 #endif | |
31 | |
32 #define GTK_TYPE_IMHTML (gtk_imhtml_get_type ()) | |
33 #define GTK_IMHTML(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_IMHTML, GtkIMHtml)) | |
34 #define GTK_IMHTML_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_IMHTML, GtkIMHtmlClass)) | |
35 #define GTK_IS_IMHTML(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_IMHTML)) | |
36 #define GTK_IS_IMHTML_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IMHTML)) | |
37 | |
38 typedef gchar** (*GtkIMHtmlImage) (gchar *url); | |
39 | |
2349
60c716c32c40
[gaim-migrate @ 2362]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1780
diff
changeset
|
40 typedef struct _GtkSmileyTree GtkSmileyTree; |
4263 | 41 typedef struct _GtkIMHtmlSmiley GtkIMHtmlSmiley; |
2349
60c716c32c40
[gaim-migrate @ 2362]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1780
diff
changeset
|
42 |
1428 | 43 typedef struct _GtkIMHtml GtkIMHtml; |
44 typedef struct _GtkIMHtmlClass GtkIMHtmlClass; | |
45 | |
46 struct _GtkIMHtml { | |
3922 | 47 GtkTextView text_view; |
48 GtkTextBuffer *text_buffer; | |
49 GtkTextMark *end; | |
50 gboolean comments, smileys; | |
1428 | 51 GdkCursor *hand_cursor; |
52 GdkCursor *arrow_cursor; | |
4032 | 53 GHashTable *smiley_data; |
54 GtkSmileyTree *default_smilies; | |
4254 | 55 |
56 gboolean show_smileys; | |
57 gboolean show_comments; | |
1428 | 58 }; |
59 | |
60 struct _GtkIMHtmlClass { | |
3922 | 61 GtkTextViewClass parent_class; |
1428 | 62 |
63 void (*url_clicked) (GtkIMHtml *, const gchar *); | |
64 }; | |
65 | |
4263 | 66 struct _GtkIMHtmlSmiley { |
67 gchar *smile; | |
68 gchar *file; | |
69 GdkPixbuf *icon; | |
70 gboolean hidden; | |
71 }; | |
72 | |
1428 | 73 typedef enum |
74 { | |
75 GTK_IMHTML_NO_COLOURS = 1 << 0, | |
76 GTK_IMHTML_NO_FONTS = 1 << 1, | |
77 GTK_IMHTML_NO_COMMENTS = 1 << 2, | |
78 GTK_IMHTML_NO_TITLE = 1 << 3, | |
79 GTK_IMHTML_NO_NEWLINE = 1 << 4, | |
80 GTK_IMHTML_NO_SIZES = 1 << 5, | |
81 GTK_IMHTML_NO_SCROLL = 1 << 6, | |
82 GTK_IMHTML_RETURN_LOG = 1 << 7 | |
83 } GtkIMHtmlOptions; | |
84 | |
85 GtkType gtk_imhtml_get_type (void); | |
3922 | 86 GtkWidget* gtk_imhtml_new (void *, void *); |
1428 | 87 |
88 void gtk_imhtml_set_adjustments (GtkIMHtml *imhtml, | |
89 GtkAdjustment *hadj, | |
90 GtkAdjustment *vadj); | |
91 | |
92 void gtk_imhtml_associate_smiley (GtkIMHtml *imhtml, | |
4032 | 93 gchar *sml, |
4263 | 94 GtkIMHtmlSmiley *smiley); |
1428 | 95 |
2728
16df889d81e2
[gaim-migrate @ 2741]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2363
diff
changeset
|
96 void gtk_imhtml_remove_smileys (GtkIMHtml *imhtml); |
16df889d81e2
[gaim-migrate @ 2741]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2363
diff
changeset
|
97 |
1428 | 98 void gtk_imhtml_show_smileys (GtkIMHtml *imhtml, |
99 gboolean show); | |
100 | |
101 void gtk_imhtml_show_comments (GtkIMHtml *imhtml, | |
102 gboolean show); | |
103 | |
104 GString* gtk_imhtml_append_text (GtkIMHtml *imhtml, | |
105 const gchar *text, | |
2856
b1e300a85678
[gaim-migrate @ 2869]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2728
diff
changeset
|
106 gint len, |
1428 | 107 GtkIMHtmlOptions options); |
108 | |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1574
diff
changeset
|
109 void gtk_imhtml_clear (GtkIMHtml *imhtml); |
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1574
diff
changeset
|
110 |
2363
08c66712364c
[gaim-migrate @ 2376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2349
diff
changeset
|
111 void gtk_imhtml_page_up (GtkIMHtml *imhtml); |
08c66712364c
[gaim-migrate @ 2376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2349
diff
changeset
|
112 |
08c66712364c
[gaim-migrate @ 2376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2349
diff
changeset
|
113 void gtk_imhtml_page_down (GtkIMHtml *imhtml); |
3867 | 114 void gtk_imhtml_to_bottom (GtkIMHtml *imhtml); |
2363
08c66712364c
[gaim-migrate @ 2376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2349
diff
changeset
|
115 |
1428 | 116 #ifdef __cplusplus |
117 } | |
118 #endif | |
119 | |
120 #endif |