Mercurial > pidgin.yaz
changeset 24105:bc10a2129be4
propagate from branch 'im.pidgin.pidgin' (head 3ffe6fd197f037185a0012875ef68c8f6d6c2f89)
to branch 'im.pidgin.xmpp.custom_smiley' (head 5499bab119f9e44a61835cf4f024c1ea6828ff7c)
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Tue, 16 Sep 2008 20:01:24 +0000 |
parents | 5395b18f9f08 (current diff) 60c23887a665 (diff) |
children | 89bed0c03194 |
files | pidgin/artwork/art-tools/clean-svg-definitions.sh pidgin/artwork/art-tools/render-pidgin-emotes.rb pidgin/artwork/hicolor/16x16/actions/pidgin-change-bgcolor.png pidgin/artwork/hicolor/16x16/actions/pidgin-change-fgcolor.png pidgin/artwork/hicolor/16x16/actions/pidgin-drag-down.png pidgin/artwork/hicolor/16x16/actions/pidgin-drag-left.png pidgin/artwork/hicolor/16x16/actions/pidgin-drag-right.png pidgin/artwork/hicolor/16x16/actions/pidgin-drag-up.png pidgin/artwork/hicolor/16x16/actions/pidgin-emote-select.png pidgin/artwork/hicolor/16x16/actions/pidgin-font-face.png pidgin/artwork/hicolor/16x16/actions/pidgin-font-size-down.png pidgin/artwork/hicolor/16x16/actions/pidgin-font-size-up.png pidgin/artwork/hicolor/16x16/actions/pidgin-get-attention.png pidgin/artwork/hicolor/16x16/actions/pidgin-insert-image.png pidgin/artwork/hicolor/16x16/actions/pidgin-insert-link.png pidgin/artwork/hicolor/16x16/actions/pidgin-insert.png pidgin/artwork/hicolor/16x16/actions/pidgin-message-new.png pidgin/artwork/hicolor/16x16/actions/pidgin-send-file.png pidgin/artwork/hicolor/16x16/actions/pidgin-unblock.png pidgin/artwork/hicolor/16x16/actions/pidgin-view-plugins.png pidgin/artwork/hicolor/16x16/actions/pidgin-view-transfers.png pidgin/artwork/hicolor/16x16/animations/process-working0.png pidgin/artwork/hicolor/16x16/animations/process-working1.png pidgin/artwork/hicolor/16x16/animations/process-working10.png pidgin/artwork/hicolor/16x16/animations/process-working11.png pidgin/artwork/hicolor/16x16/animations/process-working12.png pidgin/artwork/hicolor/16x16/animations/process-working13.png pidgin/artwork/hicolor/16x16/animations/process-working14.png pidgin/artwork/hicolor/16x16/animations/process-working15.png pidgin/artwork/hicolor/16x16/animations/process-working16.png pidgin/artwork/hicolor/16x16/animations/process-working17.png pidgin/artwork/hicolor/16x16/animations/process-working18.png pidgin/artwork/hicolor/16x16/animations/process-working19.png pidgin/artwork/hicolor/16x16/animations/process-working2.png pidgin/artwork/hicolor/16x16/animations/process-working20.png pidgin/artwork/hicolor/16x16/animations/process-working21.png pidgin/artwork/hicolor/16x16/animations/process-working22.png pidgin/artwork/hicolor/16x16/animations/process-working23.png pidgin/artwork/hicolor/16x16/animations/process-working24.png pidgin/artwork/hicolor/16x16/animations/process-working25.png pidgin/artwork/hicolor/16x16/animations/process-working26.png pidgin/artwork/hicolor/16x16/animations/process-working27.png pidgin/artwork/hicolor/16x16/animations/process-working28.png pidgin/artwork/hicolor/16x16/animations/process-working29.png pidgin/artwork/hicolor/16x16/animations/process-working3.png pidgin/artwork/hicolor/16x16/animations/process-working30.png pidgin/artwork/hicolor/16x16/animations/process-working4.png pidgin/artwork/hicolor/16x16/animations/process-working5.png pidgin/artwork/hicolor/16x16/animations/process-working6.png pidgin/artwork/hicolor/16x16/animations/process-working7.png pidgin/artwork/hicolor/16x16/animations/process-working8.png pidgin/artwork/hicolor/16x16/animations/process-working9.png pidgin/artwork/hicolor/16x16/animations/typing0.png pidgin/artwork/hicolor/16x16/animations/typing1.png pidgin/artwork/hicolor/16x16/animations/typing2.png pidgin/artwork/hicolor/16x16/animations/typing3.png pidgin/artwork/hicolor/16x16/animations/typing4.png pidgin/artwork/hicolor/16x16/animations/typing5.png pidgin/artwork/hicolor/16x16/apps/pidgin-aim.png pidgin/artwork/hicolor/16x16/apps/pidgin-bonjour.png pidgin/artwork/hicolor/16x16/apps/pidgin-facebook.png pidgin/artwork/hicolor/16x16/apps/pidgin-gadu-gadu.png pidgin/artwork/hicolor/16x16/apps/pidgin-google-talk.png pidgin/artwork/hicolor/16x16/apps/pidgin-icq.png pidgin/artwork/hicolor/16x16/apps/pidgin-irc.png pidgin/artwork/hicolor/16x16/apps/pidgin-jabber.png pidgin/artwork/hicolor/16x16/apps/pidgin-meanwhile.png pidgin/artwork/hicolor/16x16/apps/pidgin-msn.png pidgin/artwork/hicolor/16x16/apps/pidgin-myspace.png pidgin/artwork/hicolor/16x16/apps/pidgin-novell.png pidgin/artwork/hicolor/16x16/apps/pidgin-qq.png pidgin/artwork/hicolor/16x16/apps/pidgin-silc.png pidgin/artwork/hicolor/16x16/apps/pidgin-simple.png pidgin/artwork/hicolor/16x16/apps/pidgin-yahoo.png pidgin/artwork/hicolor/16x16/apps/pidgin-zephyr.png pidgin/artwork/hicolor/16x16/apps/pidgin.png pidgin/artwork/hicolor/16x16/devices/pidgin-hiptop.png pidgin/artwork/hicolor/16x16/devices/pidgin-mobile.png pidgin/artwork/hicolor/16x16/emblems/pidgin-aol-client.png pidgin/artwork/hicolor/16x16/emblems/pidgin-birthday.png pidgin/artwork/hicolor/16x16/emblems/pidgin-blocked.png pidgin/artwork/hicolor/16x16/emblems/pidgin-bot.png pidgin/artwork/hicolor/16x16/emblems/pidgin-external.png pidgin/artwork/hicolor/16x16/emblems/pidgin-female.png pidgin/artwork/hicolor/16x16/emblems/pidgin-founder.png pidgin/artwork/hicolor/16x16/emblems/pidgin-free-for-chat.png pidgin/artwork/hicolor/16x16/emblems/pidgin-game.png pidgin/artwork/hicolor/16x16/emblems/pidgin-half-operator.png pidgin/artwork/hicolor/16x16/emblems/pidgin-male.png pidgin/artwork/hicolor/16x16/emblems/pidgin-music.png pidgin/artwork/hicolor/16x16/emblems/pidgin-not-authorized.png pidgin/artwork/hicolor/16x16/emblems/pidgin-operator.png pidgin/artwork/hicolor/16x16/emblems/pidgin-qq-member.png pidgin/artwork/hicolor/16x16/emblems/pidgin-secure.png pidgin/artwork/hicolor/16x16/emblems/pidgin-unavailable.png pidgin/artwork/hicolor/16x16/emblems/pidgin-video.png pidgin/artwork/hicolor/16x16/emblems/pidgin-voice.png pidgin/artwork/hicolor/16x16/status/pidgin-available.png pidgin/artwork/hicolor/16x16/status/pidgin-away.png pidgin/artwork/hicolor/16x16/status/pidgin-busy.png pidgin/artwork/hicolor/16x16/status/pidgin-chatroom.png pidgin/artwork/hicolor/16x16/status/pidgin-contact.png pidgin/artwork/hicolor/16x16/status/pidgin-dialog-auth.png pidgin/artwork/hicolor/16x16/status/pidgin-dialog-error.png pidgin/artwork/hicolor/16x16/status/pidgin-dialog-info.png pidgin/artwork/hicolor/16x16/status/pidgin-dialog-mail.png pidgin/artwork/hicolor/16x16/status/pidgin-dialog-question.png pidgin/artwork/hicolor/16x16/status/pidgin-extended-away.png pidgin/artwork/hicolor/16x16/status/pidgin-invisible.png pidgin/artwork/hicolor/16x16/status/pidgin-offline.png pidgin/artwork/hicolor/16x16/status/pidgin-tray-available.png pidgin/artwork/hicolor/16x16/status/pidgin-tray-away.png pidgin/artwork/hicolor/16x16/status/pidgin-tray-busy.png pidgin/artwork/hicolor/16x16/status/pidgin-tray-extended-away.png pidgin/artwork/hicolor/16x16/status/pidgin-tray-invisible.png pidgin/artwork/hicolor/16x16/status/pidgin-tray-message-pending.png pidgin/artwork/hicolor/16x16/status/pidgin-tray-new-im.png pidgin/artwork/hicolor/16x16/status/pidgin-tray-offline.png pidgin/artwork/hicolor/22x22/apps/pidgin.png pidgin/artwork/hicolor/22x22/status/pidgin-available.png pidgin/artwork/hicolor/22x22/status/pidgin-away.png pidgin/artwork/hicolor/22x22/status/pidgin-busy.png pidgin/artwork/hicolor/22x22/status/pidgin-chatroom.png pidgin/artwork/hicolor/22x22/status/pidgin-contact.png pidgin/artwork/hicolor/22x22/status/pidgin-extended-away.png pidgin/artwork/hicolor/22x22/status/pidgin-invisible.png pidgin/artwork/hicolor/22x22/status/pidgin-offline.png pidgin/artwork/hicolor/22x22/status/pidgin-tray-available.png pidgin/artwork/hicolor/22x22/status/pidgin-tray-away.png pidgin/artwork/hicolor/22x22/status/pidgin-tray-busy.png pidgin/artwork/hicolor/22x22/status/pidgin-tray-extended-away.png pidgin/artwork/hicolor/22x22/status/pidgin-tray-invisible.png pidgin/artwork/hicolor/22x22/status/pidgin-tray-message-pending.png pidgin/artwork/hicolor/22x22/status/pidgin-tray-new-im.png pidgin/artwork/hicolor/22x22/status/pidgin-tray-offline.png pidgin/artwork/hicolor/24x24/apps/pidgin-aim.png pidgin/artwork/hicolor/24x24/apps/pidgin-bonjour.png pidgin/artwork/hicolor/24x24/apps/pidgin-facebook.png pidgin/artwork/hicolor/24x24/apps/pidgin-gadu-gadu.png pidgin/artwork/hicolor/24x24/apps/pidgin-google-talk.png pidgin/artwork/hicolor/24x24/apps/pidgin-icq.png pidgin/artwork/hicolor/24x24/apps/pidgin-irc.png pidgin/artwork/hicolor/24x24/apps/pidgin-jabber.png pidgin/artwork/hicolor/24x24/apps/pidgin-meanwhile.png pidgin/artwork/hicolor/24x24/apps/pidgin-msn.png pidgin/artwork/hicolor/24x24/apps/pidgin-myspace.png pidgin/artwork/hicolor/24x24/apps/pidgin-novell.png pidgin/artwork/hicolor/24x24/apps/pidgin-qq.png pidgin/artwork/hicolor/24x24/apps/pidgin-silc.png pidgin/artwork/hicolor/24x24/apps/pidgin-simple.png pidgin/artwork/hicolor/24x24/apps/pidgin-yahoo.png pidgin/artwork/hicolor/24x24/apps/pidgin-zephyr.png pidgin/artwork/hicolor/24x24/apps/pidgin.png pidgin/artwork/hicolor/24x24/emotes/Makefile.am pidgin/artwork/hicolor/24x24/emotes/Makefile.mingw pidgin/artwork/hicolor/24x24/emotes/default.theme.in pidgin/artwork/hicolor/24x24/emotes/none/Makefile.am pidgin/artwork/hicolor/24x24/emotes/none/Makefile.mingw pidgin/artwork/hicolor/24x24/emotes/none/none.theme.in pidgin/artwork/hicolor/24x24/emotes/none/theme pidgin/artwork/hicolor/24x24/emotes/pidgin-act-up.png pidgin/artwork/hicolor/24x24/emotes/pidgin-airplane.png pidgin/artwork/hicolor/24x24/emotes/pidgin-alien.png pidgin/artwork/hicolor/24x24/emotes/pidgin-angel.png pidgin/artwork/hicolor/24x24/emotes/pidgin-angry.png pidgin/artwork/hicolor/24x24/emotes/pidgin-arrogant.png pidgin/artwork/hicolor/24x24/emotes/pidgin-at-wits-end.png pidgin/artwork/hicolor/24x24/emotes/pidgin-bad.png pidgin/artwork/hicolor/24x24/emotes/pidgin-bashful.png pidgin/artwork/hicolor/24x24/emotes/pidgin-beat-up.png pidgin/artwork/hicolor/24x24/emotes/pidgin-beauty.png pidgin/artwork/hicolor/24x24/emotes/pidgin-beer.png pidgin/artwork/hicolor/24x24/emotes/pidgin-blowkiss.png pidgin/artwork/hicolor/24x24/emotes/pidgin-bomb.png pidgin/artwork/hicolor/24x24/emotes/pidgin-bowl.png pidgin/artwork/hicolor/24x24/emotes/pidgin-boy.png pidgin/artwork/hicolor/24x24/emotes/pidgin-brb.png pidgin/artwork/hicolor/24x24/emotes/pidgin-bulgy-eyes.png pidgin/artwork/hicolor/24x24/emotes/pidgin-bunny.png pidgin/artwork/hicolor/24x24/emotes/pidgin-bye.png pidgin/artwork/hicolor/24x24/emotes/pidgin-cake.png pidgin/artwork/hicolor/24x24/emotes/pidgin-call-me.png pidgin/artwork/hicolor/24x24/emotes/pidgin-camera.png pidgin/artwork/hicolor/24x24/emotes/pidgin-can.png pidgin/artwork/hicolor/24x24/emotes/pidgin-car.png pidgin/artwork/hicolor/24x24/emotes/pidgin-cat.png pidgin/artwork/hicolor/24x24/emotes/pidgin-chicken.png pidgin/artwork/hicolor/24x24/emotes/pidgin-cigarette.png pidgin/artwork/hicolor/24x24/emotes/pidgin-clap.png pidgin/artwork/hicolor/24x24/emotes/pidgin-clock.png pidgin/artwork/hicolor/24x24/emotes/pidgin-cloudy.png pidgin/artwork/hicolor/24x24/emotes/pidgin-clover.png pidgin/artwork/hicolor/24x24/emotes/pidgin-clown.png pidgin/artwork/hicolor/24x24/emotes/pidgin-coffee.png pidgin/artwork/hicolor/24x24/emotes/pidgin-coins.png pidgin/artwork/hicolor/24x24/emotes/pidgin-computer.png pidgin/artwork/hicolor/24x24/emotes/pidgin-confused.png pidgin/artwork/hicolor/24x24/emotes/pidgin-console.png pidgin/artwork/hicolor/24x24/emotes/pidgin-cow.png pidgin/artwork/hicolor/24x24/emotes/pidgin-cowboy.png pidgin/artwork/hicolor/24x24/emotes/pidgin-crying.png pidgin/artwork/hicolor/24x24/emotes/pidgin-curl-lip.png pidgin/artwork/hicolor/24x24/emotes/pidgin-curse.png pidgin/artwork/hicolor/24x24/emotes/pidgin-cute.png pidgin/artwork/hicolor/24x24/emotes/pidgin-cyclops.png pidgin/artwork/hicolor/24x24/emotes/pidgin-dance.png pidgin/artwork/hicolor/24x24/emotes/pidgin-dazed.png pidgin/artwork/hicolor/24x24/emotes/pidgin-desire.png pidgin/artwork/hicolor/24x24/emotes/pidgin-devil.png pidgin/artwork/hicolor/24x24/emotes/pidgin-disappointed.png pidgin/artwork/hicolor/24x24/emotes/pidgin-disdain.png pidgin/artwork/hicolor/24x24/emotes/pidgin-doctor.png pidgin/artwork/hicolor/24x24/emotes/pidgin-dog.png pidgin/artwork/hicolor/24x24/emotes/pidgin-doh.png pidgin/artwork/hicolor/24x24/emotes/pidgin-dont-know.png pidgin/artwork/hicolor/24x24/emotes/pidgin-drink.png pidgin/artwork/hicolor/24x24/emotes/pidgin-drool.png pidgin/artwork/hicolor/24x24/emotes/pidgin-eat.png pidgin/artwork/hicolor/24x24/emotes/pidgin-embarrassed.png pidgin/artwork/hicolor/24x24/emotes/pidgin-excruciating.png pidgin/artwork/hicolor/24x24/emotes/pidgin-eyeroll.png pidgin/artwork/hicolor/24x24/emotes/pidgin-female-fighter.png pidgin/artwork/hicolor/24x24/emotes/pidgin-film.png pidgin/artwork/hicolor/24x24/emotes/pidgin-fingers-crossed.png pidgin/artwork/hicolor/24x24/emotes/pidgin-flag.png pidgin/artwork/hicolor/24x24/emotes/pidgin-foot-in-mouth.png pidgin/artwork/hicolor/24x24/emotes/pidgin-freaked-out.png pidgin/artwork/hicolor/24x24/emotes/pidgin-ghost.png pidgin/artwork/hicolor/24x24/emotes/pidgin-giggle.png pidgin/artwork/hicolor/24x24/emotes/pidgin-girl.png pidgin/artwork/hicolor/24x24/emotes/pidgin-glasses-cool.png pidgin/artwork/hicolor/24x24/emotes/pidgin-glasses-nerdy.png pidgin/artwork/hicolor/24x24/emotes/pidgin-go-away.png pidgin/artwork/hicolor/24x24/emotes/pidgin-goat.png pidgin/artwork/hicolor/24x24/emotes/pidgin-good.png pidgin/artwork/hicolor/24x24/emotes/pidgin-hammer.png pidgin/artwork/hicolor/24x24/emotes/pidgin-handcuffs.png pidgin/artwork/hicolor/24x24/emotes/pidgin-handshake.png pidgin/artwork/hicolor/24x24/emotes/pidgin-highfive.png pidgin/artwork/hicolor/24x24/emotes/pidgin-hug-left.png pidgin/artwork/hicolor/24x24/emotes/pidgin-hug-right.png pidgin/artwork/hicolor/24x24/emotes/pidgin-hypnotized.png pidgin/artwork/hicolor/24x24/emotes/pidgin-in-love.png pidgin/artwork/hicolor/24x24/emotes/pidgin-island.png pidgin/artwork/hicolor/24x24/emotes/pidgin-jump.png pidgin/artwork/hicolor/24x24/emotes/pidgin-kiss.png pidgin/artwork/hicolor/24x24/emotes/pidgin-kissed.png pidgin/artwork/hicolor/24x24/emotes/pidgin-kissing.png pidgin/artwork/hicolor/24x24/emotes/pidgin-knife.png pidgin/artwork/hicolor/24x24/emotes/pidgin-lamp.png pidgin/artwork/hicolor/24x24/emotes/pidgin-lashes.png pidgin/artwork/hicolor/24x24/emotes/pidgin-laugh.png pidgin/artwork/hicolor/24x24/emotes/pidgin-liquor.png pidgin/artwork/hicolor/24x24/emotes/pidgin-loser.png pidgin/artwork/hicolor/24x24/emotes/pidgin-love-over.png pidgin/artwork/hicolor/24x24/emotes/pidgin-love.png pidgin/artwork/hicolor/24x24/emotes/pidgin-lying.png pidgin/artwork/hicolor/24x24/emotes/pidgin-mad-tongue.png pidgin/artwork/hicolor/24x24/emotes/pidgin-mail.png pidgin/artwork/hicolor/24x24/emotes/pidgin-male-fighter1.png pidgin/artwork/hicolor/24x24/emotes/pidgin-male-fighter2.png pidgin/artwork/hicolor/24x24/emotes/pidgin-mean.png pidgin/artwork/hicolor/24x24/emotes/pidgin-meeting.png pidgin/artwork/hicolor/24x24/emotes/pidgin-messed.png pidgin/artwork/hicolor/24x24/emotes/pidgin-mobile.png pidgin/artwork/hicolor/24x24/emotes/pidgin-mohawk.png pidgin/artwork/hicolor/24x24/emotes/pidgin-moneymouth.png pidgin/artwork/hicolor/24x24/emotes/pidgin-monkey.png pidgin/artwork/hicolor/24x24/emotes/pidgin-moon.png pidgin/artwork/hicolor/24x24/emotes/pidgin-msn-away.png pidgin/artwork/hicolor/24x24/emotes/pidgin-msn-busy.png pidgin/artwork/hicolor/24x24/emotes/pidgin-msn.png pidgin/artwork/hicolor/24x24/emotes/pidgin-msn_online.png pidgin/artwork/hicolor/24x24/emotes/pidgin-music.png pidgin/artwork/hicolor/24x24/emotes/pidgin-musical-note.png pidgin/artwork/hicolor/24x24/emotes/pidgin-nailbiting.png pidgin/artwork/hicolor/24x24/emotes/pidgin-neutral.png pidgin/artwork/hicolor/24x24/emotes/pidgin-on-the-phone.png pidgin/artwork/hicolor/24x24/emotes/pidgin-party.png pidgin/artwork/hicolor/24x24/emotes/pidgin-peace.png pidgin/artwork/hicolor/24x24/emotes/pidgin-phone.png pidgin/artwork/hicolor/24x24/emotes/pidgin-pig.png pidgin/artwork/hicolor/24x24/emotes/pidgin-pill.png pidgin/artwork/hicolor/24x24/emotes/pidgin-pirate.png pidgin/artwork/hicolor/24x24/emotes/pidgin-pissed-off.png pidgin/artwork/hicolor/24x24/emotes/pidgin-pizza.png pidgin/artwork/hicolor/24x24/emotes/pidgin-plate.png pidgin/artwork/hicolor/24x24/emotes/pidgin-poop.png pidgin/artwork/hicolor/24x24/emotes/pidgin-pray.png pidgin/artwork/hicolor/24x24/emotes/pidgin-present.png pidgin/artwork/hicolor/24x24/emotes/pidgin-pumpkin.png pidgin/artwork/hicolor/24x24/emotes/pidgin-qq.png pidgin/artwork/hicolor/24x24/emotes/pidgin-question.png pidgin/artwork/hicolor/24x24/emotes/pidgin-quiet.png pidgin/artwork/hicolor/24x24/emotes/pidgin-rain.png pidgin/artwork/hicolor/24x24/emotes/pidgin-rainbow.png pidgin/artwork/hicolor/24x24/emotes/pidgin-rose-dead.png pidgin/artwork/hicolor/24x24/emotes/pidgin-rose.png pidgin/artwork/hicolor/24x24/emotes/pidgin-rotfl.png pidgin/artwork/hicolor/24x24/emotes/pidgin-sad.png pidgin/artwork/hicolor/24x24/emotes/pidgin-sarcastic.png pidgin/artwork/hicolor/24x24/emotes/pidgin-search.png pidgin/artwork/hicolor/24x24/emotes/pidgin-secret.png pidgin/artwork/hicolor/24x24/emotes/pidgin-shame.png pidgin/artwork/hicolor/24x24/emotes/pidgin-sheep.png pidgin/artwork/hicolor/24x24/emotes/pidgin-shock.png pidgin/artwork/hicolor/24x24/emotes/pidgin-shout.png pidgin/artwork/hicolor/24x24/emotes/pidgin-shut-mouth.png pidgin/artwork/hicolor/24x24/emotes/pidgin-sick.png pidgin/artwork/hicolor/24x24/emotes/pidgin-sidefrown.png pidgin/artwork/hicolor/24x24/emotes/pidgin-silly.png pidgin/artwork/hicolor/24x24/emotes/pidgin-sinister.png pidgin/artwork/hicolor/24x24/emotes/pidgin-skeleton.png pidgin/artwork/hicolor/24x24/emotes/pidgin-skywalker.png pidgin/artwork/hicolor/24x24/emotes/pidgin-sleepy.png pidgin/artwork/hicolor/24x24/emotes/pidgin-smile-big.png pidgin/artwork/hicolor/24x24/emotes/pidgin-smile.png pidgin/artwork/hicolor/24x24/emotes/pidgin-smirk.png pidgin/artwork/hicolor/24x24/emotes/pidgin-snail.png pidgin/artwork/hicolor/24x24/emotes/pidgin-snicker.png pidgin/artwork/hicolor/24x24/emotes/pidgin-snowman.png pidgin/artwork/hicolor/24x24/emotes/pidgin-soccerball.png pidgin/artwork/hicolor/24x24/emotes/pidgin-soldier.png pidgin/artwork/hicolor/24x24/emotes/pidgin-star.png pidgin/artwork/hicolor/24x24/emotes/pidgin-starving.png pidgin/artwork/hicolor/24x24/emotes/pidgin-stop.png pidgin/artwork/hicolor/24x24/emotes/pidgin-struggle.png pidgin/artwork/hicolor/24x24/emotes/pidgin-sun.png pidgin/artwork/hicolor/24x24/emotes/pidgin-sweat.png pidgin/artwork/hicolor/24x24/emotes/pidgin-talktohand.png pidgin/artwork/hicolor/24x24/emotes/pidgin-teeth.png pidgin/artwork/hicolor/24x24/emotes/pidgin-terror.png pidgin/artwork/hicolor/24x24/emotes/pidgin-thinking.png pidgin/artwork/hicolor/24x24/emotes/pidgin-thunder.png pidgin/artwork/hicolor/24x24/emotes/pidgin-time-out.png pidgin/artwork/hicolor/24x24/emotes/pidgin-tongue.png pidgin/artwork/hicolor/24x24/emotes/pidgin-tremble.png pidgin/artwork/hicolor/24x24/emotes/pidgin-turtle.png pidgin/artwork/hicolor/24x24/emotes/pidgin-tv.png pidgin/artwork/hicolor/24x24/emotes/pidgin-umbrella.png pidgin/artwork/hicolor/24x24/emotes/pidgin-vampire.png pidgin/artwork/hicolor/24x24/emotes/pidgin-victory.png pidgin/artwork/hicolor/24x24/emotes/pidgin-waiting.png pidgin/artwork/hicolor/24x24/emotes/pidgin-watermelon.png pidgin/artwork/hicolor/24x24/emotes/pidgin-waving.png pidgin/artwork/hicolor/24x24/emotes/pidgin-weep.png pidgin/artwork/hicolor/24x24/emotes/pidgin-wilt.png pidgin/artwork/hicolor/24x24/emotes/pidgin-wink.png pidgin/artwork/hicolor/24x24/emotes/pidgin-worship.png pidgin/artwork/hicolor/24x24/emotes/pidgin-yawn.png pidgin/artwork/hicolor/24x24/emotes/pidgin-yin-yang.png pidgin/artwork/hicolor/24x24/emotes/theme pidgin/artwork/hicolor/24x24/status/pidgin-available.png pidgin/artwork/hicolor/24x24/status/pidgin-away.png pidgin/artwork/hicolor/24x24/status/pidgin-busy.png pidgin/artwork/hicolor/24x24/status/pidgin-chatroom.png pidgin/artwork/hicolor/24x24/status/pidgin-contact.png pidgin/artwork/hicolor/24x24/status/pidgin-extended-away.png pidgin/artwork/hicolor/24x24/status/pidgin-invisible.png pidgin/artwork/hicolor/24x24/status/pidgin-offline.png pidgin/artwork/hicolor/24x24/status/pidgin-tray-available.png pidgin/artwork/hicolor/24x24/status/pidgin-tray-away.png pidgin/artwork/hicolor/24x24/status/pidgin-tray-busy.png pidgin/artwork/hicolor/24x24/status/pidgin-tray-extended-away.png pidgin/artwork/hicolor/24x24/status/pidgin-tray-invisible.png pidgin/artwork/hicolor/24x24/status/pidgin-tray-message-pending.png pidgin/artwork/hicolor/24x24/status/pidgin-tray-new-im.png pidgin/artwork/hicolor/24x24/status/pidgin-tray-offline.png pidgin/artwork/hicolor/32x32/actions/pidgin-select-avatar.png pidgin/artwork/hicolor/32x32/apps/pidgin.png pidgin/artwork/hicolor/32x32/status/pidgin-available.png pidgin/artwork/hicolor/32x32/status/pidgin-away.png pidgin/artwork/hicolor/32x32/status/pidgin-busy.png pidgin/artwork/hicolor/32x32/status/pidgin-extended-away.png pidgin/artwork/hicolor/32x32/status/pidgin-invisible.png pidgin/artwork/hicolor/32x32/status/pidgin-offline.png pidgin/artwork/hicolor/32x32/status/pidgin-tray-available.png pidgin/artwork/hicolor/32x32/status/pidgin-tray-away.png pidgin/artwork/hicolor/32x32/status/pidgin-tray-busy.png pidgin/artwork/hicolor/32x32/status/pidgin-tray-extended-away.png pidgin/artwork/hicolor/32x32/status/pidgin-tray-invisible.png pidgin/artwork/hicolor/32x32/status/pidgin-tray-message-pending.png pidgin/artwork/hicolor/32x32/status/pidgin-tray-new-im.png pidgin/artwork/hicolor/32x32/status/pidgin-tray-offline.png pidgin/artwork/hicolor/48x48/apps/pidgin-aim.png pidgin/artwork/hicolor/48x48/apps/pidgin-bonjour.png pidgin/artwork/hicolor/48x48/apps/pidgin-facebook.png pidgin/artwork/hicolor/48x48/apps/pidgin-gadu-gadu.png pidgin/artwork/hicolor/48x48/apps/pidgin-icq.png pidgin/artwork/hicolor/48x48/apps/pidgin-irc.png pidgin/artwork/hicolor/48x48/apps/pidgin-jabber.png pidgin/artwork/hicolor/48x48/apps/pidgin-meanwhile.png pidgin/artwork/hicolor/48x48/apps/pidgin-msn.png pidgin/artwork/hicolor/48x48/apps/pidgin-myspace.png pidgin/artwork/hicolor/48x48/apps/pidgin-novell.png pidgin/artwork/hicolor/48x48/apps/pidgin-qq.png pidgin/artwork/hicolor/48x48/apps/pidgin-silc.png pidgin/artwork/hicolor/48x48/apps/pidgin-simple.png pidgin/artwork/hicolor/48x48/apps/pidgin-yahoo.png pidgin/artwork/hicolor/48x48/apps/pidgin-zephyr.png pidgin/artwork/hicolor/48x48/apps/pidgin.png pidgin/artwork/hicolor/48x48/status/pidgin-available.png pidgin/artwork/hicolor/48x48/status/pidgin-away.png pidgin/artwork/hicolor/48x48/status/pidgin-busy.png pidgin/artwork/hicolor/48x48/status/pidgin-dialog-auth.png pidgin/artwork/hicolor/48x48/status/pidgin-dialog-cool.png pidgin/artwork/hicolor/48x48/status/pidgin-dialog-dialog.png pidgin/artwork/hicolor/48x48/status/pidgin-dialog-error.png pidgin/artwork/hicolor/48x48/status/pidgin-dialog-info.png pidgin/artwork/hicolor/48x48/status/pidgin-dialog-mail.png pidgin/artwork/hicolor/48x48/status/pidgin-extended-away.png pidgin/artwork/hicolor/48x48/status/pidgin-invisible.png pidgin/artwork/hicolor/48x48/status/pidgin-offline.png pidgin/artwork/hicolor/48x48/status/pidgin-tray-available.png pidgin/artwork/hicolor/48x48/status/pidgin-tray-away.png pidgin/artwork/hicolor/48x48/status/pidgin-tray-busy.png pidgin/artwork/hicolor/48x48/status/pidgin-tray-extended-away.png pidgin/artwork/hicolor/48x48/status/pidgin-tray-invisible.png pidgin/artwork/hicolor/48x48/status/pidgin-tray-message-pending.png pidgin/artwork/hicolor/48x48/status/pidgin-tray-new-im.png pidgin/artwork/hicolor/48x48/status/pidgin-tray-offline.png pidgin/artwork/hicolor/48x48/status/question.png pidgin/artwork/hicolor/48x48/status/warning.png pidgin/artwork/hicolor/scalable/apps/pidgin.svg pidgin/artwork/hicolor/scalable/status/pidgin-auth.svg pidgin/artwork/hicolor/scalable/status/pidgin-cool.svg pidgin/artwork/hicolor/scalable/status/pidgin-dialog.svg pidgin/artwork/hicolor/scalable/status/pidgin-error.svg pidgin/artwork/hicolor/scalable/status/pidgin-info.svg pidgin/artwork/hicolor/scalable/status/pidgin-mail.svg pidgin/artwork/hicolor/scalable/status/pidgin-question.svg pidgin/artwork/hicolor/scalable/status/pidgin-warning.svg pidgin/artwork/pixmaps/logo.png pidgin/artwork/pixmaps/pidgin.ico |
diffstat | 13 files changed, 895 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/Makefile.am Tue Sep 16 17:56:01 2008 +0000 +++ b/libpurple/protocols/jabber/Makefile.am Tue Sep 16 20:01:24 2008 +0000 @@ -11,6 +11,8 @@ buddy.h \ chat.c \ chat.h \ + data.c \ + data.h \ disco.c \ disco.h \ google.c \
--- a/libpurple/protocols/jabber/Makefile.mingw Tue Sep 16 17:56:01 2008 +0000 +++ b/libpurple/protocols/jabber/Makefile.mingw Tue Sep 16 20:01:24 2008 +0000 @@ -48,6 +48,7 @@ buddy.c \ caps.c \ chat.c \ + data.c \ disco.c \ google.c \ iq.c \
--- a/libpurple/protocols/jabber/buddy.c Tue Sep 16 17:56:01 2008 +0000 +++ b/libpurple/protocols/jabber/buddy.c Tue Sep 16 20:01:24 2008 +0000 @@ -2498,5 +2498,38 @@ js); } +gboolean +jabber_resource_has_capability(const JabberBuddyResource *jbr, const gchar *cap) +{ + const GList *iter = NULL; + if (!jbr->caps) { + purple_debug_error("jabber", + "Unable to find caps: nothing known about buddy\n"); + return FALSE; + } + for (iter = jbr->caps->features ; iter ; iter = g_list_next(iter)) { + purple_debug_info("jabber", "Found cap: %s\n", (char *)iter->data); + if (strcmp(iter->data, cap) == 0) { + return TRUE; + } + } + + return FALSE; +} + +gboolean +jabber_buddy_has_capability(const JabberBuddy *jb, const gchar *cap) +{ + JabberBuddyResource *jbr = jabber_buddy_find_resource((JabberBuddy*)jb, NULL); + + if (!jbr) { + purple_debug_error("jabber", + "Unable to find caps: buddy might be offline\n"); + return FALSE; + } + + return jabber_resource_has_capability(jbr, cap); +} +
--- a/libpurple/protocols/jabber/buddy.h Tue Sep 16 17:56:01 2008 +0000 +++ b/libpurple/protocols/jabber/buddy.h Tue Sep 16 20:01:24 2008 +0000 @@ -117,4 +117,8 @@ void jabber_vcard_fetch_mine(JabberStream *js); +gboolean jabber_resource_has_capability(const JabberBuddyResource *jbr, + const gchar *cap); +gboolean jabber_buddy_has_capability(const JabberBuddy *jb, const gchar *cap); + #endif /* _PURPLE_JABBER_BUDDY_H_ */
--- a/libpurple/protocols/jabber/chat.c Tue Sep 16 17:56:01 2008 +0000 +++ b/libpurple/protocols/jabber/chat.c Tue Sep 16 20:01:24 2008 +0000 @@ -31,6 +31,7 @@ #include "message.h" #include "presence.h" #include "xdata.h" +#include "data.h" GList *jabber_chat_info(PurpleConnection *gc) { @@ -684,6 +685,7 @@ xmlnode_insert_data(status, msg, -1); } jabber_send(chat->js, presence); + xmlnode_free(presence); g_free(room_jid); }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libpurple/protocols/jabber/data.c Tue Sep 16 20:01:24 2008 +0000 @@ -0,0 +1,246 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA + */ + +#include <stdlib.h> +#include <glib.h> +#include <string.h> + +#include "internal.h" +#include "data.h" +#include "debug.h" +#include "xmlnode.h" +#include "util.h" +#include "iq.h" + +static GHashTable *local_data_by_alt = NULL; +static GHashTable *local_data_by_cid = NULL; +static GHashTable *remote_data_by_cid = NULL; + +JabberData * +jabber_data_create_from_data(gconstpointer rawdata, gsize size, const char *type, + JabberStream *js) +{ + JabberData *data = g_new0(JabberData, 1); + gchar *checksum = purple_util_get_image_checksum(rawdata, size); + gchar cid[256]; + + g_snprintf(cid, sizeof(cid), "sha1+%s@bob.xmpp.org", checksum); + g_free(checksum); + + data->cid = g_strdup(cid); + data->type = g_strdup(type); + data->size = size; + + data->data = g_memdup(rawdata, size); + + return data; +} + +JabberData * +jabber_data_create_from_xml(xmlnode *tag) +{ + JabberData *data = g_new0(JabberData, 1); + gsize size; + gpointer raw_data = NULL; + + if (data == NULL) { + purple_debug_error("jabber", "Could not allocate data object\n"); + g_free(data); + return NULL; + } + + /* check if this is a "data" tag */ + if (strcmp(tag->name, "data") != 0) { + purple_debug_error("jabber", "Invalid data element"); + g_free(data); + return NULL; + } + + data->cid = g_strdup(xmlnode_get_attrib(tag, "cid")); + data->type = g_strdup(xmlnode_get_attrib(tag, "type")); + + raw_data = xmlnode_get_data(tag); + data->data = purple_base64_decode(raw_data, &size); + data->size = size; + + g_free(raw_data); + + return data; +} + + +void +jabber_data_delete(JabberData *data) +{ + g_free(data->cid); + g_free(data->type); + g_free(data->data); + g_free(data); +} + +const char * +jabber_data_get_cid(const JabberData *data) +{ + return data->cid; +} + + +const char * +jabber_data_get_type(const JabberData *data) +{ + return data->type; +} + +gsize +jabber_data_get_size(const JabberData *data) +{ + return data->size; +} + +gpointer +jabber_data_get_data(const JabberData *data) +{ + return data->data; +} + +xmlnode * +jabber_data_get_xml_definition(const JabberData *data) +{ + xmlnode *tag = xmlnode_new("data"); + char *base64data = purple_base64_encode(data->data, data->size); + + xmlnode_set_namespace(tag, XEP_0231_NAMESPACE); + xmlnode_set_attrib(tag, "cid", data->cid); + xmlnode_set_attrib(tag, "type", data->type); + + xmlnode_insert_data(tag, base64data, -1); + + g_free(base64data); + + return tag; +} + +xmlnode * +jabber_data_get_xhtml_im(const JabberData *data, const gchar *alt) +{ + xmlnode *img = xmlnode_new("img"); + char src[128]; + + xmlnode_set_attrib(img, "alt", alt); + g_snprintf(src, sizeof(src), "cid:%s", data->cid); + xmlnode_set_attrib(img, "src", src); + + return img; +} + +xmlnode * +jabber_data_get_xml_request(const gchar *cid) +{ + xmlnode *tag = xmlnode_new("data"); + + xmlnode_set_namespace(tag, XEP_0231_NAMESPACE); + xmlnode_set_attrib(tag, "cid", cid); + + return tag; +} + +const JabberData * +jabber_data_find_local_by_alt(const gchar *alt) +{ + purple_debug_info("jabber", "looking up local smiley with alt = %s\n", alt); + return g_hash_table_lookup(local_data_by_alt, alt); +} + +const JabberData * +jabber_data_find_local_by_cid(const gchar *cid) +{ + purple_debug_info("jabber", "lookup local smiley with cid = %s\n", cid); + return g_hash_table_lookup(local_data_by_cid, cid); +} + +const JabberData * +jabber_data_find_remote_by_cid(const gchar *cid) +{ + purple_debug_info("jabber", "lookup remote smiley with cid = %s\n", cid); + + return g_hash_table_lookup(remote_data_by_cid, cid); +} + +void +jabber_data_associate_local(JabberData *data, const gchar *alt) +{ + purple_debug_info("jabber", "associating local smiley\n alt = %s, cid = %s\n", + alt, jabber_data_get_cid(data)); + g_hash_table_insert(local_data_by_alt, g_strdup(alt), data); + g_hash_table_insert(local_data_by_cid, g_strdup(jabber_data_get_cid(data)), + data); +} + +void +jabber_data_associate_remote(JabberData *data) +{ + purple_debug_info("jabber", "associating remote smiley, cid = %s\n", + jabber_data_get_cid(data)); + g_hash_table_insert(remote_data_by_cid, g_strdup(jabber_data_get_cid(data)), + data); +} + +void +jabber_data_parse(JabberStream *js, xmlnode *packet) +{ + JabberIq *result = NULL; + const char *who = xmlnode_get_attrib(packet, "from"); + xmlnode *data_node = xmlnode_get_child(packet, "data"); + const JabberData *data = + jabber_data_find_local_by_cid(xmlnode_get_attrib(data_node, "cid")); + + if (!data) { + xmlnode *item_not_found = xmlnode_new("item-not-found"); + + result = jabber_iq_new(js, JABBER_IQ_ERROR); + xmlnode_set_attrib(result->node, "to", who); + xmlnode_set_attrib(result->node, "id", xmlnode_get_attrib(packet, "id")); + xmlnode_insert_child(result->node, item_not_found); + } else { + result = jabber_iq_new(js, JABBER_IQ_RESULT); + xmlnode_set_attrib(result->node, "to", who); + xmlnode_set_attrib(result->node, "id", xmlnode_get_attrib(packet, "id")); + xmlnode_insert_child(result->node, + jabber_data_get_xml_definition(data)); + } + jabber_iq_send(result); +} + +void +jabber_data_init(void) +{ + purple_debug_info("jabber", "creating hash tables for data objects\n"); + local_data_by_alt = g_hash_table_new_full(g_str_hash, g_str_equal, + g_free, NULL); + local_data_by_cid = g_hash_table_new_full(g_str_hash, g_str_equal, + g_free, jabber_data_delete); + remote_data_by_cid = g_hash_table_new_full(g_str_hash, g_str_equal, + g_free, jabber_data_delete); +} + +void +jabber_data_uninit(void) +{ + purple_debug_info("jabber", "destroying hash tables for data objects\n"); + g_hash_table_destroy(local_data_by_alt); + g_hash_table_destroy(local_data_by_cid); + g_hash_table_destroy(remote_data_by_cid); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libpurple/protocols/jabber/data.h Tue Sep 16 20:01:24 2008 +0000 @@ -0,0 +1,75 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA + */ + +#ifndef JABBER_DATA_H +#define JABBER_DATA_H + +#include "xmlnode.h" +#include "jabber.h" + +#define XEP_0231_NAMESPACE "urn:xmpp:bob" + +#include <glib.h> + +typedef struct { + char *cid; + char *type; + gsize size; + gpointer data; +} JabberData; + +/* creates a JabberData instance from raw data */ +JabberData *jabber_data_create_from_data(gconstpointer data, gsize size, + const char *type, JabberStream *js); + +/* create a JabberData instance from an XML "data" element (as defined by + XEP 0231 */ +JabberData *jabber_data_create_from_xml(xmlnode *tag); + +void jabber_data_delete(JabberData *data); + +const char *jabber_data_get_cid(const JabberData *data); +const char *jabber_data_get_type(const JabberData *data); + +gsize jabber_data_get_size(const JabberData *data); +gpointer jabber_data_get_data(const JabberData *data); + +/* returns the XML definition for the data element */ +xmlnode *jabber_data_get_xml_definition(const JabberData *data); + +/* returns an XHTML-IM "img" tag given a data instance */ +xmlnode *jabber_data_get_xhtml_im(const JabberData *data, const gchar *alt); + +/* returns a data request element (to be included in an iq stanza) for requesting + data */ +xmlnode *jabber_data_get_xml_request(const gchar *cid); + +/* lookup functions */ +const JabberData *jabber_data_find_local_by_alt(const gchar *alt); +const JabberData *jabber_data_find_local_by_cid(const gchar *cid); +const JabberData *jabber_data_find_remote_by_cid(const gchar *cid); + +/* store data objects */ +void jabber_data_associate_local(JabberData *data, const gchar *alt); +void jabber_data_associate_remote(JabberData *data); + +/* handles iq requests */ +void jabber_data_parse(JabberStream *js, xmlnode *packet); + +void jabber_data_init(void); +void jabber_data_uninit(void); + +#endif /* JABBER_DATA_H */
--- a/libpurple/protocols/jabber/iq.c Tue Sep 16 17:56:01 2008 +0000 +++ b/libpurple/protocols/jabber/iq.c Tue Sep 16 20:01:24 2008 +0000 @@ -33,6 +33,7 @@ #include "si.h" #include "ping.h" #include "adhoccommands.h" +#include "data.h" #ifdef _WIN32 #include "utsname.h" @@ -355,6 +356,11 @@ return; } + if (xmlnode_get_child_with_namespace(packet, "data", XEP_0231_NAMESPACE)) { + jabber_data_parse(js, packet); + return; + } + /* If we get here, send the default error reply mandated by XMPP-CORE */ if(type && (!strcmp(type, "set") || !strcmp(type, "get"))) { JabberIq *iq = jabber_iq_new(js, JABBER_IQ_ERROR);
--- a/libpurple/protocols/jabber/jabber.c Tue Sep 16 17:56:01 2008 +0000 +++ b/libpurple/protocols/jabber/jabber.c Tue Sep 16 20:01:24 2008 +0000 @@ -42,6 +42,7 @@ #include "auth.h" #include "buddy.h" #include "chat.h" +#include "data.h" #include "disco.h" #include "google.h" #include "iq.h" @@ -57,6 +58,7 @@ #include "pep.h" #include "adhoccommands.h" + #define JABBER_CONNECT_STEPS (js->gsc ? 9 : 5) static PurplePlugin *my_protocol = NULL; @@ -640,7 +642,8 @@ JabberStream *js; JabberBuddy *my_jb = NULL; - gc->flags |= PURPLE_CONNECTION_HTML; + gc->flags |= PURPLE_CONNECTION_HTML | + PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY; js = gc->proto_data = g_new0(JabberStream, 1); js->gc = gc; js->fd = -1; @@ -1899,7 +1902,7 @@ JabberID *jid; JabberBuddy *jb; JabberBuddyResource *jbr; - + if(!(jid = jabber_id_new(who))) return;
--- a/libpurple/protocols/jabber/libxmpp.c Tue Sep 16 17:56:01 2008 +0000 +++ b/libpurple/protocols/jabber/libxmpp.c Tue Sep 16 20:01:24 2008 +0000 @@ -43,6 +43,7 @@ #include "pep.h" #include "usertune.h" #include "caps.h" +#include "data.h" static PurplePluginProtocolInfo prpl_info = { @@ -136,8 +137,7 @@ purple_marshal_VOID__POINTER_POINTER, NULL, 2, purple_value_new(PURPLE_TYPE_SUBTYPE, PURPLE_SUBTYPE_CONNECTION), purple_value_new_outgoing(PURPLE_TYPE_STRING)); - - + return TRUE; } @@ -149,6 +149,8 @@ purple_signal_unregister(plugin, "jabber-sending-text"); + jabber_data_uninit(); + return TRUE; } @@ -241,6 +243,13 @@ prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); + /* this should probably be part of global smiley theme settings later on, + shared with MSN */ + option = purple_account_option_bool_new(_("Show Custom Smileys"), + "custom_smileys", TRUE); + prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, + option); + jabber_init_plugin(plugin); purple_prefs_remove("/plugins/prpl/jabber"); @@ -269,11 +278,16 @@ jabber_tune_init(); jabber_caps_init(); - + + jabber_data_init(); + jabber_add_feature("avatarmeta", AVATARNAMESPACEMETA, jabber_pep_namespace_only_when_pep_enabled_cb); jabber_add_feature("avatardata", AVATARNAMESPACEDATA, jabber_pep_namespace_only_when_pep_enabled_cb); - jabber_add_feature("buzz", "http://www.xmpp.org/extensions/xep-0224.html#ns", jabber_buzz_isenabled); - + jabber_add_feature("buzz", "http://www.xmpp.org/extensions/xep-0224.html#ns", + jabber_buzz_isenabled); + jabber_add_feature("bob", XEP_0231_NAMESPACE, + jabber_custom_smileys_isenabled); + jabber_pep_register_handler("avatar", AVATARNAMESPACEMETA, jabber_buddy_avatar_update_metadata); }
--- a/libpurple/protocols/jabber/message.c Tue Sep 16 17:56:01 2008 +0000 +++ b/libpurple/protocols/jabber/message.c Tue Sep 16 20:01:24 2008 +0000 @@ -24,13 +24,17 @@ #include "notify.h" #include "server.h" #include "util.h" - #include "buddy.h" #include "chat.h" +#include "data.h" #include "google.h" #include "message.h" #include "xmlnode.h" #include "pep.h" +#include "smiley.h" +#include "iq.h" + +#include <string.h> void jabber_message_free(JabberMessage *jm) { @@ -312,6 +316,225 @@ g_free(str); } +/* used internally by the functions below */ +typedef struct { + gchar *cid; + gchar *alt; +} JabberSmileyRef; + + +static void +jabber_message_get_refs_from_xmlnode_internal(const xmlnode *message, + GHashTable *table) +{ + xmlnode *child; + + for (child = xmlnode_get_child(message, "img") ; child ; + child = xmlnode_get_next_twin(child)) { + const gchar *src = xmlnode_get_attrib(child, "src"); + + if (g_str_has_prefix(src, "cid:")) { + const gchar *cid = src + 4; + + /* if we haven't "fetched" this yet... */ + if (!g_hash_table_lookup(table, cid)) { + /* take a copy of the cid and let the SmileyRef own it... */ + gchar *temp_cid = g_strdup(cid); + JabberSmileyRef *ref = g_new0(JabberSmileyRef, 1); + const gchar *alt = xmlnode_get_attrib(child, "alt"); + ref->cid = temp_cid; + /* if there is no "alt" string, use the cid... + include the entire src, eg. "cid:.." to avoid linkification */ + if (alt && alt[0] != '\0') { + /* workaround for when "alt" is set to the value of the + CID (which Jabbim seems to do), to avoid it showing up + as an mailto: link */ + if (purple_email_is_valid(alt)) { + ref->alt = g_strdup_printf("smiley:%s", alt); + } else { + ref->alt = g_strdup(alt); + } + } else { + ref->alt = g_strdup(src); + } + g_hash_table_insert(table, temp_cid, ref); + } + } + } + + for (child = message->child ; child ; child = child->next) { + jabber_message_get_refs_from_xmlnode_internal(child, table); + } +} + +static gboolean +jabber_message_get_refs_steal(gpointer key, gpointer value, gpointer user_data) +{ + GList **refs = (GList **) user_data; + JabberSmileyRef *ref = (JabberSmileyRef *) value; + + *refs = g_list_append(*refs, ref); + + return TRUE; +} + +static GList * +jabber_message_get_refs_from_xmlnode(const xmlnode *message) +{ + GList *refs = NULL; + GHashTable *unique_refs = g_hash_table_new(g_str_hash, g_str_equal); + + jabber_message_get_refs_from_xmlnode_internal(message, unique_refs); + (void) g_hash_table_foreach_steal(unique_refs, + jabber_message_get_refs_steal, (gpointer) &refs); + g_hash_table_destroy(unique_refs); + return refs; +} + +static gchar * +jabber_message_xml_to_string_strip_img_smileys(xmlnode *xhtml) +{ + const gchar *markup = xmlnode_to_str(xhtml, NULL); + int len = strlen(markup); + int pos = 0; + GString *out = g_string_new(NULL); + + while (pos < len) { + /* this is a bit cludgy, maybe there is a better way to do this... + we need to find all <img> tags within the XHTML and replace those + tags with the value of their "alt" attributes */ + if (g_str_has_prefix(&(markup[pos]), "<img")) { + xmlnode *img = NULL; + int pos2 = pos; + const gchar *src; + + for (; pos2 < len ; pos2++) { + if (g_str_has_prefix(&(markup[pos2]), "/>")) { + pos2 += 2; + break; + } else if (g_str_has_prefix(&(markup[pos2]), "</img>")) { + pos2 += 5; + break; + } + } + + /* note, if the above loop didn't find the end of the <img> tag, + it the parsed string will be until the end of the input string, + in which case xmlnode_from_str will bail out and return NULL, + in this case the "if" statement below doesn't trigger and the + text is copied unchanged */ + img = xmlnode_from_str(&(markup[pos]), pos2 - pos); + src = xmlnode_get_attrib(img, "src"); + + if (g_str_has_prefix(src, "cid:")) { + const gchar *alt = xmlnode_get_attrib(img, "alt"); + gchar *escaped = NULL; + /* if the "alt" attribute is empty, put the cid as smiley string */ + if (alt && alt[0] != '\0') { + /* if the "alt" is the same as the CID, as Jabbim does, + this prevents linkification... */ + if (purple_email_is_valid(alt)) { + const gchar *safe_alt = g_strdup_printf("smiley:%s", alt); + out = g_string_append(out, safe_alt); + g_free(safe_alt); + } else { + out = g_string_append(out, alt); + } + } else { + out = g_string_append(out, src); + } + pos += pos2 - pos; + } else { + out = g_string_append_c(out, markup[pos]); + pos++; + } + + xmlnode_free(img); + + } else { + out = g_string_append_c(out, markup[pos]); + pos++; + } + } + + return g_string_free(out, FALSE); +} + +static void +jabber_message_add_remote_smileys(const xmlnode *message) +{ + xmlnode *data_tag; + for (data_tag = xmlnode_get_child_with_namespace(message, "data", XEP_0231_NAMESPACE) ; + data_tag ; + data_tag = xmlnode_get_next_twin(data_tag)) { + const gchar *cid = xmlnode_get_attrib(data_tag, "cid"); + const JabberData *data = jabber_data_find_remote_by_cid(cid); + + if (!data && cid != NULL) { + /* we haven't cached this already, let's add it */ + JabberData *new_data = jabber_data_create_from_xml(data_tag); + jabber_data_associate_remote(new_data); + } + } +} + +/* used in the function below to supply a conversation and shortcut for a + smiley */ +typedef struct { + PurpleConversation *conv; + const gchar *alt; +} JabberDataRef; + +static void +jabber_message_get_data_cb(JabberStream *js, xmlnode *packet, gpointer data) +{ + JabberDataRef *ref = (JabberDataRef *) data; + PurpleConversation *conv = ref->conv; + const gchar *alt = ref->alt; + xmlnode *data_element = xmlnode_get_child(packet, "data"); + xmlnode *item_not_found = xmlnode_get_child(packet, "item-not-found"); + + /* did we get a data element as result? */ + if (data_element) { + JabberData *data = jabber_data_create_from_xml(data_element); + + if (data) { + jabber_data_associate_remote(data); + purple_conv_custom_smiley_write(conv, alt, + jabber_data_get_data(data), + jabber_data_get_size(data)); + purple_conv_custom_smiley_close(conv, alt); + } + + } else if (item_not_found) { + purple_debug_info("jabber", + "Responder didn't recognize requested data\n"); + } else { + purple_debug_error("jabber", "Unknown response to data request\n"); + } + + g_free(ref); +} + +static void +jabber_message_send_data_request(JabberStream *js, PurpleConversation *conv, + const gchar *cid, const gchar *who, + const gchar *alt) +{ + JabberIq *request = jabber_iq_new(js, JABBER_IQ_GET); + JabberDataRef *ref = g_new0(JabberDataRef, 1); + xmlnode *data_request = jabber_data_get_xml_request(cid); + + xmlnode_set_attrib(request->node, "to", who); + ref->conv = conv; + ref->alt = alt; + jabber_iq_set_callback(request, jabber_message_get_data_cb, ref); + xmlnode_insert_child(request->node, data_request); + + jabber_iq_send(request); +} + + void jabber_message_parse(JabberStream *js, xmlnode *packet) { JabberMessage *jm; @@ -368,14 +591,104 @@ } else if(!strcmp(child->name, "html") && !strcmp(xmlns,"http://jabber.org/protocol/xhtml-im")) { if(!jm->xhtml && xmlnode_get_child(child, "body")) { char *c; - jm->xhtml = xmlnode_to_str(child, NULL); - /* Convert all newlines to whitespace. Technically, even regular, non-XML HTML is supposed to ignore newlines, but Pidgin has, as convention - * treated \n as a newline for compatibility with other protocols + + const PurpleConnection *gc = js->gc; + const gchar *who = xmlnode_get_attrib(packet, "from"); + PurpleAccount *account = purple_connection_get_account(gc); + PurpleConversation *conv = NULL; + const GList *smiley_refs = NULL; + gchar *reformatted_xhtml; + + if (purple_account_get_bool(account, "custom_smileys", TRUE)) { + /* find a list of smileys ("cid" and "alt" text pairs) + occuring in the message */ + smiley_refs = jabber_message_get_refs_from_xmlnode(child); + purple_debug_info("jabber", "found %d smileys\n", + g_list_length(smiley_refs)); + + if (jm->type == JABBER_MESSAGE_GROUPCHAT) { + JabberID *jid = jabber_id_new(jm->from); + JabberChat *chat = NULL; + + if (jid) { + chat = jabber_chat_find(js, jid->node, jid->domain); + conv = chat->conv; + } + + jabber_id_free(jid); + } else { + conv = + purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, + who, account); + if (!conv) { + /* we need to create the conversation here */ + conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, + account, who); + } + } + + /* process any newly provided smileys */ + jabber_message_add_remote_smileys(packet); + } + + /* reformat xhtml so that img tags with a "cid:" src gets + translated to the bare text of the emoticon (the "alt" attrib) */ + /* this is done also when custom smiley retrieval is turned off, + this way the receiver always sees the shortcut instead */ + reformatted_xhtml = + jabber_message_xml_to_string_strip_img_smileys(child); + + jm->xhtml = reformatted_xhtml; + + /* add known custom emoticons to the conversation */ + /* note: if there were no smileys in the incoming message, or + if receiving custom smileys is turned off, smiley_refs will + be NULL */ + for (; smiley_refs ; smiley_refs = g_list_next(smiley_refs)) { + const JabberSmileyRef *ref = + (JabberSmileyRef *) smiley_refs->data; + const gchar *cid = ref->cid; + const gchar *alt = ref->alt; + + purple_debug_info("jabber", + "about to add custom smiley %s to the conv\n", alt); + if (purple_conv_custom_smiley_add(conv, alt, "cid", cid, + TRUE)) { + const JabberData *data = + jabber_data_find_remote_by_cid(cid); + /* if data is already known, we add write it immediatly */ + if (data) { + purple_debug_info("jabber", + "data is already known\n"); + purple_conv_custom_smiley_write(conv, alt, + jabber_data_get_data(data), + jabber_data_get_size(data)); + purple_conv_custom_smiley_close(conv, alt); + } else { + /* we need to request the smiley (data) */ + purple_debug_info("jabber", + "data is unknown, need to request it\n"); + jabber_message_send_data_request(js, conv, cid, who, + alt); + } + } + } + + /* Convert all newlines to whitespace. Technically, even regular, non-XML HTML is supposed to ignore newlines, but Pidgin has, as convention + * treated \n as a newline for compatibility with other protocols */ for (c = jm->xhtml; *c != '\0'; c++) { - if (*c == '\n') + if (*c == '\n') *c = ' '; } + + /* we don't need the list of CIDs anymore */ + for (; smiley_refs ; smiley_refs = g_list_next(smiley_refs)) { + JabberSmileyRef *ref = (JabberSmileyRef *) smiley_refs->data; + g_free(ref->cid); + g_free(ref->alt); + g_free(ref); + } } } else if(!strcmp(child->name, "active") && !strcmp(xmlns,"http://jabber.org/protocol/chatstates")) { jm->chat_state = JM_STATE_ACTIVE; @@ -503,6 +816,128 @@ jabber_message_free(jm); } +static const gchar * +jabber_message_get_mimetype_from_ext(const gchar *ext) +{ + if (strcmp(ext, "png") == 0) { + return "image/png"; + } else if (strcmp(ext, "gif") == 0) { + return "image/gif"; + } else if (strcmp(ext, "jpg") == 0) { + return "image/jpeg"; + } else if (strcmp(ext, "tif") == 0) { + return "image/tif"; + } else { + return "image/x-icon"; /* or something... */ + } +} + +static GList * +jabber_message_xhtml_find_smileys(const char *xhtml) +{ + GList *smileys = purple_smileys_get_all(); + GList *found_smileys = NULL; + + for (; smileys ; smileys = g_list_delete_link(smileys, smileys)) { + PurpleSmiley *smiley = (PurpleSmiley *) smileys->data; + const gchar *shortcut = purple_smiley_get_shortcut(smiley); + const gssize len = strlen(shortcut); + + gchar *escaped = g_markup_escape_text(shortcut, len); + const char *pos = strstr(xhtml, escaped); + + if (pos) { + found_smileys = g_list_append(found_smileys, smiley); + } + + g_free(escaped); + } + + return found_smileys; +} + +static gchar * +jabber_message_get_smileyfied_xhtml(const gchar *xhtml, const GList *smileys) +{ + /* create XML element for all smileys (img tags) */ + GString *result = g_string_new(NULL); + int pos = 0; + int length = strlen(xhtml); + + while (pos < length) { + const GList *iterator; + gboolean found_smiley = FALSE; + + for (iterator = smileys ; iterator ; + iterator = g_list_next(iterator)) { + const PurpleSmiley *smiley = (PurpleSmiley *) iterator->data; + const gchar *shortcut = purple_smiley_get_shortcut(smiley); + const gssize len = strlen(shortcut); + gchar *escaped = g_markup_escape_text(shortcut, len); + + if (g_str_has_prefix(&(xhtml[pos]), escaped)) { + /* we found the current smiley at this position */ + const JabberData *data = + jabber_data_find_local_by_alt(shortcut); + xmlnode *img = jabber_data_get_xhtml_im(data, shortcut); + int len; + gchar *img_text = xmlnode_to_str(img, &len); + + found_smiley = TRUE; + result = g_string_append(result, img_text); + g_free(img_text); + pos += strlen(escaped); + g_free(escaped); + break; + } else { + /* cleanup from the before the next round... */ + g_free(escaped); + } + } + if (!found_smiley) { + /* there was no smiley here, just copy one byte */ + result = g_string_append_c(result, xhtml[pos]); + pos++; + } + } + + return g_string_free(result, FALSE); +} + +static gboolean +jabber_conv_support_custom_smileys(const PurpleConnection *gc, + const PurpleConversation *conv, + const gchar *who) +{ + JabberStream *js = (JabberStream *) gc->proto_data; + JabberBuddy *jb; + + if (!js) { + purple_debug_error("jabber", + "jabber_conv_support_custom_smileys: could not find stream\n"); + return FALSE; + } + + jb = jabber_buddy_find(js, who, FALSE); + if (!jb) { + purple_debug_error("jabber", + "jabber_conv_support_custom smileys: could not find buddy\n"); + return FALSE; + } + + + + switch (purple_conversation_get_type(conv)) { + /* for the time being, we will not support custom smileys in MUCs */ + case PURPLE_CONV_TYPE_IM: + return jabber_buddy_has_capability(jb, XEP_0231_NAMESPACE); + break; + default: + return FALSE; + break; + } +} + void jabber_message_send(JabberMessage *jm) { xmlnode *message, *child; @@ -588,7 +1023,55 @@ } if(jm->xhtml) { - child = xmlnode_from_str(jm->xhtml, -1); + PurpleAccount *account = purple_connection_get_account(jm->js->gc); + PurpleConversation *conv = + purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, jm->to, + account); + + if (jabber_conv_support_custom_smileys(jm->js->gc, conv, jm->to)) { + GList *found_smileys = jabber_message_xhtml_find_smileys(jm->xhtml); + + if (found_smileys) { + gchar *smileyfied_xhtml = NULL; + const GList *iterator; + + for (iterator = found_smileys; iterator ; + iterator = g_list_next(iterator)) { + const PurpleSmiley *smiley = + (PurpleSmiley *) iterator->data; + const gchar *shortcut = purple_smiley_get_shortcut(smiley); + const JabberData *data = + jabber_data_find_local_by_alt(shortcut); + + /* the object has not been sent before */ + if (!data) { + PurpleStoredImage *image = + purple_smiley_get_stored_image(smiley); + const gchar *ext = purple_imgstore_get_extension(image); + JabberStream *js = jm->js; + + JabberData *new_data = + jabber_data_create_from_data(purple_imgstore_get_data(image), + purple_imgstore_get_size(image), + jabber_message_get_mimetype_from_ext(ext), js); + purple_debug_info("jabber", + "cache local smiley alt = %s, cid = %s\n", + shortcut, jabber_data_get_cid(new_data)); + jabber_data_associate_local(new_data, shortcut); + } + } + + smileyfied_xhtml = + jabber_message_get_smileyfied_xhtml(jm->xhtml, found_smileys); + child = xmlnode_from_str(smileyfied_xhtml, -1); + g_free(smileyfied_xhtml); + g_list_free(found_smileys); + } else { + child = xmlnode_from_str(jm->xhtml, -1); + } + } else { + child = xmlnode_from_str(jm->xhtml, -1); + } if(child) { xmlnode_insert_child(message, child); } else { @@ -762,3 +1245,11 @@ return js->allowBuzz; } +gboolean jabber_custom_smileys_isenabled(JabberStream *js, const gchar *shortname, + const gchar *namespace) +{ + const PurpleConnection *gc = js->gc; + PurpleAccount *account = purple_connection_get_account(gc); + + return purple_account_get_bool(account, "custom_smileys", TRUE); +}
--- a/libpurple/protocols/jabber/message.h Tue Sep 16 17:56:01 2008 +0000 +++ b/libpurple/protocols/jabber/message.h Tue Sep 16 20:01:24 2008 +0000 @@ -80,4 +80,7 @@ gboolean jabber_buzz_isenabled(JabberStream *js, const gchar *shortname, const gchar *namespace); +gboolean jabber_custom_smileys_isenabled(JabberStream *js, const gchar *shortname, + const gchar *namespace); + #endif /* _PURPLE_JABBER_MESSAGE_H_ */
--- a/pidgin/gtksmiley.c Tue Sep 16 17:56:01 2008 +0000 +++ b/pidgin/gtksmiley.c Tue Sep 16 20:01:24 2008 +0000 @@ -273,8 +273,8 @@ gsize size = 0; gchar *filename; - gdk_pixbuf_save_to_bufferv(s->custom_pixbuf, &buffer, &size, - "png", NULL, NULL, NULL); + gdk_pixbuf_save_to_buffer(s->custom_pixbuf, &buffer, &size, + "png", NULL, "compression", "9", NULL, NULL); filename = purple_util_get_image_filename(buffer, size); s->filename = g_build_filename(purple_smileys_get_storing_dir(), filename, NULL); purple_util_write_data_to_file_absolute(s->filename, buffer, size);