--- a/pidgin/gtkblist.c Mon Dec 12 00:47:54 2022 -0600
+++ b/pidgin/gtkblist.c Mon Dec 12 00:57:49 2022 -0600
@@ -1764,9 +1764,17 @@
buf = purple_gdk_pixbuf_from_data(data, len);
purple_buddy_icon_unref(icon);
+ const char *account_name = "(no account)"; + if(PURPLE_IS_ACCOUNT(account)) { + PurpleContactInfo *info = PURPLE_CONTACT_INFO(account); + account_name = purple_contact_info_get_username(info); purple_debug_warning("gtkblist", "Couldn't load buddy icon on "
"account %s (%s); buddyname=%s; custom_img_size=%" G_GSIZE_FORMAT,
- account ? purple_account_get_username(account) : "(no account)",
account ? purple_account_get_protocol_id(account) : "(no account)",
buddy ? purple_buddy_get_name(buddy) : "(no buddy)",
custom_img ? purple_image_get_data_size(custom_img) : 0);
@@ -1886,6 +1894,7 @@
add_tip_for_account(GtkWidget *grid, gint row, PurpleAccount *account)
+ PurpleContactInfo *info = NULL; PurpleProtocol *protocol = NULL;
@@ -1898,7 +1907,8 @@
gtk_image_set_pixel_size(GTK_IMAGE(image), STATUS_SIZE);
gtk_grid_attach(GTK_GRID(grid), image, 0, row, 1, 1);
- name = gtk_label_new(purple_account_get_username(account));
+ info = PURPLE_CONTACT_INFO(account); + name = gtk_label_new(purple_contact_info_get_username(info)); gtk_label_set_xalign(GTK_LABEL(name), 0);
gtk_label_set_yalign(GTK_LABEL(name), 0);
gtk_label_set_wrap(GTK_LABEL(name), TRUE);
@@ -2173,7 +2183,9 @@
connections = purple_connections_get_all();
if (connections && connections->next)
- tmp = g_markup_escape_text(purple_account_get_username(account), -1);
+ PurpleContactInfo *info = PURPLE_CONTACT_INFO(account); + tmp = g_markup_escape_text(purple_contact_info_get_username(info), g_string_append_printf(str, _("<b>Account:</b> %s"), tmp);
@@ -2277,8 +2289,11 @@
connections = purple_connections_get_all();
if (full && connections && connections->next)
+ PurpleContactInfo *info = PURPLE_CONTACT_INFO(account); + const char *username = purple_contact_info_get_username(info); purple_notify_user_info_add_pair_plaintext(user_info, _("Account"),
- purple_account_get_username(account));
--- a/pidgin/gtknotify.c Mon Dec 12 00:47:54 2022 -0600
+++ b/pidgin/gtknotify.c Mon Dec 12 00:57:49 2022 -0600
@@ -116,6 +116,7 @@
pidgin_widget_decorate_account(GtkWidget *cont, PurpleAccount *account)
+ PurpleContactInfo *info = NULL; PurpleProtocol *protocol = NULL;
const gchar *icon_name = NULL;
@@ -123,13 +124,13 @@
+ info = PURPLE_CONTACT_INFO(account); protocol = purple_account_get_protocol(account);
icon_name = purple_protocol_get_icon_name(protocol);
image = gtk_image_new_from_icon_name(icon_name);
- gtk_widget_set_tooltip_text(image,
- purple_account_get_username(account));
+ gtk_widget_set_tooltip_text(image, purple_contact_info_get_username(info)); gtk_widget_set_halign(image, GTK_ALIGN_START);
@@ -539,7 +540,7 @@
g_snprintf(key, sizeof(key), "%s - %s",
- purple_account_get_username(account),
+ purple_contact_info_get_username(PURPLE_CONTACT_INFO(account)), purple_normalize(account, who));
return g_utf8_strup(key, -1);
--- a/pidgin/gtkrequest.c Mon Dec 12 00:47:54 2022 -0600
+++ b/pidgin/gtkrequest.c Mon Dec 12 00:57:49 2022 -0600
@@ -87,6 +87,7 @@
pidgin_widget_decorate_account(GtkWidget *cont, PurpleAccount *account)
+ PurpleContactInfo *info = NULL; PurpleProtocol *protocol = NULL;
const gchar *icon_name = NULL;
@@ -95,12 +96,13 @@
+ info = PURPLE_CONTACT_INFO(account); protocol = purple_account_get_protocol(account);
icon_name = purple_protocol_get_icon_name(protocol);
image = gtk_image_new_from_icon_name(icon_name);
- gtk_widget_set_tooltip_text(image, purple_account_get_username(account));
+ gtk_widget_set_tooltip_text(image, purple_contact_info_get_username(info)); gtk_widget_set_halign(image, GTK_ALIGN_START);
--- a/pidgin/gtkxfer.c Mon Dec 12 00:47:54 2022 -0600
+++ b/pidgin/gtkxfer.c Mon Dec 12 00:57:49 2022 -0600
@@ -222,6 +222,8 @@
update_detailed_info(PidginXferDialog *dialog, PurpleXfer *xfer)
+ PurpleAccount *account = NULL; + PurpleContactInfo *info = NULL; char *kbsec, *time_elapsed, *time_remaining;
@@ -257,11 +259,15 @@
_("<b>Sending As:</b>"));
+ account = purple_xfer_get_account(xfer); + info = PURPLE_CONTACT_INFO(account); gtk_label_set_text(GTK_LABEL(dialog->local_user_label),
- purple_account_get_username(purple_xfer_get_account(xfer)));
- gtk_label_set_text(GTK_LABEL(dialog->remote_user_label), purple_xfer_get_remote_user(xfer));
+ purple_contact_info_get_username(info)); + gtk_label_set_text(GTK_LABEL(dialog->remote_user_label), + purple_xfer_get_remote_user(xfer)); gtk_label_set_text(GTK_LABEL(dialog->protocol_label),
- purple_account_get_protocol_name(purple_xfer_get_account(xfer)));
+ purple_account_get_protocol_name(account)); if (purple_xfer_get_xfer_type(xfer) == PURPLE_XFER_TYPE_RECEIVE) {
gtk_label_set_text(GTK_LABEL(dialog->filename_label),
--- a/pidgin/pidginaccountchooser.c Mon Dec 12 00:47:54 2022 -0600
+++ b/pidgin/pidginaccountchooser.c Mon Dec 12 00:57:49 2022 -0600
@@ -67,22 +67,23 @@
G_GNUC_UNUSED gpointer data)
- const gchar *alias = NULL;
+ const char *alias = NULL; + const char *protocol_name = NULL; + const char *username = NULL; if(!PURPLE_IS_ACCOUNT(account)) {
alias = purple_account_get_private_alias(account);
+ protocol_name = purple_account_get_protocol_name(account); + username = purple_contact_info_get_username(PURPLE_CONTACT_INFO(account)); - markup = g_strdup_printf(_("%s (%s) (%s)"),
- purple_account_get_username(account),
- purple_account_get_protocol_name(account));
+ markup = g_strdup_printf(_("%s (%s) (%s)"), username, alias, - markup = g_strdup_printf(_("%s (%s)"),
- purple_account_get_username(account),
- purple_account_get_protocol_name(account));
+ markup = g_strdup_printf(_("%s (%s)"), username, protocol_name); --- a/pidgin/pidginaccounteditor.c Mon Dec 12 00:47:54 2022 -0600
+++ b/pidgin/pidginaccounteditor.c Mon Dec 12 00:57:49 2022 -0600
@@ -135,7 +135,9 @@
/* The username will be split apart below and eventually set as the text
- username = g_strdup(purple_account_get_username(editor->account));
+ PurpleContactInfo *info = PURPLE_CONTACT_INFO(editor->account); + username = g_strdup(purple_contact_info_get_username(info)); /* Filling out the user splits is a pain. If we have an account, we created
@@ -763,7 +765,9 @@
editor->account = purple_account_new(username->str, protocol_id);
- purple_account_set_username(editor->account, username->str);
+ PurpleContactInfo *info = PURPLE_CONTACT_INFO(editor->account); + purple_contact_info_set_username(info, username->str); purple_account_set_protocol_id(editor->account, protocol_id);
--- a/pidgin/pidginaccountmanager.c Mon Dec 12 00:47:54 2022 -0600
+++ b/pidgin/pidginaccountmanager.c Mon Dec 12 00:57:49 2022 -0600
@@ -114,6 +114,7 @@
+ PurpleContactInfo *info = NULL; PurpleImage *image = NULL;
PurpleProtocol *protocol = NULL;
GdkPixbuf *avatar = NULL;
@@ -140,10 +141,11 @@
protocol_name = _("Unknown");
+ info = PURPLE_CONTACT_INFO(account); gtk_list_store_set(manager->model, iter,
COLUMN_ENABLED, purple_account_get_enabled(account),
- COLUMN_USERNAME, purple_account_get_username(account),
+ COLUMN_USERNAME, purple_contact_info_get_username(info), COLUMN_PROTOCOL_ICON, protocol_icon,
COLUMN_PROTOCOL_NAME, protocol_name,
--- a/pidgin/pidginaccountsdisabledmenu.c Mon Dec 12 00:47:54 2022 -0600
+++ b/pidgin/pidginaccountsdisabledmenu.c Mon Dec 12 00:57:49 2022 -0600
@@ -100,6 +100,7 @@
PidginAccountsDisabledMenu *menu = NULL;
PurpleAccount *account = NULL;
+ PurpleContactInfo *info = NULL; PurpleProtocol *protocol = NULL;
const gchar *account_name = NULL, *protocol_name = NULL;
@@ -130,7 +131,8 @@
- account_name = purple_account_get_username(account);
+ info = PURPLE_CONTACT_INFO(account); + account_name = purple_contact_info_get_username(info); protocol_name = purple_account_get_protocol_name(account);
/* translators: This format string is intended to contain the account
@@ -145,7 +147,7 @@
g_hash_table_insert(*attributes, G_MENU_ATTRIBUTE_ACTION,
g_variant_ref_sink(value));
- value = g_variant_new_printf("%s", purple_account_get_id(account));
+ value = g_variant_new_printf("%s", purple_contact_info_get_id(info)); g_hash_table_insert(*attributes, G_MENU_ATTRIBUTE_TARGET,
g_variant_ref_sink(value));
--- a/pidgin/pidginaccountsenabledmenu.c Mon Dec 12 00:47:54 2022 -0600
+++ b/pidgin/pidginaccountsenabledmenu.c Mon Dec 12 00:57:49 2022 -0600
@@ -190,7 +190,7 @@
- account_name = purple_account_get_username(account);
+ account_name = purple_contact_info_get_username(PURPLE_CONTACT_INFO(account)); /* Get the protocol from the account. */
protocol = purple_account_get_protocol(account);
@@ -240,7 +240,7 @@
- account_id = purple_account_get_id(account);
+ account_id = purple_contact_info_get_id(PURPLE_CONTACT_INFO(account)); connection = purple_account_get_connection(account);
if(PURPLE_IS_CONNECTION(connection)) {
--- a/pidgin/plugins/disco/gtkdisco.c Mon Dec 12 00:47:54 2022 -0600
+++ b/pidgin/plugins/disco/gtkdisco.c Mon Dec 12 00:57:49 2022 -0600
@@ -206,6 +206,7 @@
PidginDiscoDialog *dialog = data;
+ PurpleContactInfo *info = NULL; @@ -234,7 +235,8 @@
gtk_widget_set_sensitive(dialog->account_chooser, FALSE);
- username = purple_account_get_username(dialog->account);
+ info = PURPLE_CONTACT_INFO(dialog->account); + username = purple_contact_info_get_username(info); at = strchr(username, '@');
slash = strchr(username, '/');
--- a/pidgin/plugins/unity/unity.c Mon Dec 12 00:47:54 2022 -0600
+++ b/pidgin/plugins/unity/unity.c Mon Dec 12 00:57:49 2022 -0600
@@ -89,12 +89,20 @@
conversation_id(PurpleConversation *conv)
PurpleAccount *account = purple_conversation_get_account(conv);
+ PurpleContactInfo *info = PURPLE_CONTACT_INFO(account); + const char *type = "misc"; - return g_strconcat((PURPLE_IS_IM_CONVERSATION(conv) ? "im" :
- PURPLE_IS_CHAT_CONVERSATION(conv) ? "chat" : "misc"), ":",
- purple_conversation_get_name(conv), ":",
- purple_account_get_username(account), ":",
- purple_account_get_protocol_id(account), NULL);
+ if(PURPLE_IS_IM_CONVERSATION(conv)) { + } else if(PURPLE_IS_CHAT_CONVERSATION(conv)) { + return g_strdup_printf("%s:%s:%s:%s", + purple_conversation_get_name(conv), + purple_contact_info_get_username(info), + purple_account_get_protocol_id(account));