--- a/ChangeLog.API Tue Aug 23 02:01:50 2022 -0500
+++ b/ChangeLog.API Tue Aug 23 02:25:05 2022 -0500
@@ -927,6 +927,8 @@
* pidgin_conversations_fill_menu
* pidgin_conversations_get_unseen_all
* pidgin_create_dialog, use pidgin_dialog_new instead.
+ * pidgin_create_icon_from_protocol + * pidgin_create_protocol_icon * pidgin_create_small_button, use pidgin_close_button_new instead.
* pidgin_create_status_icon
* pidgin_create_window, use pidgin_window_new instead.
--- a/pidgin/gtkblist.c Tue Aug 23 02:01:50 2022 -0500
+++ b/pidgin/gtkblist.c Tue Aug 23 02:25:05 2022 -0500
@@ -89,7 +89,7 @@
+ PROTOCOL_ICON_NAME_COLUMN, @@ -1897,18 +1897,17 @@
add_tip_for_account(GtkWidget *grid, gint row, PurpleAccount *account)
- GdkPixbuf *protocol_icon = NULL;
+ PurpleProtocol *protocol = NULL;
- protocol_icon = pidgin_create_protocol_icon(account, PIDGIN_PROTOCOL_ICON_SMALL);
- if (purple_account_is_disconnected(account)) {
- gdk_pixbuf_saturate_and_pixelate(protocol_icon, protocol_icon, 0.0, FALSE);
- image = gtk_image_new_from_pixbuf(protocol_icon);
+ const gchar *icon_name = NULL; + protocol = purple_account_get_protocol(account); + icon_name = purple_protocol_get_icon_name(protocol); + image = gtk_image_new_from_icon_name(icon_name); gtk_image_set_pixel_size(GTK_IMAGE(image), STATUS_SIZE);
gtk_grid_attach(GTK_GRID(grid), image, 0, row, 1, 1);
- g_clear_object(&protocol_icon);
name = gtk_label_new(purple_account_get_username(account));
gtk_label_set_xalign(GTK_LABEL(name), 0);
@@ -1965,13 +1964,13 @@
gtk_grid_attach(GTK_GRID(grid), name, 1, row, 1, 1);
- GdkPixbuf *protocol_icon = pidgin_create_protocol_icon(
- account, PIDGIN_PROTOCOL_ICON_SMALL);
- image = gtk_image_new_from_pixbuf(protocol_icon);
+ PurpleProtocol *protocol = purple_account_get_protocol(account); + const gchar *icon_name = purple_protocol_get_icon_name(protocol); + image = gtk_image_new_from_icon_name(icon_name); gtk_image_set_pixel_size(GTK_IMAGE(image), STATUS_SIZE);
gtk_widget_set_halign(image, GTK_ALIGN_END);
gtk_grid_attach(GTK_GRID(grid), image, 2, row, 1, 1);
- g_clear_object(&protocol_icon);
tooltip_text = pidgin_get_tooltip_text(node, full);
@@ -1986,12 +1985,6 @@
avatar = pidgin_blist_get_buddy_icon(node, !full, FALSE);
-#if 0 /* Protocol Icon as avatar */
- avatar = pidgin_create_protocol_icon(account, PIDGIN_PROTOCOL_ICON_LARGE);
avatar_image = gtk_image_new_from_pixbuf(avatar);
gtk_widget_set_halign(avatar_image, GTK_ALIGN_END);
@@ -2980,7 +2973,7 @@
rend = gtk_cell_renderer_pixbuf_new();
gtk_tree_view_column_pack_start(column, rend, FALSE);
gtk_tree_view_column_set_attributes(column, rend,
- "pixbuf", PROTOCOL_ICON_COLUMN,
+ "icon-name", PROTOCOL_ICON_NAME_COLUMN, g_object_set(rend, "xalign", 0.0, "xpad", 3, "ypad", 0, NULL);
@@ -3097,7 +3090,7 @@
G_TYPE_POINTER, /* Node */
GDK_TYPE_PIXBUF, /* Emblem */
G_TYPE_BOOLEAN, /* Emblem visible */
- GDK_TYPE_PIXBUF /* Protocol icon */
+ G_TYPE_STRING /* Protocol icon */ gtkblist->treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(gtkblist->treemodel));
@@ -3469,10 +3462,12 @@
static void buddy_node(PurpleBuddy *buddy, GtkTreeIter *iter, PurpleBlistNode *node)
PurplePresence *presence = purple_buddy_get_presence(buddy);
- GdkPixbuf *status, *avatar, *emblem, *protocol_icon;
+ PurpleProtocol *protocol = NULL; + GdkPixbuf *status, *avatar, *emblem; gboolean selected = (gtkblist->selected_node == node);
+ const gchar *protocol_icon_name = NULL; @@ -3491,7 +3486,8 @@
emblem = pidgin_blist_get_emblem(PURPLE_BLIST_NODE(buddy));
mark = pidgin_blist_get_name_markup(buddy, selected, TRUE);
- protocol_icon = pidgin_create_protocol_icon(purple_buddy_get_account(buddy), PIDGIN_PROTOCOL_ICON_SMALL);
+ protocol = purple_account_get_protocol(purple_buddy_get_account(buddy)); + protocol_icon_name = purple_protocol_get_icon_name(protocol); gtk_tree_store_set(gtkblist->treemodel, iter,
STATUS_ICON_COLUMN, status,
@@ -3500,7 +3496,7 @@
BUDDY_ICON_COLUMN, avatar,
EMBLEM_VISIBLE_COLUMN, (emblem != NULL),
- PROTOCOL_ICON_COLUMN, protocol_icon,
+ PROTOCOL_ICON_NAME_COLUMN, protocol_icon_name, @@ -3511,8 +3507,6 @@
- g_object_unref(protocol_icon);
/* This is a variation on the original gtk_blist_update_contact. Here we
@@ -3627,12 +3621,14 @@
chat = (PurpleChat*)node;
if(purple_account_is_connected(purple_chat_get_account(chat))) {
+ PurpleProtocol *protocol = NULL; - GdkPixbuf *status, *avatar, *emblem, *protocol_icon;
+ GdkPixbuf *status, *avatar, *emblem; const gchar *color = NULL;
gboolean selected = (gtkblist->selected_node == node);
gboolean nick_said = FALSE;
+ const gchar *protocol_icon_name = NULL; if (!insert_node(list, node, &iter))
@@ -3654,7 +3650,8 @@
- protocol_icon = pidgin_create_protocol_icon(purple_chat_get_account(chat), PIDGIN_PROTOCOL_ICON_SMALL);
+ protocol = purple_account_get_protocol(purple_chat_get_account(chat)); + protocol_icon_name = purple_protocol_get_icon_name(protocol); gtk_tree_store_set(gtkblist->treemodel, &iter,
STATUS_ICON_COLUMN, status,
@@ -3662,7 +3659,7 @@
BUDDY_ICON_COLUMN, avatar,
EMBLEM_VISIBLE_COLUMN, emblem != NULL,
- PROTOCOL_ICON_COLUMN, protocol_icon,
+ PROTOCOL_ICON_NAME_COLUMN, protocol_icon_name, @@ -3673,9 +3670,6 @@
- g_object_unref(protocol_icon);
pidgin_blist_hide_node(list, node, TRUE);
--- a/pidgin/gtknotify.c Tue Aug 23 02:01:50 2022 -0500
+++ b/pidgin/gtknotify.c Tue Aug 23 02:25:05 2022 -0500
@@ -111,15 +111,17 @@
pidgin_widget_decorate_account(GtkWidget *cont, PurpleAccount *account)
+ PurpleProtocol *protocol = NULL;
+ const gchar *icon_name = NULL; - pixbuf = pidgin_create_protocol_icon(account, PIDGIN_PROTOCOL_ICON_SMALL);
- image = gtk_image_new_from_pixbuf(pixbuf);
- g_object_unref(G_OBJECT(pixbuf));
+ 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));
@@ -322,20 +324,22 @@
PidginNotifySearchResultsData *data = data_;
+ PurpleProtocol *protocol = NULL; GtkListStore *model = data->model;
+ const gchar *icon_name = NULL; gtk_list_store_clear(data->model);
- pixbuf = pidgin_create_protocol_icon(purple_connection_get_account(gc), PIDGIN_PROTOCOL_ICON_SMALL);
+ protocol = purple_account_get_protocol(purple_connection_get_account(gc)); + icon_name = purple_protocol_get_icon_name(protocol); for (row = results->rows; row != NULL; row = row->next) {
gtk_list_store_append(model, &iter);
- gtk_list_store_set(model, &iter, 0, pixbuf, -1);
+ gtk_list_store_set(model, &iter, 0, icon_name, -1); for (column = row->data; column != NULL; column = column->next) {
@@ -348,9 +352,6 @@
- g_object_unref(pixbuf);
@@ -443,7 +444,7 @@
renderer = gtk_cell_renderer_pixbuf_new();
gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(treeview),
- -1, "", renderer, "pixbuf", 0, NULL);
+ -1, "", renderer, "icon-name", 0, NULL); for (columniter = results->columns; columniter != NULL; columniter = columniter->next) {
--- a/pidgin/pidginaccountstore.c Tue Aug 23 02:01:50 2022 -0500
+++ b/pidgin/pidginaccountstore.c Tue Aug 23 02:25:05 2022 -0500
@@ -37,12 +37,14 @@
pidgin_account_store_add_account(PidginAccountStore *store,
+ PurpleProtocol *protocol = NULL; GdkPixbuf *pixbuf = NULL;
- const gchar *alias = NULL;
+ const gchar *alias = NULL, *icon_name = NULL; - pixbuf = pidgin_create_protocol_icon(account, PIDGIN_PROTOCOL_ICON_SMALL);
+ protocol = purple_account_get_protocol(account); + icon_name = purple_protocol_get_icon_name(protocol); alias = purple_account_get_private_alias(account);
@@ -62,11 +64,10 @@
PIDGIN_ACCOUNT_STORE_COLUMN_ACCOUNT, account,
PIDGIN_ACCOUNT_STORE_COLUMN_MARKUP, markup,
- PIDGIN_ACCOUNT_STORE_COLUMN_ICON, pixbuf,
+ PIDGIN_ACCOUNT_STORE_COLUMN_ICON_NAME, icon_name, - g_clear_object(&pixbuf);
@@ -150,7 +151,7 @@
GType types[PIDGIN_ACCOUNT_STORE_N_COLUMNS] = {
gtk_list_store_set_column_types(