Mercurial > pidgin
changeset 6814:782907a6ae65
[gaim-migrate @ 7354]
Added animated smiley support (patch by Ka-Hing Cheung, aka javabsp, aka
he-who-wrote-animated-smiley-support) and added animated MSN 6 smileys.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Fri, 12 Sep 2003 05:31:55 +0000 |
parents | a5d579a4feef |
children | 1c6a4cba84f3 |
files | pixmaps/smileys/default/Makefile.am pixmaps/smileys/default/msn_bat.gif pixmaps/smileys/default/msn_bat.png pixmaps/smileys/default/msn_cake.gif pixmaps/smileys/default/msn_cake.png pixmaps/smileys/default/msn_cry.gif pixmaps/smileys/default/msn_cry.png pixmaps/smileys/default/msn_dontknow.gif pixmaps/smileys/default/msn_eyeroll.gif pixmaps/smileys/default/msn_eyeroll.png pixmaps/smileys/default/msn_lightning.gif pixmaps/smileys/default/msn_lightning.png pixmaps/smileys/default/msn_party.gif pixmaps/smileys/default/msn_party.png pixmaps/smileys/default/msn_sleepy.gif pixmaps/smileys/default/msn_sleepy.png pixmaps/smileys/default/msn_think.gif pixmaps/smileys/default/msn_think.png pixmaps/smileys/default/msn_wink.gif pixmaps/smileys/default/msn_wink.png pixmaps/smileys/default/theme src/gtkimhtml.c src/gtkimhtml.h |
diffstat | 23 files changed, 33 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/pixmaps/smileys/default/Makefile.am Fri Sep 12 05:26:20 2003 +0000 +++ b/pixmaps/smileys/default/Makefile.am Fri Sep 12 05:31:55 2003 +0000 @@ -27,12 +27,12 @@ msn_angel.png \ msn_angry.png \ msn_away.png \ - msn_bat.png \ + msn_bat.gif \ msn_beer.png \ msn_bowl.png \ msn_boy.png \ msn_brheart.png \ - msn_cake.png \ + msn_cake.gif \ msn_car.png \ msn_cat.png \ msn_cellphone.png \ @@ -40,15 +40,16 @@ msn_coffee.png \ msn_coins.png \ msn_computer.png \ - msn_cry.png \ + msn_cry.gif \ msn_deadflower.png \ msn_devil.png \ msn_dog.png \ + msn_dontknow.gif \ msn_donttell.png \ msn_drink.png \ msn_email.png \ msn_embarrassed.png \ - msn_eyeroll.png \ + msn_eyeroll.gif \ msn_film.png \ msn_flower.png \ msn_gift.png \ @@ -61,14 +62,14 @@ msn_island.png \ msn_kiss.png \ msn_laugh.png \ - msn_lightning.png \ + msn_lightning.gif \ msn_nerd.png \ msn_neutral.png \ msn_note.png \ msn_occ.png \ msn_online.png \ msn_ooooh.png \ - msn_party.png \ + msn_party.gif \ msn_phone.png \ msn_photo.png \ msn_pizza.png \ @@ -84,7 +85,7 @@ msn_sheep.png \ msn_sick.png \ msn_sleep.png \ - msn_sleepy.png \ + msn_sleepy.gif \ msn_smiley.png \ msn_snail.png \ msn_soccer.png \ @@ -93,13 +94,13 @@ msn_sun.png \ msn_sunglasses.png \ msn_teeth.png \ - msn_think.png \ + msn_think.gif \ msn_thumbdown.png \ msn_thumbup.png \ msn_tongue.png \ msn_umbrella.png \ msn_weird.png \ - msn_wink.png + msn_wink.gif YAHOO_SMILEYS = \ yahoo_alien.gif \
--- a/pixmaps/smileys/default/theme Fri Sep 12 05:26:20 2003 +0000 +++ b/pixmaps/smileys/default/theme Fri Sep 12 05:31:55 2003 +0000 @@ -30,12 +30,12 @@ [MSN] msn_angel.png (a) (A) msn_angry.png :-@ :@ -msn_bat.png :-[ :[ +msn_bat.gif :-[ :[ msn_beer.png (B) (b) msn_bowl.png (||) msn_boy.png (Z) (z) msn_brheart.png (U) (u) -msn_cake.png (^) +msn_cake.gif (^) msn_car.png (car) msn_cat.png (@) msn_cellphone.png (mp) @@ -43,15 +43,16 @@ msn_coffee.png (C) (c) msn_coins.png (mo) msn_computer.png (co) -msn_cry.png :'( :`( +msn_cry.gif :'( :`( msn_deadflower.png (W) (w) msn_devil.png (6) msn_dog.png (&) +msn_dontknow.gif :^) msn_donttell.png :-# msn_drink.png (D) (d) msn_email.png (e) (E) msn_embarrassed.png :$ :-$ -msn_eyeroll.png 8-) +msn_eyeroll.gif 8-) msn_film.png (~) msn_flower.png (F) (f) msn_gift.png (g) (G) @@ -64,12 +65,12 @@ msn_island.png (ip) msn_kiss.png (K) (k) msn_laugh.png :-D :-d :d :D :-> :> -msn_lightning.png (li) +msn_lightning.gif (li) msn_nerd.png 8-| msn_neutral.png :-| :| msn_note.png (8) msn_ooooh.png :-O :O :-o :o -msn_party.png <:o) <:O) +msn_party.gif <:o) <:O) msn_phone.png (T) (t) msn_photo.png (P) (p) msn_pizza.png (pi) @@ -85,7 +86,7 @@ msn_sheep.png (bah) msn_sick.png +o( +O( msn_sleep.png (S) (s) -msn_sleepy.png |-) +msn_sleepy.gif |-) msn_smiley.png :-) :) msn_snail.png (sn) msn_soccer.png (so) @@ -93,13 +94,13 @@ msn_stormy.png (st) msn_sun.png (#) msn_teeth.png 8o| 8O| -msn_think.png *-) +msn_think.gif *-) msn_thumbdown.png (N) (n) msn_thumbup.png (Y) (y) msn_tongue.png :-P :P :-p :p msn_umbrella.png (um) msn_weird.png :-S :-s :s :S -msn_wink.png ;) ;-) :S- +msn_wink.gif ;) ;-) :S- [Yahoo] yahoo_angel.gif o:) o:-) O:-) O:) 0:-)
--- a/src/gtkimhtml.c Fri Sep 12 05:26:20 2003 +0000 +++ b/src/gtkimhtml.c Fri Sep 12 05:31:55 2003 +0000 @@ -660,7 +660,7 @@ return (*len > 0); } -GdkPixbuf* +GdkPixbufAnimation * gtk_smiley_tree_image (GtkIMHtml *imhtml, const gchar *sml, const gchar *text) @@ -693,7 +693,7 @@ } if (!t->image->icon) - t->image->icon = gdk_pixbuf_new_from_file(t->image->file, NULL); + t->image->icon = gdk_pixbuf_animation_new_from_file(t->image->file, NULL); return t->image->icon; } @@ -1372,6 +1372,9 @@ c++; pos++; } else if (imhtml->show_smileys && (gtk_imhtml_is_smiley (imhtml, fonts, c, &smilelen) || gtk_imhtml_is_smiley(imhtml, NULL, c, &smilelen))) { + GtkTextChildAnchor *anchor; + GtkWidget *icon; + GdkPixbufAnimation *pixbuf; GtkIMHtmlFontDetail *fd; gchar *sml = NULL; if (fonts) { @@ -1380,7 +1383,13 @@ } NEW_BIT (NEW_TEXT_BIT); wpos = g_snprintf (ws, smilelen + 1, "%s", c); - gtk_text_buffer_insert_pixbuf(imhtml->text_buffer, &iter, gtk_smiley_tree_image (imhtml, sml, ws)); + anchor = gtk_text_buffer_create_child_anchor(imhtml->text_buffer, &iter); + pixbuf = gtk_smiley_tree_image(imhtml, sml, ws); + icon = gtk_image_new_from_animation(pixbuf); + g_object_unref(pixbuf); + gtk_widget_show(icon); + gtk_text_view_add_child_at_anchor(GTK_TEXT_VIEW(imhtml), icon, anchor); + c += smilelen; pos += smilelen; wpos = 0; @@ -1747,6 +1756,5 @@ void gtk_imhtml_hr_free(GtkIMHtmlScalable *scale) { -/* gtk_widget_destroy(((GtkIMHtmlHr *)scale)->sep); */ g_free(scale); }