Mercurial > pidgin.yaz
comparison src/conversation.c @ 4044:133cf6424c53
[gaim-migrate @ 4252]
Stripped the old proto-specific smiley support out. The new proto-specific
smileys won't be set by the prpl, but by a smiley theme settable from
preferences.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Wed, 04 Dec 2002 05:12:06 +0000 |
parents | a3ec0146c73e |
children | 3ccbdf8e7f8d |
comparison
equal
deleted
inserted
replaced
4043:e25edee01c33 | 4044:133cf6424c53 |
---|---|
77 static void remove_icon(struct conversation *); | 77 static void remove_icon(struct conversation *); |
78 | 78 |
79 static void update_checkbox(struct conversation *); | 79 static void update_checkbox(struct conversation *); |
80 static void remove_checkbox(struct conversation *); | 80 static void remove_checkbox(struct conversation *); |
81 | 81 |
82 static void update_smilies(struct conversation *c); | |
83 | 82 |
84 | 83 |
85 /*------------------------------------------------------------------------*/ | 84 /*------------------------------------------------------------------------*/ |
86 /* Helpers */ | 85 /* Helpers */ |
87 /*------------------------------------------------------------------------*/ | 86 /*------------------------------------------------------------------------*/ |
252 c->send_history = g_list_append(NULL, NULL); | 251 c->send_history = g_list_append(NULL, NULL); |
253 conversations = g_list_append(conversations, c); | 252 conversations = g_list_append(conversations, c); |
254 show_conv(c); | 253 show_conv(c); |
255 update_icon(c); | 254 update_icon(c); |
256 update_checkbox(c); | 255 update_checkbox(c); |
257 update_smilies(c); | |
258 plugin_event(event_new_conversation, name); | 256 plugin_event(event_new_conversation, name); |
259 /*gtk_imhtml_to_bottom(c->text);*/ | 257 /*gtk_imhtml_to_bottom(c->text);*/ |
260 return c; | 258 return c; |
261 } | 259 } |
262 | 260 |
2380 | 2378 |
2381 update_buttons_by_protocol(cnv); | 2379 update_buttons_by_protocol(cnv); |
2382 | 2380 |
2383 update_icon(cnv); | 2381 update_icon(cnv); |
2384 update_checkbox(cnv); | 2382 update_checkbox(cnv); |
2385 update_smilies(cnv); | |
2386 gaim_setup_imhtml_smileys(cnv->text); | 2383 gaim_setup_imhtml_smileys(cnv->text); |
2387 } | 2384 } |
2388 | 2385 |
2389 int set_dispstyle(int chat) | 2386 int set_dispstyle(int chat) |
2390 { | 2387 { |
2541 set_convo_title(c); | 2538 set_convo_title(c); |
2542 update_buttons_by_protocol(c); | 2539 update_buttons_by_protocol(c); |
2543 | 2540 |
2544 update_icon(c); | 2541 update_icon(c); |
2545 update_checkbox(c); | 2542 update_checkbox(c); |
2546 update_smilies(c); | |
2547 gaim_setup_imhtml_smileys(c->text); | 2543 gaim_setup_imhtml_smileys(c->text); |
2548 } | 2544 } |
2549 | 2545 |
2550 void update_buttons_by_protocol(struct conversation *c) | 2546 void update_buttons_by_protocol(struct conversation *c) |
2551 { | 2547 { |
3616 c->icon_timer = 0; | 3612 c->icon_timer = 0; |
3617 if(c->iter) | 3613 if(c->iter) |
3618 g_object_unref(G_OBJECT(c->iter)); | 3614 g_object_unref(G_OBJECT(c->iter)); |
3619 } | 3615 } |
3620 | 3616 |
3621 void update_smilies(struct conversation *c) | |
3622 { | |
3623 GSList *smilies; | |
3624 | |
3625 if (!c) | |
3626 return; | |
3627 | |
3628 if (!c->gc) | |
3629 return; | |
3630 | |
3631 if (c->gc->prpl->smiley_list) { | |
3632 gtk_imhtml_remove_smileys(GTK_IMHTML(c->text)); | |
3633 smilies = c->gc->prpl->smiley_list(); | |
3634 | |
3635 while (smilies) { | |
3636 struct _prpl_smiley *smile = | |
3637 (struct _prpl_smiley *)smilies->data; | |
3638 | |
3639 //gtk_imhtml_associate_smiley(GTK_IMHTML(c->text), smile->key, smile->xpm); | |
3640 smilies = g_slist_next(smilies); | |
3641 } | |
3642 } else { | |
3643 gtk_imhtml_reset_smileys(GTK_IMHTML(c->text)); | |
3644 } | |
3645 } | |
3646 | |
3647 void update_icon(struct conversation *c) | 3617 void update_icon(struct conversation *c) |
3648 { | 3618 { |
3649 char filename[256]; | 3619 char filename[256]; |
3650 FILE *file; | 3620 FILE *file; |
3651 GError *err = NULL; | 3621 GError *err = NULL; |