comparison src/gtkimhtml.c @ 4264:f1876640e568

[gaim-migrate @ 4515] 9 Penguin Points awarded to Nathan D. Walp. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Thu, 09 Jan 2003 18:19:20 +0000
parents 74f65a3d2a1f
children a723d060620a
comparison
equal deleted inserted replaced
4263:74f65a3d2a1f 4264:f1876640e568
96 96
97 t->image = smiley; 97 t->image = smiley;
98 } 98 }
99 99
100 100
101 gboolean gtk_smiley_tree_destroy (GtkSmileyTree *tree) 101 void gtk_smiley_tree_destroy (GtkSmileyTree *tree)
102 { 102 {
103 /*
104 GSList *list = g_slist_append (NULL, tree); 103 GSList *list = g_slist_append (NULL, tree);
105 104
106 while (list) { 105 while (list) {
107 GtkSmileyTree *t = list->data; 106 GtkSmileyTree *t = list->data;
108 gint i; 107 gint i;
113 g_string_free (t->values, TRUE); 112 g_string_free (t->values, TRUE);
114 g_free (t->children); 113 g_free (t->children);
115 } 114 }
116 g_free (t); 115 g_free (t);
117 } 116 }
118 return TRUE;
119 */
120 } 117 }
121 118
122 119
123 static GtkTextViewClass *parent_class = NULL; 120 static GtkTextViewClass *parent_class = NULL;
124 121
128 URL_CLICKED, 125 URL_CLICKED,
129 LAST_SIGNAL 126 LAST_SIGNAL
130 }; 127 };
131 static guint signals [LAST_SIGNAL] = { 0 }; 128 static guint signals [LAST_SIGNAL] = { 0 };
132 129
130 static gboolean
131 gtk_smiley_tree_destroy_from_hash(gpointer key, gpointer value,
132 gpointer user_data)
133 {
134 gtk_smiley_tree_destroy(value);
135 return TRUE;
136 }
137
133 static void 138 static void
134 gtk_imhtml_finalize (GObject *object) 139 gtk_imhtml_finalize (GObject *object)
135 { 140 {
136 GtkIMHtml *imhtml = GTK_IMHTML(object); 141 GtkIMHtml *imhtml = GTK_IMHTML(object);
137 142 g_hash_table_foreach_remove(imhtml->smiley_data, gtk_smiley_tree_destroy_from_hash, NULL);
138 g_hash_table_foreach_remove(imhtml->smiley_data, (GHRFunc)gtk_smiley_tree_destroy, NULL);
139 g_hash_table_destroy(imhtml->smiley_data); 143 g_hash_table_destroy(imhtml->smiley_data);
140 gtk_smiley_tree_destroy(imhtml->default_smilies); 144 gtk_smiley_tree_destroy(imhtml->default_smilies);
141 gdk_cursor_unref(imhtml->hand_cursor); 145 gdk_cursor_unref(imhtml->hand_cursor);
142 gdk_cursor_unref(imhtml->arrow_cursor); 146 gdk_cursor_unref(imhtml->arrow_cursor);
143 G_OBJECT_CLASS(parent_class)->finalize (object); 147 G_OBJECT_CLASS(parent_class)->finalize (object);