Mercurial > pidgin.yaz
comparison src/conversation.c @ 3035:0f1766887ddd
[gaim-migrate @ 3048]
Maybe this totally sucks, maybe it doesn't. If you like this, please let me know.
If you have geniunely sincere constructive criticism, then approach me in a nic way.
If you think it sucks then you can build yourself a wee little bridge and get the hell on over it.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Wed, 13 Mar 2002 04:06:23 +0000 |
parents | 1143524a2eaf |
children | e68e2ba82310 |
comparison
equal
deleted
inserted
replaced
3034:4f43ccaf4360 | 3035:0f1766887ddd |
---|---|
84 static void remove_icon(struct conversation *); | 84 static void remove_icon(struct conversation *); |
85 | 85 |
86 static void update_checkbox(struct conversation *); | 86 static void update_checkbox(struct conversation *); |
87 static void remove_checkbox(struct conversation *); | 87 static void remove_checkbox(struct conversation *); |
88 | 88 |
89 static void update_smilies(struct conversation *c); | |
90 | |
91 | |
89 /*------------------------------------------------------------------------*/ | 92 /*------------------------------------------------------------------------*/ |
90 /* Helpers */ | 93 /* Helpers */ |
91 /*------------------------------------------------------------------------*/ | 94 /*------------------------------------------------------------------------*/ |
92 | 95 |
93 | 96 |
174 c->gc = (struct gaim_connection *)connections->data; | 177 c->gc = (struct gaim_connection *)connections->data; |
175 c->history = g_string_new(""); | 178 c->history = g_string_new(""); |
176 conversations = g_list_append(conversations, c); | 179 conversations = g_list_append(conversations, c); |
177 show_conv(c); | 180 show_conv(c); |
178 update_icon(c); | 181 update_icon(c); |
182 update_smilies(c); | |
179 update_checkbox(c); | 183 update_checkbox(c); |
180 plugin_event(event_new_conversation, name, 0, 0, 0); | 184 plugin_event(event_new_conversation, name, 0, 0, 0); |
181 return c; | 185 return c; |
182 } | 186 } |
183 | 187 |
931 int err = 0; | 935 int err = 0; |
932 | 936 |
933 if (!c->gc) | 937 if (!c->gc) |
934 return; | 938 return; |
935 | 939 |
940 | |
936 buf2 = gtk_editable_get_chars(GTK_EDITABLE(c->entry), 0, -1); | 941 buf2 = gtk_editable_get_chars(GTK_EDITABLE(c->entry), 0, -1); |
937 limit = 32 * 1024; /* you shouldn't be sending more than 32k in your messages. that's a book. */ | 942 limit = 32 * 1024; /* you shouldn't be sending more than 32k in your messages. that's a book. */ |
938 buf = g_malloc(limit); | 943 buf = g_malloc(limit); |
939 g_snprintf(buf, limit, "%s", buf2); | 944 g_snprintf(buf, limit, "%s", buf2); |
940 g_free(buf2); | 945 g_free(buf2); |
3245 c->icon_timer = 0; | 3250 c->icon_timer = 0; |
3246 c->frame = 0; | 3251 c->frame = 0; |
3247 #endif | 3252 #endif |
3248 } | 3253 } |
3249 | 3254 |
3255 void update_smilies(struct conversation *c) | |
3256 { | |
3257 GSList *smilies; | |
3258 | |
3259 if (c->gc->prpl->smiley_list) { | |
3260 smilies = c->gc->prpl->smiley_list(); | |
3261 | |
3262 while (smilies) { | |
3263 struct _prpl_smiley *smile = | |
3264 (struct _prpl_smiley *)smilies->data; | |
3265 | |
3266 gtk_imhtml_associate_smiley(GTK_IMHTML(c->text), smile->key, smile->xpm); | |
3267 smilies = g_slist_next(smilies); | |
3268 } | |
3269 } | |
3270 } | |
3271 | |
3250 void update_icon(struct conversation *c) | 3272 void update_icon(struct conversation *c) |
3251 { | 3273 { |
3252 #if USE_PIXBUF | 3274 #if USE_PIXBUF |
3253 char filename[256]; | 3275 char filename[256]; |
3254 FILE *file; | 3276 FILE *file; |