# HG changeset patch # User Christian Hammond # Date 1063344715 0 # Node ID 782907a6ae6576a3c32b2d3e8a0ddc5f5eb17106 # Parent a5d579a4feef39f805c7073ad414d2d9017c54ac [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 diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/Makefile.am --- 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 \ diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_bat.gif Binary file pixmaps/smileys/default/msn_bat.gif has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_bat.png Binary file pixmaps/smileys/default/msn_bat.png has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_cake.gif Binary file pixmaps/smileys/default/msn_cake.gif has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_cake.png Binary file pixmaps/smileys/default/msn_cake.png has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_cry.gif Binary file pixmaps/smileys/default/msn_cry.gif has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_cry.png Binary file pixmaps/smileys/default/msn_cry.png has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_dontknow.gif Binary file pixmaps/smileys/default/msn_dontknow.gif has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_eyeroll.gif Binary file pixmaps/smileys/default/msn_eyeroll.gif has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_eyeroll.png Binary file pixmaps/smileys/default/msn_eyeroll.png has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_lightning.gif Binary file pixmaps/smileys/default/msn_lightning.gif has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_lightning.png Binary file pixmaps/smileys/default/msn_lightning.png has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_party.gif Binary file pixmaps/smileys/default/msn_party.gif has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_party.png Binary file pixmaps/smileys/default/msn_party.png has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_sleepy.gif Binary file pixmaps/smileys/default/msn_sleepy.gif has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_sleepy.png Binary file pixmaps/smileys/default/msn_sleepy.png has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_think.gif Binary file pixmaps/smileys/default/msn_think.gif has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_think.png Binary file pixmaps/smileys/default/msn_think.png has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_wink.gif Binary file pixmaps/smileys/default/msn_wink.gif has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/msn_wink.png Binary file pixmaps/smileys/default/msn_wink.png has changed diff -r a5d579a4feef -r 782907a6ae65 pixmaps/smileys/default/theme --- 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:-) diff -r a5d579a4feef -r 782907a6ae65 src/gtkimhtml.c --- 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); } diff -r a5d579a4feef -r 782907a6ae65 src/gtkimhtml.h --- a/src/gtkimhtml.h Fri Sep 12 05:26:20 2003 +0000 +++ b/src/gtkimhtml.h Fri Sep 12 05:31:55 2003 +0000 @@ -91,7 +91,7 @@ struct _GtkIMHtmlSmiley { gchar *smile; gchar *file; - GdkPixbuf *icon; + GdkPixbufAnimation *icon; gboolean hidden; };