pidgin/pidgin

Remove all of the current Mood API

13 months ago, Gary Kramlich
b0c31c877bde
Parents 853501870190
Children cd96db566218
Remove all of the current Mood API

The functionality of the mood api is being moved into PurplePresence via the
soon to be added Emoji and Message properties. As such we have no need for the
existing API which is why we are removing all of it.

Testing Done:
Ran `ninja pidgin-pot all tests` successfully and verified there were no new warnings.

Reviewed at https://reviews.imfreedom.org/r/2366/
  • +1 -0
    ChangeLog.API
  • +0 -5
    libpurple/connection.h
  • +0 -5
    libpurple/protocols/jabber/disco.c
  • +1 -101
    libpurple/protocols/jabber/jabber.c
  • +0 -2
    libpurple/protocols/jabber/meson.build
  • +0 -2
    libpurple/protocols/jabber/pep.c
  • +0 -11
    libpurple/protocols/jabber/presence.c
  • +2 -2
    libpurple/protocols/jabber/tests/test_jabber_caps.c
  • +0 -226
    libpurple/protocols/jabber/usermood.c
  • +0 -50
    libpurple/protocols/jabber/usermood.h
  • +0 -17
    libpurple/purpleprotocolclient.c
  • +0 -17
    libpurple/purpleprotocolclient.h
  • +0 -44
    libpurple/status.c
  • +0 -36
    libpurple/status.h
  • +0 -2
    pidgin/meson.build
  • +0 -13
    pidgin/pidginapplication.c
  • +0 -1
    pidgin/pidginiconname.c
  • +0 -344
    pidgin/pidginmooddialog.c
  • +0 -61
    pidgin/pidginmooddialog.h
  • +0 -0
    pidgin/pixmaps/emotes/small/16/afraid.png
  • +0 -0
    pidgin/pixmaps/emotes/small/16/bathing.png
  • +0 -0
    pidgin/pixmaps/emotes/small/16/cinema.png
  • +0 -0
    pidgin/pixmaps/emotes/small/16/disappointed.png
  • +0 -0
    pidgin/pixmaps/emotes/small/16/embarrassed.png
  • +0 -0
    pidgin/pixmaps/emotes/small/16/grumpy.png
  • +0 -0
    pidgin/pixmaps/emotes/small/16/hot.png
  • +0 -0
    pidgin/pixmaps/emotes/small/16/internet.png
  • +0 -0
    pidgin/pixmaps/emotes/small/16/invincible.png
  • +1 -24
    pidgin/pixmaps/emotes/small/16/meson.build
  • +0 -0
    pidgin/pixmaps/emotes/small/16/music.png
  • +0 -0
    pidgin/pixmaps/emotes/small/16/restroom.png
  • +0 -0
    pidgin/pixmaps/emotes/small/16/search.png
  • +0 -0
    pidgin/pixmaps/emotes/small/16/shopping.png
  • +0 -0
    pidgin/pixmaps/emotes/small/16/studying.png
  • +0 -0
    pidgin/pixmaps/emotes/small/16/suit.png
  • +0 -0
    pidgin/pixmaps/emotes/small/16/surfing.png
  • +0 -0
    pidgin/pixmaps/emotes/small/16/typing.png
  • +0 -0
    pidgin/pixmaps/emotes/small/16/working.png
  • +0 -0
    pidgin/pixmaps/emotes/small/16/writing.png
  • +0 -1
    pidgin/plugins/unity/unity.c
  • +0 -5
    pidgin/resources/gtk/menus.ui
  • +0 -2
    po/POTFILES.in
  • --- a/ChangeLog.API Mon Mar 20 21:12:08 2023 -0500
    +++ b/ChangeLog.API Mon Mar 20 21:14:42 2023 -0500
    @@ -569,6 +569,7 @@
    purple_mime_part_get_length, purple_mime_part_set_data, and
    purple_mime_decode_field. Use the GMime library, instead.
    * purple_mkstemp
    + * PurpleMood and all related APIs.
    * purple_network_convert_idn_to_ascii. Use g_hostname_to_ascii,
    instead.
    * purple_network_get_all_local_system_ips. Use libnice instead.
    --- a/libpurple/connection.h Mon Mar 20 21:12:08 2023 -0500
    +++ b/libpurple/connection.h Mon Mar 20 21:14:42 2023 -0500
    @@ -60,9 +60,6 @@
    * with links
    * @PURPLE_CONNECTION_FLAG_NO_IMAGES: Connection does not support sending of
    * images
    - * @PURPLE_CONNECTION_FLAG_SUPPORT_MOODS: Connection supports setting moods
    - * @PURPLE_CONNECTION_FLAG_SUPPORT_MOOD_MESSAGES: Connection supports setting
    - * a message on moods
    *
    * Flags to change behavior of the client for a given connection.
    */
    @@ -76,8 +73,6 @@
    PURPLE_CONNECTION_FLAG_NO_FONTSIZE = 0x0020,
    PURPLE_CONNECTION_FLAG_NO_URLDESC = 0x0040,
    PURPLE_CONNECTION_FLAG_NO_IMAGES = 0x0080,
    - PURPLE_CONNECTION_FLAG_SUPPORT_MOODS = 0x0200,
    - PURPLE_CONNECTION_FLAG_SUPPORT_MOOD_MESSAGES = 0x0400
    } PurpleConnectionFlags;
    /**
    --- a/libpurple/protocols/jabber/disco.c Mon Mar 20 21:12:08 2023 -0500
    +++ b/libpurple/protocols/jabber/disco.c Mon Mar 20 21:14:42 2023 -0500
    @@ -413,12 +413,7 @@
    category = purple_xmlnode_get_attrib(child, "category");
    type = purple_xmlnode_get_attrib(child, "type");
    if(purple_strequal(category, "pubsub") && purple_strequal(type, "pep")) {
    - PurpleConnection *gc = js->gc;
    js->pep = TRUE;
    - purple_connection_set_flags(gc,
    - purple_connection_get_flags(gc)
    - | PURPLE_CONNECTION_FLAG_SUPPORT_MOODS
    - | PURPLE_CONNECTION_FLAG_SUPPORT_MOOD_MESSAGES);
    }
    if (!purple_strequal(category, "server"))
    continue;
    --- a/libpurple/protocols/jabber/jabber.c Mon Mar 20 21:12:08 2023 -0500
    +++ b/libpurple/protocols/jabber/jabber.c Mon Mar 20 21:14:42 2023 -0500
    @@ -49,7 +49,6 @@
    #include "oob.h"
    #include "ping.h"
    #include "si.h"
    -#include "usermood.h"
    #include "xdata.h"
    #include "pep.h"
    #include "adhoccommands.h"
    @@ -1560,7 +1559,7 @@
    }
    static void
    -jabber_tooltip_text(PurpleProtocolClient *client, PurpleBuddy *b,
    +jabber_tooltip_text(G_GNUC_UNUSED PurpleProtocolClient *client, PurpleBuddy *b,
    PurpleNotifyUserInfo *user_info, gboolean full)
    {
    JabberBuddy *jb;
    @@ -1586,7 +1585,6 @@
    PurplePresence *presence = purple_buddy_get_presence(b);
    const char *sub;
    GList *l;
    - const char *mood;
    gboolean multiple_resources =
    jb->resources && g_list_next(jb->resources);
    JabberBuddyResource *top_jbr = jabber_buddy_find_resource(jb, NULL);
    @@ -1607,34 +1605,6 @@
    }
    if (full) {
    - PurpleStatus *status;
    -
    - status = purple_presence_get_status(presence, "mood");
    - mood = purple_status_get_attr_string(status, PURPLE_MOOD_NAME);
    - if(mood && *mood) {
    - const char *moodtext;
    - /* find the mood */
    - PurpleMood *moods = jabber_get_moods(client, account);
    - const char *description = NULL;
    -
    - for (; moods->mood ; moods++) {
    - if (purple_strequal(moods->mood, mood)) {
    - description = moods->description;
    - break;
    - }
    - }
    -
    - moodtext = purple_status_get_attr_string(status, PURPLE_MOOD_COMMENT);
    - if(moodtext && *moodtext) {
    - char *moodplustext =
    - g_strdup_printf("%s (%s)", description ? _(description) : mood, moodtext);
    -
    - purple_notify_user_info_add_pair_html(user_info, _("Mood"), moodplustext);
    - g_free(moodplustext);
    - } else
    - purple_notify_user_info_add_pair_html(user_info, _("Mood"),
    - description ? _(description) : mood);
    - }
    if (purple_presence_is_status_primitive_active(presence, PURPLE_STATUS_TUNE)) {
    PurpleStatus *tune = purple_presence_get_status(presence, "tune");
    const char *title = purple_status_get_attr_string(tune, PURPLE_TUNE_TITLE);
    @@ -1691,21 +1661,11 @@
    NULL, TRUE, TRUE, FALSE,
    "priority", _("Priority"), priority_value,
    "message", _("Message"), purple_value_new(G_TYPE_STRING),
    - "mood", _("Mood"), purple_value_new(G_TYPE_STRING),
    - "moodtext", _("Mood Text"), purple_value_new(G_TYPE_STRING),
    "nick", _("Nickname"), purple_value_new(G_TYPE_STRING),
    "buzz", _("Allow Buzz"), buzz_enabled,
    NULL);
    types = g_list_prepend(types, type);
    -
    - type = purple_status_type_new_with_attrs(PURPLE_STATUS_MOOD,
    - "mood", NULL, TRUE, TRUE, TRUE,
    - PURPLE_MOOD_NAME, _("Mood Name"), purple_value_new(G_TYPE_STRING),
    - PURPLE_MOOD_COMMENT, _("Mood Comment"), purple_value_new(G_TYPE_STRING),
    - NULL);
    - types = g_list_prepend(types, type);
    -
    priority_value = purple_value_new(G_TYPE_INT);
    g_value_set_int(priority_value, 1);
    buzz_enabled = purple_value_new(G_TYPE_BOOLEAN);
    @@ -1715,8 +1675,6 @@
    _("Chatty"), TRUE, TRUE, FALSE,
    "priority", _("Priority"), priority_value,
    "message", _("Message"), purple_value_new(G_TYPE_STRING),
    - "mood", _("Mood"), purple_value_new(G_TYPE_STRING),
    - "moodtext", _("Mood Text"), purple_value_new(G_TYPE_STRING),
    "nick", _("Nickname"), purple_value_new(G_TYPE_STRING),
    "buzz", _("Allow Buzz"), buzz_enabled,
    NULL);
    @@ -1731,8 +1689,6 @@
    NULL, TRUE, TRUE, FALSE,
    "priority", _("Priority"), priority_value,
    "message", _("Message"), purple_value_new(G_TYPE_STRING),
    - "mood", _("Mood"), purple_value_new(G_TYPE_STRING),
    - "moodtext", _("Mood Text"), purple_value_new(G_TYPE_STRING),
    "nick", _("Nickname"), purple_value_new(G_TYPE_STRING),
    "buzz", _("Allow Buzz"), buzz_enabled,
    NULL);
    @@ -1747,8 +1703,6 @@
    NULL, TRUE, TRUE, FALSE,
    "priority", _("Priority"), priority_value,
    "message", _("Message"), purple_value_new(G_TYPE_STRING),
    - "mood", _("Mood"), purple_value_new(G_TYPE_STRING),
    - "moodtext", _("Mood Text"), purple_value_new(G_TYPE_STRING),
    "nick", _("Nickname"), purple_value_new(G_TYPE_STRING),
    "buzz", _("Allow Buzz"), buzz_enabled,
    NULL);
    @@ -1761,8 +1715,6 @@
    _("Do Not Disturb"), TRUE, TRUE, FALSE,
    "priority", _("Priority"), priority_value,
    "message", _("Message"), purple_value_new(G_TYPE_STRING),
    - "mood", _("Mood"), purple_value_new(G_TYPE_STRING),
    - "moodtext", _("Mood Text"), purple_value_new(G_TYPE_STRING),
    "nick", _("Nickname"), purple_value_new(G_TYPE_STRING),
    NULL);
    types = g_list_prepend(types, type);
    @@ -2875,50 +2827,6 @@
    }
    }
    -static PurpleCmdRet
    -jabber_cmd_mood(PurpleConversation *conv, G_GNUC_UNUSED const char *cmd,
    - char **args, G_GNUC_UNUSED char **error,
    - G_GNUC_UNUSED gpointer data)
    -{
    - PurpleAccount *account = purple_conversation_get_account(conv);
    - JabberStream *js = purple_connection_get_protocol_data(purple_account_get_connection(account));
    -
    - if (js->pep) {
    - gboolean ret;
    -
    - if (!args || !args[0]) {
    - /* No arguments; unset mood */
    - ret = jabber_mood_set(js, NULL, NULL);
    - } else {
    - /* At least one argument. Relying on the list of arguments
    - * being NULL-terminated.
    - */
    - ret = jabber_mood_set(js, args[0], args[1]);
    - if (!ret) {
    - /* Let's try again */
    - char *tmp = g_strjoin(" ", args[0], args[1], NULL);
    - ret = jabber_mood_set(js, "undefined", tmp);
    - g_free(tmp);
    - }
    - }
    -
    - if (ret) {
    - return PURPLE_CMD_RET_OK;
    - } else {
    - purple_conversation_write_system_message(conv,
    - _("Failed to specify mood"),
    - PURPLE_MESSAGE_ERROR);
    - return PURPLE_CMD_RET_FAILED;
    - }
    - } else {
    - /* account does not support PEP, can't set a mood */
    - purple_conversation_write_system_message(conv,
    - _("Account does not support PEP, can't set mood"),
    - PURPLE_MESSAGE_ERROR);
    - return PURPLE_CMD_RET_FAILED;
    - }
    -}
    -
    static void
    jabber_register_commands(PurpleProtocol *protocol)
    {
    @@ -3020,13 +2928,6 @@
    _("ping <jid>: Ping a user/component/server."), NULL);
    commands = g_slist_prepend(commands, GUINT_TO_POINTER(id));
    - id = purple_cmd_register("mood", "ws", PURPLE_CMD_P_PROTOCOL,
    - PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_IM |
    - PURPLE_CMD_FLAG_PROTOCOL_ONLY | PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS,
    - proto_id, jabber_cmd_mood,
    - _("mood <mood> [text]: Set current user mood"), NULL);
    - commands = g_slist_prepend(commands, GUINT_TO_POINTER(id));
    -
    g_hash_table_insert(jabber_cmds, protocol, commands);
    }
    @@ -3382,7 +3283,6 @@
    client_iface->normalize = jabber_client_normalize;
    client_iface->find_blist_chat = jabber_find_blist_chat;
    client_iface->offline_message = jabber_offline_message;
    - client_iface->get_moods = jabber_get_moods;
    }
    static void
    --- a/libpurple/protocols/jabber/meson.build Mon Mar 20 21:12:08 2023 -0500
    +++ b/libpurple/protocols/jabber/meson.build Mon Mar 20 21:14:42 2023 -0500
    @@ -66,8 +66,6 @@
    'si.h',
    'useravatar.c',
    'useravatar.h',
    - 'usermood.c',
    - 'usermood.h',
    'usernick.c',
    'usernick.h',
    'usertune.c',
    --- a/libpurple/protocols/jabber/pep.c Mon Mar 20 21:12:08 2023 -0500
    +++ b/libpurple/protocols/jabber/pep.c Mon Mar 20 21:14:42 2023 -0500
    @@ -27,7 +27,6 @@
    #include "iq.h"
    #include <string.h>
    #include "useravatar.h"
    -#include "usermood.h"
    #include "usernick.h"
    #include "usertune.h"
    @@ -39,7 +38,6 @@
    /* register PEP handlers */
    jabber_avatar_init();
    - jabber_mood_init();
    jabber_tune_init();
    jabber_nick_init();
    }
    --- a/libpurple/protocols/jabber/presence.c Mon Mar 20 21:12:08 2023 -0500
    +++ b/libpurple/protocols/jabber/presence.c Mon Mar 20 21:14:42 2023 -0500
    @@ -31,7 +31,6 @@
    #include "jutil.h"
    #include "adhoccommands.h"
    -#include "usermood.h"
    #include "usertune.h"
    static GHashTable *presence_handlers = NULL;
    @@ -169,16 +168,6 @@
    gc = purple_account_get_connection(account);
    js = purple_connection_get_protocol_data(gc);
    - /* it's a mood update */
    - if (purple_status_type_get_primitive(purple_status_get_status_type(status)) == PURPLE_STATUS_MOOD) {
    - const char *mood =
    - purple_status_get_attr_string(status, PURPLE_MOOD_NAME);
    - const char *mood_text =
    - purple_status_get_attr_string(status, PURPLE_MOOD_COMMENT);
    - jabber_mood_set(js, mood, mood_text);
    - return;
    - }
    -
    jabber_presence_send(js, FALSE);
    }
    --- a/libpurple/protocols/jabber/tests/test_jabber_caps.c Mon Mar 20 21:12:08 2023 -0500
    +++ b/libpurple/protocols/jabber/tests/test_jabber_caps.c Mon Mar 20 21:14:42 2023 -0500
    @@ -41,8 +41,8 @@
    test_jabber_caps_calculate_from_xmlnode(void) {
    _test_jabber_caps_match(
    G_CHECKSUM_SHA1,
    - "<query xmlns='http://jabber.org/protocol/disco#info' node='http://tkabber.jabber.ru/#GNjxthSckUNvAIoCCJFttjl6VL8='><identity category='client' type='pc' name='Tkabber'/><x xmlns='jabber:x:data' type='result'><field var='FORM_TYPE' type='hidden'><value>urn:xmpp:dataforms:softwareinfo</value></field><field var='software'><value>Tkabber</value></field><field var='software_version'><value> ( 8.5.5 )</value></field><field var='os'><value>ATmega640-16AU</value></field><field var='os_version'><value/></field></x><feature var='games:board'/><feature var='http://jabber.org/protocol/activity'/><feature var='http://jabber.org/protocol/bytestreams'/><feature var='http://jabber.org/protocol/chatstates'/><feature var='http://jabber.org/protocol/commands'/><feature var='http://jabber.org/protocol/commands'/><feature var='http://jabber.org/protocol/disco#info'/><feature var='http://jabber.org/protocol/disco#items'/><feature var='http://jabber.org/protocol/feature-neg'/><feature var='http://jabber.org/protocol/geoloc'/><feature var='http://jabber.org/protocol/ibb'/><feature var='http://jabber.org/protocol/iqibb'/><feature var='http://jabber.org/protocol/mood'/><feature var='http://jabber.org/protocol/muc'/><feature var='http://jabber.org/protocol/mute#ancestor'/><feature var='http://jabber.org/protocol/mute#editor'/><feature var='http://jabber.org/protocol/rosterx'/><feature var='http://jabber.org/protocol/si'/><feature var='http://jabber.org/protocol/si/profile/file-transfer'/><feature var='http://jabber.org/protocol/tune'/><feature var='jabber:iq:avatar'/><feature var='jabber:iq:browse'/><feature var='jabber:iq:dtcp'/><feature var='jabber:iq:filexfer'/><feature var='jabber:iq:ibb'/><feature var='jabber:iq:inband'/><feature var='jabber:iq:jidlink'/><feature var='jabber:iq:last'/><feature var='jabber:iq:oob'/><feature var='jabber:iq:privacy'/><feature var='jabber:iq:time'/><feature var='jabber:iq:version'/><feature var='jabber:x:data'/><feature var='jabber:x:event'/><feature var='jabber:x:oob'/><feature var='urn:xmpp:ping'/><feature var='urn:xmpp:receipts'/><feature var='urn:xmpp:time'/></query>",
    - "3V9tfR8fPykyks72jvg+bkUtQTM="
    + "<query xmlns='http://jabber.org/protocol/disco#info' node='http://tkabber.jabber.ru/#GNjxthSckUNvAIoCCJFttjl6VL8='><identity category='client' type='pc' name='Tkabber'/><x xmlns='jabber:x:data' type='result'><field var='FORM_TYPE' type='hidden'><value>urn:xmpp:dataforms:softwareinfo</value></field><field var='software'><value>Tkabber</value></field><field var='software_version'><value> ( 8.5.5 )</value></field><field var='os'><value>ATmega640-16AU</value></field><field var='os_version'><value/></field></x><feature var='games:board'/><feature var='http://jabber.org/protocol/activity'/><feature var='http://jabber.org/protocol/bytestreams'/><feature var='http://jabber.org/protocol/chatstates'/><feature var='http://jabber.org/protocol/commands'/><feature var='http://jabber.org/protocol/commands'/><feature var='http://jabber.org/protocol/disco#info'/><feature var='http://jabber.org/protocol/disco#items'/><feature var='http://jabber.org/protocol/feature-neg'/><feature var='http://jabber.org/protocol/geoloc'/><feature var='http://jabber.org/protocol/ibb'/><feature var='http://jabber.org/protocol/iqibb'/><feature var='http://jabber.org/protocol/muc'/><feature var='http://jabber.org/protocol/mute#ancestor'/><feature var='http://jabber.org/protocol/mute#editor'/><feature var='http://jabber.org/protocol/rosterx'/><feature var='http://jabber.org/protocol/si'/><feature var='http://jabber.org/protocol/si/profile/file-transfer'/><feature var='http://jabber.org/protocol/tune'/><feature var='jabber:iq:avatar'/><feature var='jabber:iq:browse'/><feature var='jabber:iq:dtcp'/><feature var='jabber:iq:filexfer'/><feature var='jabber:iq:ibb'/><feature var='jabber:iq:inband'/><feature var='jabber:iq:jidlink'/><feature var='jabber:iq:last'/><feature var='jabber:iq:oob'/><feature var='jabber:iq:privacy'/><feature var='jabber:iq:time'/><feature var='jabber:iq:version'/><feature var='jabber:x:data'/><feature var='jabber:x:event'/><feature var='jabber:x:oob'/><feature var='urn:xmpp:ping'/><feature var='urn:xmpp:receipts'/><feature var='urn:xmpp:time'/></query>",
    + "MxSGNsM12KCe/2hYIySOX+CpY9U="
    );
    }
    --- a/libpurple/protocols/jabber/usermood.c Mon Mar 20 21:12:08 2023 -0500
    +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
    @@ -1,226 +0,0 @@
    -/*
    - * purple - Jabber Protocol Plugin
    - *
    - * Purple is the legal property of its developers, whose names are too numerous
    - * to list here. Please refer to the COPYRIGHT file distributed with this
    - * source distribution.
    - *
    - * 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 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 02111-1301 USA
    - *
    - */
    -
    -#include <glib/gi18n-lib.h>
    -
    -#include <purple.h>
    -
    -#include "usermood.h"
    -#include "pep.h"
    -#include <string.h>
    -
    -static PurpleMood moods[] = {
    - { .mood = "afraid", .description = N_("Afraid"), },
    - { .mood = "amazed", .description = N_("Amazed"), },
    - { .mood = "amorous", .description = N_("Amorous"), },
    - { .mood = "angry", .description = N_("Angry"), },
    - { .mood = "annoyed", .description = N_("Annoyed"), },
    - { .mood = "anxious", .description = N_("Anxious"), },
    - { .mood = "aroused", .description = N_("Aroused"), },
    - { .mood = "ashamed", .description = N_("Ashamed"), },
    - { .mood = "bored", .description = N_("Bored"), },
    - { .mood = "brave", .description = N_("Brave"), },
    - { .mood = "calm", .description = N_("Calm"), },
    - { .mood = "cautious", .description = N_("Cautious"), },
    - { .mood = "cold", .description = N_("Cold"), },
    - { .mood = "confident", .description = N_("Confident"), },
    - { .mood = "confused", .description = N_("Confused"), },
    - { .mood = "contemplative", .description = N_("Contemplative"), },
    - { .mood = "contented", .description = N_("Contented"), },
    - { .mood = "cranky", .description = N_("Cranky"), },
    - { .mood = "crazy", .description = N_("Crazy"), },
    - { .mood = "creative", .description = N_("Creative"), },
    - { .mood = "curious", .description = N_("Curious"), },
    - { .mood = "dejected", .description = N_("Dejected"), },
    - { .mood = "depressed", .description = N_("Depressed"), },
    - { .mood = "disappointed", .description = N_("Disappointed"), },
    - { .mood = "disgusted", .description = N_("Disgusted"), },
    - { .mood = "dismayed", .description = N_("Dismayed"), },
    - { .mood = "distracted", .description = N_("Distracted"), },
    - { .mood = "embarrassed", .description = N_("Embarrassed"), },
    - { .mood = "envious", .description = N_("Envious"), },
    - { .mood = "excited", .description = N_("Excited"), },
    - { .mood = "flirtatious", .description = N_("Flirtatious"), },
    - { .mood = "frustrated", .description = N_("Frustrated"), },
    - { .mood = "grateful", .description = N_("Grateful"), },
    - { .mood = "grieving", .description = N_("Grieving"), },
    - { .mood = "grumpy", .description = N_("Grumpy"), },
    - { .mood = "guilty", .description = N_("Guilty"), },
    - { .mood = "happy", .description = N_("Happy"), },
    - { .mood = "hopeful", .description = N_("Hopeful"), },
    - { .mood = "hot", .description = N_("Hot"), },
    - { .mood = "humbled", .description = N_("Humbled"), },
    - { .mood = "humiliated", .description = N_("Humiliated"), },
    - { .mood = "hungry", .description = N_("Hungry"), },
    - { .mood = "hurt", .description = N_("Hurt"), },
    - { .mood = "impressed", .description = N_("Impressed"), },
    - { .mood = "in_awe", .description = N_("In awe"), },
    - { .mood = "in_love", .description = N_("In love"), },
    - { .mood = "indignant", .description = N_("Indignant"), },
    - { .mood = "interested", .description = N_("Interested"), },
    - { .mood = "intoxicated", .description = N_("Intoxicated"), },
    - { .mood = "invincible", .description = N_("Invincible"), },
    - { .mood = "jealous", .description = N_("Jealous"), },
    - { .mood = "lonely", .description = N_("Lonely"), },
    - { .mood = "lost", .description = N_("Lost"), },
    - { .mood = "lucky", .description = N_("Lucky"), },
    - { .mood = "mean", .description = N_("Mean"), },
    - { .mood = "moody", .description = N_("Moody"), },
    - { .mood = "nervous", .description = N_("Nervous"), },
    - { .mood = "neutral", .description = N_("Neutral"), },
    - { .mood = "offended", .description = N_("Offended"), },
    - { .mood = "outraged", .description = N_("Outraged"), },
    - { .mood = "playful", .description = N_("Playful"), },
    - { .mood = "proud", .description = N_("Proud"), },
    - { .mood = "relaxed", .description = N_("Relaxed"), },
    - { .mood = "relieved", .description = N_("Relieved"), },
    - { .mood = "remorseful", .description = N_("Remorseful"), },
    - { .mood = "restless", .description = N_("Restless"), },
    - { .mood = "sad", .description = N_("Sad"), },
    - { .mood = "sarcastic", .description = N_("Sarcastic"), },
    - { .mood = "satisfied", .description = N_("Satisfied"), },
    - { .mood = "serious", .description = N_("Serious"), },
    - { .mood = "shocked", .description = N_("Shocked"), },
    - { .mood = "shy", .description = N_("Shy"), },
    - { .mood = "sick", .description = N_("Sick"), },
    - { .mood = "sleepy", .description = N_("Sleepy"), },
    - { .mood = "spontaneous", .description = N_("Spontaneous"), },
    - { .mood = "stressed", .description = N_("Stressed"), },
    - { .mood = "strong", .description = N_("Strong"), },
    - { .mood = "surprised", .description = N_("Surprised"), },
    - { .mood = "thankful", .description = N_("Thankful"), },
    - { .mood = "thirsty", .description = N_("Thirsty"), },
    - { .mood = "tired", .description = N_("Tired"), },
    - { .mood = "undefined", .description = N_("Undefined"), },
    - { .mood = "weak", .description = N_("Weak"), },
    - { .mood = "worried", .description = N_("Worried"), },
    - /* Mark last record. */
    - { .mood = NULL, .description = NULL, }
    -};
    -
    -static const PurpleMood*
    -find_mood_by_name(const gchar *name)
    -{
    - int i;
    -
    - g_return_val_if_fail(name && *name, NULL);
    -
    - for (i = 0; moods[i].mood != NULL; ++i) {
    - if (purple_strequal(name, moods[i].mood)) {
    - return &moods[i];
    - }
    - }
    -
    - return NULL;
    -}
    -
    -static void jabber_mood_cb(JabberStream *js, const char *from, PurpleXmlNode *items) {
    - /* it doesn't make sense to have more than one item here, so let's just pick the first one */
    - PurpleXmlNode *item = purple_xmlnode_get_child(items, "item");
    - const char *newmood = NULL;
    - char *moodtext = NULL;
    - JabberBuddy *buddy = jabber_buddy_find(js, from, FALSE);
    - PurpleXmlNode *moodinfo, *mood;
    - /* ignore the mood of people not on our buddy list */
    - if (!buddy || !item)
    - return;
    -
    - mood = purple_xmlnode_get_child_with_namespace(item, "mood", "http://jabber.org/protocol/mood");
    - if (!mood)
    - return;
    - for (moodinfo = mood->child; moodinfo; moodinfo = moodinfo->next) {
    - if (moodinfo->type == PURPLE_XMLNODE_TYPE_TAG) {
    - if (purple_strequal(moodinfo->name, "text")) {
    - if (!moodtext) /* only pick the first one */
    - moodtext = purple_xmlnode_get_data(moodinfo);
    - } else {
    - const PurpleMood *target_mood;
    -
    - /* verify that the mood is known (valid) */
    - target_mood = find_mood_by_name(moodinfo->name);
    - newmood = target_mood ? target_mood->mood : NULL;
    - }
    -
    - }
    - if (newmood != NULL && moodtext != NULL)
    - break;
    - }
    - if (newmood != NULL) {
    - purple_protocol_got_user_status(purple_connection_get_account(js->gc), from, "mood",
    - PURPLE_MOOD_NAME, newmood,
    - PURPLE_MOOD_COMMENT, moodtext,
    - NULL);
    - } else {
    - purple_protocol_got_user_status_deactive(purple_connection_get_account(js->gc), from, "mood");
    - }
    - g_free(moodtext);
    -}
    -
    -void jabber_mood_init(void) {
    - jabber_add_feature("http://jabber.org/protocol/mood", jabber_pep_namespace_only_when_pep_enabled_cb);
    - jabber_pep_register_handler("http://jabber.org/protocol/mood", jabber_mood_cb);
    -}
    -
    -gboolean
    -jabber_mood_set(JabberStream *js, const char *mood, const char *text)
    -{
    - const PurpleMood *target_mood = NULL;
    - PurpleXmlNode *publish, *moodnode;
    -
    - if (mood && *mood) {
    - target_mood = find_mood_by_name(mood);
    - /* Mood specified, but is invalid --
    - * fail so that the command can handle this.
    - */
    - if (!target_mood)
    - return FALSE;
    - }
    -
    - publish = purple_xmlnode_new("publish");
    - purple_xmlnode_set_attrib(publish,"node","http://jabber.org/protocol/mood");
    - moodnode = purple_xmlnode_new_child(purple_xmlnode_new_child(publish, "item"), "mood");
    - purple_xmlnode_set_namespace(moodnode, "http://jabber.org/protocol/mood");
    -
    - if (target_mood) {
    - /* If target_mood is not NULL, then
    - * target_mood->mood == mood, and is a valid element name.
    - */
    - purple_xmlnode_new_child(moodnode, mood);
    -
    - /* Only set text when setting a mood */
    - if (text && *text) {
    - PurpleXmlNode *textnode = purple_xmlnode_new_child(moodnode, "text");
    - purple_xmlnode_insert_data(textnode, text, -1);
    - }
    - }
    -
    - jabber_pep_publish(js, publish);
    - return TRUE;
    -}
    -
    -PurpleMood *
    -jabber_get_moods(G_GNUC_UNUSED PurpleProtocolClient *client,
    - G_GNUC_UNUSED PurpleAccount *account)
    -{
    - return moods;
    -}
    --- a/libpurple/protocols/jabber/usermood.h Mon Mar 20 21:12:08 2023 -0500
    +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
    @@ -1,50 +0,0 @@
    -/*
    - * purple - Jabber Protocol Plugin
    - *
    - * Purple is the legal property of its developers, whose names are too numerous
    - * to list here. Please refer to the COPYRIGHT file distributed with this
    - * source distribution.
    - *
    - * 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 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 02111-1301 USA
    - *
    - */
    -
    -#ifndef PURPLE_JABBER_USERMOOD_H
    -#define PURPLE_JABBER_USERMOOD_H
    -
    -#include "jabber.h"
    -
    -/* Implementation of XEP-0107 */
    -
    -void jabber_mood_init(void);
    -
    -/**
    - * Sets / unsets the mood for the specified account. The mood passed in
    - * must either be NULL, "", or one of the moods returned by
    - * jabber_get_moods().
    - *
    - * @param js The JabberStream object.
    - * @param mood The mood to set, NULL, or ""
    - * @param text Optional text that goes along with a mood. Only used when
    - * setting a mood (not when unsetting a mood).
    - *
    - * @return FALSE if an invalid mood was specified, or TRUE otherwise.
    - */
    -gboolean
    -jabber_mood_set(JabberStream *js, const char *mood, const char *text);
    -
    -PurpleMood *jabber_get_moods(PurpleProtocolClient *client, PurpleAccount *account);
    -
    -#endif /* PURPLE_JABBER_USERMOOD_H */
    --- a/libpurple/purpleprotocolclient.c Mon Mar 20 21:12:08 2023 -0500
    +++ b/libpurple/purpleprotocolclient.c Mon Mar 20 21:14:42 2023 -0500
    @@ -189,23 +189,6 @@
    return NULL;
    }
    -PurpleMood *
    -purple_protocol_client_get_moods(PurpleProtocolClient *client,
    - PurpleAccount *account)
    -{
    - PurpleProtocolClientInterface *iface = NULL;
    -
    - g_return_val_if_fail(PURPLE_IS_PROTOCOL_CLIENT(client), NULL);
    - g_return_val_if_fail(PURPLE_IS_ACCOUNT(account), NULL);
    -
    - iface = PURPLE_PROTOCOL_CLIENT_GET_IFACE(client);
    - if(iface != NULL && iface->get_moods != NULL) {
    - return iface->get_moods(client, account);
    - }
    -
    - return NULL;
    -}
    -
    gssize
    purple_protocol_client_get_max_message_size(PurpleProtocolClient *client,
    PurpleConversation *conv)
    --- a/libpurple/purpleprotocolclient.h Mon Mar 20 21:12:08 2023 -0500
    +++ b/libpurple/purpleprotocolclient.h Mon Mar 20 21:14:42 2023 -0500
    @@ -89,8 +89,6 @@
    * The hash table should be destroyed
    * by the caller when it's no longer
    * needed.
    - * @get_moods: Returns an array of #PurpleMood's, with the last one having
    - * "mood" set to %NULL.
    * @get_max_message_size: Gets the maximum message size in bytes for the
    * conversation.
    * <sbr/>It may depend on connection-specific or
    @@ -135,8 +133,6 @@
    GHashTable *(*get_account_text_table)(PurpleProtocolClient *client, PurpleAccount *account);
    - PurpleMood *(*get_moods)(PurpleProtocolClient *client, PurpleAccount *account);
    -
    gssize (*get_max_message_size)(PurpleProtocolClient *client, PurpleConversation *conv);
    /*< private >*/
    @@ -277,19 +273,6 @@
    GHashTable *purple_protocol_client_get_account_text_table(PurpleProtocolClient *client, PurpleAccount *account);
    /**
    - * purple_protocol_client_get_moods:
    - * @client: The #PurpleProtocolClient instance.
    - * @account: A #PurpleAccount instance.
    - *
    - * Gets the mood's for @account.
    - *
    - * Returns: (transfer none): A %NULL terminated array of #PurpleMood's.
    - *
    - * Since: 3.0.0
    - */
    -PurpleMood *purple_protocol_client_get_moods(PurpleProtocolClient *client, PurpleAccount *account);
    -
    -/**
    * purple_protocol_client_get_max_message_size:
    * @client: The #PurpleProtocolClient instance.
    * @conv: A #PurpleConversation instance.
    --- a/libpurple/status.c Mon Mar 20 21:12:08 2023 -0500
    +++ b/libpurple/status.c Mon Mar 20 21:14:42 2023 -0500
    @@ -110,7 +110,6 @@
    -200, /* extended away */
    -400, /* mobile */
    0, /* tune */
    - 0, /* mood */
    -10, /* idle, special case. */
    -5, /* idle time, special case. */
    10 /* Offline messageable */
    @@ -140,7 +139,6 @@
    { PURPLE_STATUS_EXTENDED_AWAY, "extended_away", N_("Extended away") },
    { PURPLE_STATUS_MOBILE, "mobile", N_("Mobile") },
    { PURPLE_STATUS_TUNE, "tune", N_("Listening to music"), },
    - { PURPLE_STATUS_MOOD, "mood", N_("Feeling") },
    };
    int *
    @@ -1008,48 +1006,6 @@
    }
    /**************************************************************************
    -* GBoxed code for PurpleMood
    -**************************************************************************/
    -static PurpleMood *
    -purple_mood_copy(PurpleMood *mood)
    -{
    - PurpleMood *mood_copy;
    -
    - g_return_val_if_fail(mood != NULL, NULL);
    -
    - mood_copy = g_new(PurpleMood, 1);
    -
    - mood_copy->mood = g_strdup(mood->mood);
    - mood_copy->description = g_strdup(mood->description);
    -
    - return mood_copy;
    -}
    -
    -static void
    -purple_mood_free(PurpleMood *mood)
    -{
    - g_free((gchar *)mood->mood);
    - g_free((gchar *)mood->description);
    -
    - g_free(mood);
    -}
    -
    -GType
    -purple_mood_get_type(void)
    -{
    - static GType type = 0;
    -
    - if (type == 0) {
    - type = g_boxed_type_register_static("PurpleMood",
    - (GBoxedCopyFunc)purple_mood_copy,
    - (GBoxedFreeFunc)purple_mood_free);
    - }
    -
    - return type;
    -}
    -
    -
    -/**************************************************************************
    * GObject code
    **************************************************************************/
    --- a/libpurple/status.h Mon Mar 20 21:12:08 2023 -0500
    +++ b/libpurple/status.h Mon Mar 20 21:14:42 2023 -0500
    @@ -81,24 +81,6 @@
    */
    typedef struct _PurpleStatusAttribute PurpleStatusAttribute;
    -#define PURPLE_TYPE_MOOD (purple_mood_get_type())
    -
    -/**
    - * PurpleMood:
    - * @mood: A string representing the mood.
    - * @description: A short description of the mood.
    - *
    - * A structure to represent a mood.
    - */
    -typedef struct {
    - /*< public >*/
    - const char *mood;
    - const char *description;
    -
    - /*< private >*/
    - gpointer padding[4];
    -} PurpleMood;
    -
    /**
    * PurpleStatusPrimitive:
    * @PURPLE_STATUS_UNSET: The status is not set
    @@ -110,7 +92,6 @@
    * @PURPLE_STATUS_EXTENDED_AWAY: The status is extended away/do not disturb
    * @PURPLE_STATUS_MOBILE: The status is mobile
    * @PURPLE_STATUS_TUNE: The status includes a song title
    - * @PURPLE_STATUS_MOOD: The status includes a mood
    * @PURPLE_STATUS_NUM_PRIMITIVES: The number of #PurpleStatusPrimitive<!-- -->s
    *
    * A primitive defining the basic structure of a status type.
    @@ -130,7 +111,6 @@
    PURPLE_STATUS_EXTENDED_AWAY,
    PURPLE_STATUS_MOBILE,
    PURPLE_STATUS_TUNE,
    - PURPLE_STATUS_MOOD,
    PURPLE_STATUS_NUM_PRIMITIVES, /*< skip >*/
    } PurpleStatusPrimitive;
    @@ -207,9 +187,6 @@
    */
    #define PURPLE_TUNE_YEAR "tune_year"
    -#define PURPLE_MOOD_NAME "mood"
    -#define PURPLE_MOOD_COMMENT "moodtext"
    -
    G_BEGIN_DECLS
    /**************************************************************************/
    @@ -564,19 +541,6 @@
    GValue *purple_status_attribute_get_value(const PurpleStatusAttribute *attr);
    /**************************************************************************/
    -/* PurpleMood API */
    -/**************************************************************************/
    -
    -/**
    - * purple_mood_get_type:
    - *
    - * The standard _get_type function for #PurpleMood.
    - *
    - * Returns: The #GType for the #PurpleMood boxed structure.
    - */
    -GType purple_mood_get_type(void);
    -
    -/**************************************************************************/
    /* PurpleStatus API */
    /**************************************************************************/
    --- a/pidgin/meson.build Mon Mar 20 21:12:08 2023 -0500
    +++ b/pidgin/meson.build Mon Mar 20 21:14:42 2023 -0500
    @@ -45,7 +45,6 @@
    'pidgininvitedialog.c',
    'pidginkeypad.c',
    'pidginmessage.c',
    - 'pidginmooddialog.c',
    'pidginnotificationaddcontact.c',
    'pidginnotificationauthorizationrequest.c',
    'pidginnotificationconnectionerror.c',
    @@ -113,7 +112,6 @@
    'pidgininvitedialog.h',
    'pidginkeypad.h',
    'pidginmessage.h',
    - 'pidginmooddialog.h',
    'pidginnotificationaddcontact.h',
    'pidginnotificationauthorizationrequest.h',
    'pidginnotificationconnectionerror.h',
    --- a/pidgin/pidginapplication.c Mon Mar 20 21:12:08 2023 -0500
    +++ b/pidgin/pidginapplication.c Mon Mar 20 21:14:42 2023 -0500
    @@ -48,7 +48,6 @@
    #include "pidgincore.h"
    #include "pidgindebug.h"
    #include "pidgindisplaywindow.h"
    -#include "pidginmooddialog.h"
    #include "pidginpluginsdialog.h"
    #include "pidginpluginsmenu.h"
    #include "pidginprefs.h"
    @@ -220,7 +219,6 @@
    "add-group",
    "get-user-info",
    "new-message",
    - "set-mood",
    };
    /*< private >
    @@ -549,14 +547,6 @@
    }
    static void
    -pidgin_application_set_mood(G_GNUC_UNUSED GSimpleAction *simple,
    - G_GNUC_UNUSED GVariant *parameter,
    - G_GNUC_UNUSED gpointer data)
    -{
    - pidgin_mood_dialog_show(NULL);
    -}
    -
    -static void
    pidgin_application_show_status_manager(G_GNUC_UNUSED GSimpleAction *simple,
    G_GNUC_UNUSED GVariant *parameter,
    gpointer data)
    @@ -642,9 +632,6 @@
    .name = "room-list",
    .activate = pidgin_application_room_list,
    }, {
    - .name = "set-mood",
    - .activate = pidgin_application_set_mood,
    - }, {
    .name = "status-manager",
    .activate = pidgin_application_show_status_manager,
    }
    --- a/pidgin/pidginiconname.c Mon Mar 20 21:12:08 2023 -0500
    +++ b/pidgin/pidginiconname.c Mon Mar 20 21:14:42 2023 -0500
    @@ -50,7 +50,6 @@
    break;
    case PURPLE_STATUS_MOBILE:
    case PURPLE_STATUS_TUNE:
    - case PURPLE_STATUS_MOOD:
    case PURPLE_STATUS_UNSET:
    default:
    break;
    --- a/pidgin/pidginmooddialog.c Mon Mar 20 21:12:08 2023 -0500
    +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
    @@ -1,344 +0,0 @@
    -/*
    - * pidgin
    - *
    - * Pidgin is the legal property of its developers, whose names are too numerous
    - * to list here. Please refer to the COPYRIGHT file distributed with this
    - * source distribution.
    - *
    - * 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 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 02111-1301 USA
    - */
    -
    -#include "pidgin/pidginmooddialog.h"
    -
    -#include <glib/gi18n-lib.h>
    -
    -#include "config.h"
    -
    -/*< private >
    - * pidgin_mood_update_status:
    - * @account: The #PurpleAccount instance.
    - * @mood: The id of the new mood.
    - * @text: The new status text.
    - *
    - * Updates the current status for @account with the given @mood and @text.
    - */
    -static void
    -update_status_with_mood(PurpleAccount *account, const gchar *mood,
    - const gchar *text)
    -{
    - if (mood && *mood) {
    - if (text) {
    - purple_account_set_status(account, "mood", TRUE,
    - PURPLE_MOOD_NAME, mood,
    - PURPLE_MOOD_COMMENT, text,
    - NULL);
    - } else {
    - purple_account_set_status(account, "mood", TRUE,
    - PURPLE_MOOD_NAME, mood,
    - NULL);
    - }
    - } else {
    - purple_account_set_status(account, "mood", FALSE, NULL);
    - }
    -}
    -
    -/*< private
    - * pidgin_mood_edit_cb:
    - * @connection: The #PurpleConnection instance.
    - * @page: The #PurpleRequestPage
    - *
    - * This a callback function for when the request dialog has been accepted.
    - */
    -static void
    -pidgin_mood_dialog_edit_cb(PurpleConnection *connection,
    - PurpleRequestPage *page)
    -{
    - PurpleRequestFieldList *mood_field = NULL;
    - GList *l = NULL;
    - const gchar *mood = NULL;
    -
    - mood_field = PURPLE_REQUEST_FIELD_LIST(purple_request_page_get_field(page,
    - "mood"));
    - l = purple_request_field_list_get_selected(mood_field);
    -
    - if(l == NULL) {
    - return;
    - }
    -
    - mood = purple_request_field_list_get_data(mood_field, l->data);
    -
    - if(connection != NULL) {
    - PurpleAccount *account = purple_connection_get_account(connection);
    - PurpleConnectionFlags flags;
    - const gchar *text = NULL;
    -
    - flags = purple_connection_get_flags(connection);
    - if (flags & PURPLE_CONNECTION_FLAG_SUPPORT_MOOD_MESSAGES) {
    - text = purple_request_page_get_string(page, "text");
    - } else {
    - text = NULL;
    - }
    -
    - update_status_with_mood(account, mood, text);
    - } else {
    - GListModel *manager_model = NULL;
    - guint n_items = 0;
    -
    - manager_model = purple_account_manager_get_default_as_model();
    - n_items = g_list_model_get_n_items(manager_model);
    - for(guint index = 0; index < n_items; index++) {
    - PurpleAccount *account = NULL;
    -
    - account = g_list_model_get_item(manager_model, index);
    - connection = purple_account_get_connection(account);
    - if(PURPLE_IS_CONNECTION(connection)) {
    - PurpleConnectionFlags flags;
    -
    - flags = purple_connection_get_flags(connection);
    - if(flags & PURPLE_CONNECTION_FLAG_SUPPORT_MOODS) {
    - update_status_with_mood(account, mood, NULL);
    - }
    - }
    -
    - g_object_unref(account);
    - }
    - }
    -}
    -
    -/*< private >
    - * pidgin_mood_get_global_moods:
    - *
    - * Returns an array of all global moods.
    - *
    - * This function should be in libpurple, and it needs a lot of cleanup. It
    - * should probably also be returning a GList of moods as that's easier to deal
    - * with.
    - *
    - * Also, there is non-deterministic behavior here that the order of the
    - * returned moods depends purely on the order that the accounts where connected
    - * in. This is probably okay, but we should look at fixing that somehow.
    - *
    - * Returns: (transfer full): A list of all global moods.
    - */
    -static PurpleMood *
    -pidgin_mood_get_global_moods(void) {
    - PurpleAccountManager *manager = NULL;
    - GHashTable *global_moods = NULL;
    - GHashTable *mood_counts = NULL;
    - GList *accounts = NULL;
    - PurpleMood *result = NULL;
    - GList *out_moods = NULL;
    - int i = 0;
    - int num_accounts = 0;
    -
    - global_moods = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, NULL);
    - mood_counts = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, NULL);
    -
    - manager = purple_account_manager_get_default();
    - accounts = purple_account_manager_get_enabled(manager);
    - for (; accounts ; accounts = g_list_delete_link(accounts, accounts)) {
    - PurpleAccount *account = (PurpleAccount *) accounts->data;
    - if (purple_account_is_connected(account)) {
    - PurpleConnection *gc = purple_account_get_connection(account);
    -
    - if (purple_connection_get_flags(gc) & PURPLE_CONNECTION_FLAG_SUPPORT_MOODS) {
    - PurpleProtocol *protocol = purple_connection_get_protocol(gc);
    - PurpleMood *mood = NULL;
    -
    - for (mood = purple_protocol_client_get_moods(PURPLE_PROTOCOL_CLIENT(protocol), account) ;
    - mood->mood != NULL ; mood++) {
    - int mood_count =
    - GPOINTER_TO_INT(g_hash_table_lookup(mood_counts, mood->mood));
    -
    - if (!g_hash_table_contains(global_moods, mood->mood)) {
    - g_hash_table_insert(global_moods, (gpointer)mood->mood, mood);
    - }
    - g_hash_table_insert(mood_counts, (gpointer)mood->mood,
    - GINT_TO_POINTER(mood_count + 1));
    - }
    -
    - num_accounts++;
    - }
    - }
    - }
    -
    - result = g_new0(PurpleMood, g_hash_table_size(global_moods) + 1);
    -
    - out_moods = g_hash_table_get_values(global_moods);
    - while (out_moods) {
    - PurpleMood *mood = (PurpleMood *) out_moods->data;
    - int in_num_accounts =
    - GPOINTER_TO_INT(g_hash_table_lookup(mood_counts, mood->mood));
    -
    - if (in_num_accounts == num_accounts) {
    - /* mood is present in all accounts supporting moods */
    - result[i].mood = mood->mood;
    - result[i].description = mood->description;
    - i++;
    - }
    - out_moods = g_list_delete_link(out_moods, out_moods);
    - }
    -
    - g_hash_table_destroy(global_moods);
    - g_hash_table_destroy(mood_counts);
    -
    - return result;
    -}
    -
    -/*< private >
    - * pidgin_mood_get_global_status:
    - *
    - * Get the currently selected mood name for all mood support accounts. If no
    - * mood is set, or accounts have different moods then %NULL is returned.
    - *
    - * Returns: The currently selected mood name or %NULL if a mood is not set, or
    - * accounts are using different moods.
    - */
    -static const gchar *
    -pidgin_mood_get_global_status(void) {
    - PurpleAccountManager *manager = NULL;
    - GList *accounts = NULL;
    - const gchar *found_mood = NULL;
    -
    - manager = purple_account_manager_get_default();
    - accounts = purple_account_manager_get_enabled(manager);
    - for (; accounts ; accounts = g_list_delete_link(accounts, accounts)) {
    - PurpleAccount *account = (PurpleAccount *) accounts->data;
    -
    - if (purple_account_is_connected(account) &&
    - (purple_connection_get_flags(purple_account_get_connection(account)) &
    - PURPLE_CONNECTION_FLAG_SUPPORT_MOODS)) {
    - PurplePresence *presence = purple_account_get_presence(account);
    - PurpleStatus *status = purple_presence_get_status(presence, "mood");
    - const gchar *curr_mood = purple_status_get_attr_string(status, PURPLE_MOOD_NAME);
    -
    - if (found_mood != NULL && !purple_strequal(curr_mood, found_mood)) {
    - /* found a different mood */
    - found_mood = NULL;
    - break;
    - } else {
    - found_mood = curr_mood;
    - }
    - }
    - }
    -
    - return found_mood;
    -}
    -
    -/******************************************************************************
    - * Public API
    - *****************************************************************************/
    -void
    -pidgin_mood_dialog_show(PurpleAccount *account) {
    - const gchar *current_mood;
    - PurpleRequestPage *page;
    - PurpleRequestGroup *group = NULL;
    - PurpleRequestField *field = NULL;
    - PurpleRequestFieldList *fieldlist = NULL;
    - PurpleConnection *gc = NULL;
    - PurpleProtocol *protocol = NULL;
    - PurpleMood *mood = NULL;
    - PurpleMood *global_moods = NULL;
    -
    - if (account) {
    - PurplePresence *presence = purple_account_get_presence(account);
    - PurpleStatus *status = purple_presence_get_status(presence, "mood");
    - gc = purple_account_get_connection(account);
    - g_return_if_fail(purple_connection_get_protocol(gc) != NULL);
    - protocol = purple_connection_get_protocol(gc);
    - current_mood = purple_status_get_attr_string(status, PURPLE_MOOD_NAME);
    - } else {
    - current_mood = pidgin_mood_get_global_status();
    - }
    -
    - page = purple_request_page_new();
    - group = purple_request_group_new(NULL);
    - field = purple_request_field_list_new("mood",
    - _("Please select your mood from the list"));
    - fieldlist = PURPLE_REQUEST_FIELD_LIST(field);
    -
    - purple_request_field_list_add_icon(fieldlist, _("None"), NULL, "");
    - if(current_mood == NULL) {
    - purple_request_field_list_add_selected(fieldlist, _("None"));
    - }
    -
    - /* TODO: rlaager wants this sorted. */
    - /* TODO: darkrain wants it sorted post-translation */
    - if (account && PURPLE_IS_PROTOCOL_CLIENT(protocol)) {
    - mood = purple_protocol_client_get_moods(PURPLE_PROTOCOL_CLIENT(protocol), account);
    - }
    -
    - if(mood == NULL) {
    - mood = global_moods = pidgin_mood_get_global_moods();
    - }
    -
    - for ( ; mood != NULL && mood->mood != NULL ; mood++) {
    - char *path;
    -
    - if (mood->description == NULL) {
    - continue;
    - }
    -
    - path = pidgin_mood_get_icon_path(mood->mood);
    - purple_request_field_list_add_icon(fieldlist, _(mood->description),
    - path, (gpointer)mood->mood);
    - g_free(path);
    -
    - if (current_mood && purple_strequal(current_mood, mood->mood))
    - purple_request_field_list_add_selected(fieldlist, _(mood->description));
    - }
    - purple_request_group_add_field(group, field);
    -
    - purple_request_page_add_group(page, group);
    -
    - /* if the connection allows setting a mood message */
    - if (gc && (purple_connection_get_flags(gc) & PURPLE_CONNECTION_FLAG_SUPPORT_MOOD_MESSAGES)) {
    - group = purple_request_group_new(NULL);
    - field = purple_request_field_string_new("text", _("Message (optional)"),
    - NULL, FALSE);
    - purple_request_group_add_field(group, field);
    - purple_request_page_add_group(page, group);
    - }
    -
    - purple_request_fields(gc, _("Edit User Mood"), _("Edit User Mood"),
    - NULL, page,
    - _("OK"), G_CALLBACK(pidgin_mood_dialog_edit_cb),
    - _("Cancel"), NULL,
    - purple_request_cpar_from_connection(gc), gc);
    -
    - g_free(global_moods);
    -}
    -
    -gchar *
    -pidgin_mood_get_icon_path(const gchar *mood) {
    - gchar *path;
    -
    - if(purple_strequal(mood, "busy")) {
    - path = g_build_filename(PURPLE_DATADIR, "pidgin", "icons",
    - "hicolor", "16x16", "status", "user-busy.png", NULL);
    - } else if(purple_strequal(mood, "hiptop")) {
    - path = g_build_filename(PURPLE_DATADIR, "pidgin", "icons",
    - "hicolor", "16x16", "emblems", "emblem-hiptop.png",
    - NULL);
    - } else {
    - gchar *filename = g_strdup_printf("%s.png", mood);
    - path = g_build_filename(PURPLE_DATADIR, "pixmaps", "pidgin",
    - "emotes", "small", filename, NULL);
    - g_free(filename);
    - }
    -
    - return path;
    -}
    -
    --- a/pidgin/pidginmooddialog.h Mon Mar 20 21:12:08 2023 -0500
    +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
    @@ -1,61 +0,0 @@
    -/*
    - * pidgin
    - *
    - * Pidgin is the legal property of its developers, whose names are too numerous
    - * to list here. Please refer to the COPYRIGHT file distributed with this
    - * source distribution.
    - *
    - * 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 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 02111-1301 USA
    - */
    -
    -#if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION)
    -# error "only <pidgin.h> may be included directly"
    -#endif
    -
    -#ifndef PIDGIN_MOOD_DIALOG_H
    -#define PIDGIN_MOOD_DIALOG_H
    -
    -#include <glib.h>
    -
    -#include <gtk/gtk.h>
    -
    -#include <purple.h>
    -
    -G_BEGIN_DECLS
    -
    -/**
    - * pidgin_mood_dialog_show:
    - * @account: (nullable): The #PurpleAccount whose mood to set, or %NULL for the
    - * global mood.
    - *
    - * Presents a dialog to select the mood for @account or the global mood if
    - * @account is %NULL.
    - */
    -void pidgin_mood_dialog_show(PurpleAccount *account);
    -
    -/**
    - * pidgin_mood_get_icon_path:
    - * @mood: The id of the mood.
    - *
    - * Gets the path to the icon for @mood.
    - *
    - * Returns: (transfer full): The location of the icon for @mood.
    - */
    -gchar *pidgin_mood_get_icon_path(const gchar *mood);
    -
    -G_END_DECLS
    -
    -#endif /* PIDGIN_MOOD_DIALOG_H */
    -
    Binary file pidgin/pixmaps/emotes/small/16/afraid.png has changed
    Binary file pidgin/pixmaps/emotes/small/16/bathing.png has changed
    Binary file pidgin/pixmaps/emotes/small/16/cinema.png has changed
    Binary file pidgin/pixmaps/emotes/small/16/disappointed.png has changed
    Binary file pidgin/pixmaps/emotes/small/16/embarrassed.png has changed
    Binary file pidgin/pixmaps/emotes/small/16/grumpy.png has changed
    Binary file pidgin/pixmaps/emotes/small/16/hot.png has changed
    Binary file pidgin/pixmaps/emotes/small/16/internet.png has changed
    Binary file pidgin/pixmaps/emotes/small/16/invincible.png has changed
    --- a/pidgin/pixmaps/emotes/small/16/meson.build Mon Mar 20 21:12:08 2023 -0500
    +++ b/pidgin/pixmaps/emotes/small/16/meson.build Mon Mar 20 21:14:42 2023 -0500
    @@ -1,26 +1,3 @@
    -# These are mood images that are NOT also used in the smiley theme.
    -MOODS = [
    - 'afraid.png',
    - 'bathing.png',
    - 'cinema.png',
    - 'disappointed.png',
    - 'embarrassed.png',
    - 'grumpy.png',
    - 'hot.png',
    - 'internet.png',
    - 'invincible.png',
    - 'music.png',
    - 'restroom.png',
    - 'search.png',
    - 'shopping.png',
    - 'studying.png',
    - 'suit.png',
    - 'surfing.png',
    - 'typing.png',
    - 'working.png',
    - 'writing.png'
    -]
    -
    SMILEYS = [
    'amorous.png',
    'angel.png',
    @@ -94,4 +71,4 @@
    install : true,
    install_dir : pidginsmileypixdir)
    -install_data(MOODS + SMILEYS, install_dir : pidginsmileypixdir)
    +install_data(SMILEYS, install_dir : pidginsmileypixdir)
    Binary file pidgin/pixmaps/emotes/small/16/music.png has changed
    Binary file pidgin/pixmaps/emotes/small/16/restroom.png has changed
    Binary file pidgin/pixmaps/emotes/small/16/search.png has changed
    Binary file pidgin/pixmaps/emotes/small/16/shopping.png has changed
    Binary file pidgin/pixmaps/emotes/small/16/studying.png has changed
    Binary file pidgin/pixmaps/emotes/small/16/suit.png has changed
    Binary file pidgin/pixmaps/emotes/small/16/surfing.png has changed
    Binary file pidgin/pixmaps/emotes/small/16/typing.png has changed
    Binary file pidgin/pixmaps/emotes/small/16/working.png has changed
    Binary file pidgin/pixmaps/emotes/small/16/writing.png has changed
    --- a/pidgin/plugins/unity/unity.c Mon Mar 20 21:12:08 2023 -0500
    +++ b/pidgin/plugins/unity/unity.c Mon Mar 20 21:14:42 2023 -0500
    @@ -349,7 +349,6 @@
    switch (purple_savedstatus_get_primitive_type(saved_status)) {
    case PURPLE_STATUS_AVAILABLE:
    - case PURPLE_STATUS_MOOD:
    case PURPLE_STATUS_TUNE:
    case PURPLE_STATUS_UNSET:
    status = MESSAGING_MENU_STATUS_AVAILABLE;
    --- a/pidgin/resources/gtk/menus.ui Mon Mar 20 21:12:08 2023 -0500
    +++ b/pidgin/resources/gtk/menus.ui Mon Mar 20 21:14:42 2023 -0500
    @@ -183,11 +183,6 @@
    <attribute name="accel">&lt;Primary&gt;P</attribute>
    </item>
    <item>
    - <attribute name="label" translatable="yes">Set _Mood</attribute>
    - <attribute name="action">app.set-mood</attribute>
    - <attribute name="accel">&lt;Primary&gt;D</attribute>
    - </item>
    - <item>
    <attribute name="label" translatable="yes">_Statuses</attribute>
    <attribute name="action">app.status-manager</attribute>
    </item>
    --- a/po/POTFILES.in Mon Mar 20 21:12:08 2023 -0500
    +++ b/po/POTFILES.in Mon Mar 20 21:14:42 2023 -0500
    @@ -152,7 +152,6 @@
    libpurple/protocols/jabber/tests/test_jabber_jutil.c
    libpurple/protocols/jabber/tests/test_jabber_scram.c
    libpurple/protocols/jabber/useravatar.c
    -libpurple/protocols/jabber/usermood.c
    libpurple/protocols/jabber/usernick.c
    libpurple/protocols/jabber/usertune.c
    libpurple/protocols/jabber/xdata.c
    @@ -282,7 +281,6 @@
    pidgin/pidgininvitedialog.c
    pidgin/pidginkeypad.c
    pidgin/pidginmessage.c
    -pidgin/pidginmooddialog.c
    pidgin/pidginplugininfo.c
    pidgin/pidginpluginsdialog.c
    pidgin/pidginpluginsmenu.c