--- a/pidgin/gtkblist.c Sun Feb 07 01:42:09 2021 -0600
+++ b/pidgin/gtkblist.c Fri Feb 12 00:17:08 2021 -0600
@@ -36,8 +36,6 @@
#include "gtkstatusbox.h"
#include "gtkscrollbook.h"
-#include "gtkblist-theme.h"
-#include "gtkblist-theme-loader.h"
#include "pidgin/minidialog.h"
#include "pidgin/pidginaccountchooser.h"
@@ -116,8 +114,6 @@
PidginMiniDialog *signed_on_elsewhere;
- PidginBlistTheme *current_theme;
guint select_notebook_page_timeout;
@@ -3788,28 +3784,10 @@
-theme_font_get_color_default(PidginThemeFont *font, const char *def)
- if (!font || !(ret = pidgin_theme_font_get_color_describe(font)))
-theme_font_get_face_default(PidginThemeFont *font, const char *def)
- if (!font || !(ret = pidgin_theme_font_get_font_face(font)))
pidgin_blist_get_name_markup(PurpleBuddy *b, gboolean selected, gboolean aliased)
- const char *name, *name_color, *name_font, *status_color, *status_font, *dim_grey;
+ const char *name, *status_color, *dim_grey; PurpleProtocol *protocol = NULL;
@@ -3819,8 +3797,6 @@
PurpleConversation *conv = find_conversation_with_buddy(b);
gboolean hidden_conv = FALSE;
gboolean biglist = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons");
- PidginThemeFont *statusfont = NULL, *namefont = NULL;
- PidginBlistTheme *theme;
@@ -3909,50 +3885,18 @@
- /* choose the colors of the text */
- theme = pidgin_blist_get_theme();
dim_grey = pidgin_style_context_is_dark() ? "light slate grey" : "dim grey";
- if (purple_presence_is_idle(presence)) {
- namefont = statusfont = pidgin_blist_theme_get_idle_text_info(theme);
- } else if (!purple_presence_is_online(presence)) {
- namefont = pidgin_blist_theme_get_offline_text_info(theme);
- statusfont = pidgin_blist_theme_get_status_text_info(theme);
- } else if (purple_presence_is_available(presence)) {
- namefont = pidgin_blist_theme_get_online_text_info(theme);
- statusfont = pidgin_blist_theme_get_status_text_info(theme);
- namefont = pidgin_blist_theme_get_away_text_info(theme);
- statusfont = pidgin_blist_theme_get_status_text_info(theme);
+ if(purple_presence_is_idle(presence) || + !purple_presence_is_online(presence)) + status_color = dim_grey;
- && (purple_presence_is_idle(presence)
- || !purple_presence_is_online(presence)))
- name_color = theme_font_get_color_default(namefont, name_color);
- name_font = theme_font_get_face_default(namefont, "");
- status_color = theme_font_get_color_default(statusfont, dim_grey);
- status_font = theme_font_get_face_default(statusfont, "");
- if (aliased && selected) {
- status_color = "black";
+ if(aliased && selected) { @@ -3964,36 +3908,22 @@
/* Put it all together */
if ((!aliased || biglist) && (statustext || idletime)) {
/* using <span size='smaller'> breaks the status, so it must be seperated into <small><span>*/
- text = g_strdup_printf("<span font_desc='%s' foreground='%s'>%s</span>\n"
- "<small><span font_desc='%s' foreground='%s'>%s%s%s</span></small>",
- name_font, name_color, nametext, status_font, status_color,
- idletime != NULL ? idletime : "",
- (idletime != NULL && statustext != NULL) ? " - " : "",
- statustext != NULL ? statustext : "");
- } else if (status_color) {
- text = g_strdup_printf("<span font_desc='%s'>%s</span>\n"
- "<small><span font_desc='%s' foreground='%s'>%s%s%s</span></small>",
- name_font, nametext, status_font, status_color,
+ text = g_strdup_printf("<span foreground='%s'>%s</span>\n" + "<small><span foreground='%s'>%s%s%s</span></small>", + status_color, nametext, status_color, idletime != NULL ? idletime : "",
(idletime != NULL && statustext != NULL) ? " - " : "",
statustext != NULL ? statustext : "");
- text = g_strdup_printf("<span font_desc='%s'>%s</span>\n"
- "<small><span font_desc='%s'>%s%s%s</span></small>",
- name_font, nametext, status_font,
+ text = g_strdup_printf("%s\n<small>%s%s%s</small>", idletime != NULL ? idletime : "",
(idletime != NULL && statustext != NULL) ? " - " : "",
statustext != NULL ? statustext : "");
- text = g_strdup_printf("<span font_desc='%s' color='%s'>%s</span>",
- name_font, name_color, nametext);
- text = g_strdup_printf("<span font_desc='%s'>%s</span>", name_font,
+ text = g_strdup_printf("%s", nametext); @@ -5035,22 +4965,12 @@
pidgin_blist_build_layout(PurpleBuddyList *list)
GtkTreeViewColumn *column;
- PidginBlistLayout *layout;
- PidginBlistTheme *theme;
gint i, status_icon = 0, text = 1, emblem = 2, protocol_icon = 3, buddy_icon = 4;
column = gtkblist->text_column;
- if ((theme = pidgin_blist_get_theme()) != NULL && (layout = pidgin_blist_theme_get_layout(theme)) != NULL) {
- status_icon = layout->status_icon ;
- emblem = layout->emblem;
- protocol_icon = layout->protocol_icon;
- buddy_icon = layout->buddy_icon;
gtk_tree_view_column_clear(column);
@@ -5204,7 +5124,6 @@
- const char *theme_name;
GtkTreeSelection *selection;
GtkTargetEntry dte[] = {{"PURPLE_BLIST_NODE", GTK_TARGET_SAME_APP, DRAG_ROW},
{"application/x-im-contact", 0, DRAG_BUDDY},
@@ -5222,15 +5141,6 @@
gtkblist = PIDGIN_BUDDY_LIST(list);
priv = pidgin_buddy_list_get_instance_private(gtkblist);
- if (priv->current_theme)
- g_object_unref(priv->current_theme);
- theme_name = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/blist/theme");
- if (theme_name && *theme_name)
- priv->current_theme = g_object_ref(PIDGIN_BLIST_THEME(purple_theme_manager_find_theme(theme_name, "blist")));
- priv->current_theme = NULL;
gtkblist->empty_avatar = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, 32, 32);
gdk_pixbuf_fill(gtkblist->empty_avatar, 0x00000000);
@@ -5757,18 +5667,10 @@
GdkPixbuf *avatar = NULL;
- PidginBlistTheme *theme = NULL;
if(!insert_node(list, gnode, &iter))
- if ((theme = pidgin_blist_get_theme()) == NULL)
- else if (purple_blist_node_get_bool(gnode, "collapsed") || count <= 0)
- bgcolor = pidgin_blist_theme_get_collapsed_background_color(theme);
- bgcolor = pidgin_blist_theme_get_expanded_background_color(theme);
path = gtk_tree_model_get_path(GTK_TREE_MODEL(gtkblist->treemodel), &iter);
expanded = gtk_tree_view_row_expanded(GTK_TREE_VIEW(gtkblist->treeview), path);
gtk_tree_path_free(path);
@@ -5803,14 +5705,10 @@
static char *pidgin_get_group_title(PurpleBlistNode *gnode, gboolean expanded)
char group_count[12] = "";
PurpleBlistNode *selected_node = NULL;
- gchar const *text_color, *text_font;
- PidginBlistTheme *theme;
group = (PurpleGroup*)gnode;
@@ -5818,7 +5716,6 @@
gtk_tree_model_get(GTK_TREE_MODEL(gtkblist->treemodel), &iter,
NODE_COLUMN, &selected_node, -1);
- selected = (gnode == selected_node);
g_snprintf(group_count, sizeof(group_count), "%d/%d",
@@ -5826,33 +5723,13 @@
purple_counting_node_get_current_size(PURPLE_COUNTING_NODE(group)));
- theme = pidgin_blist_get_theme();
- pair = pidgin_blist_theme_get_expanded_text_info(theme);
- pair = pidgin_blist_theme_get_collapsed_text_info(theme);
- text_color = selected ? NULL : theme_font_get_color_default(pair, NULL);
- text_font = theme_font_get_face_default(pair, "");
esc = g_markup_escape_text(purple_group_get_name(group), -1);
- mark = g_strdup_printf("<span foreground='%s' font_desc='%s'><b>%s</b>%s%s%s</span>",
- !expanded ? " <span weight='light'>(</span>" : "",
- !expanded ? "<span weight='light'>)</span>" : "");
- mark = g_strdup_printf("<span font_desc='%s'><b>%s</b>%s%s%s</span>",
- text_font, esc ? esc : "",
- !expanded ? " <span weight='light'>(</span>" : "",
- !expanded ? "<span weight='light'>)</span>" : "");
+ mark = g_strdup_printf("<span><b>%s</b>%s%s%s</span>", + !expanded ? " <span weight='light'>(</span>" : "", + !expanded ? "<span weight='light'>)</span>" : ""); @@ -5868,7 +5745,6 @@
gboolean selected = (gtkblist->selected_node == node);
gboolean biglist = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons");
- PidginBlistTheme *theme;
@@ -5895,8 +5771,6 @@
emblem = pidgin_blist_get_emblem(PURPLE_BLIST_NODE(buddy));
mark = pidgin_blist_get_name_markup(buddy, selected, TRUE);
- theme = pidgin_blist_get_theme();
if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_idle_time") &&
purple_presence_is_idle(presence) && !biglist)
@@ -5904,7 +5778,6 @@
- PidginThemeFont *pair = NULL;
@@ -5913,31 +5786,23 @@
ihrs = (t - idle_secs) / 3600;
imin = ((t - idle_secs) / 60) % 60;
- else if (theme != NULL && (pair = pidgin_blist_theme_get_idle_text_info(theme)) != NULL)
- textcolor = pidgin_theme_font_get_color_describe(pair);
- /* If no theme them default to making idle buddy names grey */
textcolor = pidgin_style_context_is_dark() ? "light slate grey" : "dim grey";
- idle = g_strdup_printf("<span color='%s' font_desc='%s'>%d:%02d</span>",
- textcolor, theme_font_get_face_default(pair, ""),
+ idle = g_strdup_printf("<span color='%s'>%d:%02d</span>", + textcolor, ihrs, imin); - idle = g_strdup_printf("<span font_desc='%s'>%d:%02d</span>",
- theme_font_get_face_default(pair, ""),
+ idle = g_strdup_printf("<span>%d:%02d</span>", ihrs, imin); protocol_icon = pidgin_create_protocol_icon(purple_buddy_get_account(buddy), PIDGIN_PROTOCOL_ICON_SMALL);
- color = pidgin_blist_theme_get_contact_color(theme);
gtk_tree_store_set(gtkblist->treemodel, iter,
STATUS_ICON_COLUMN, status,
STATUS_ICON_VISIBLE_COLUMN, TRUE,
@@ -6009,32 +5874,10 @@
if(gtknode->contact_expanded) {
- const gchar *fg_color, *font;
- PidginBlistTheme *theme;
- gboolean selected = (gtkblist->selected_node == cnode);
mark = g_markup_escape_text(purple_contact_get_alias(contact), -1);
- theme = pidgin_blist_get_theme();
- pair = pidgin_blist_theme_get_contact_text_info(theme);
- color = pidgin_blist_theme_get_contact_color(theme);
- font = theme_font_get_face_default(pair, "");
- fg_color = selected ? NULL : theme_font_get_color_default(pair, NULL);
- tmp = g_strdup_printf("<span font_desc='%s' color='%s'>%s</span>",
- tmp = g_strdup_printf("<span font_desc='%s'>%s</span>", font,
+ tmp = g_strdup_printf("<span>%s</span>", mark); @@ -6115,7 +5958,7 @@
if(purple_account_is_connected(purple_chat_get_account(chat))) {
GdkPixbuf *status, *avatar, *emblem, *protocol_icon;
- const gchar *color, *font;
+ const gchar *color = NULL; gboolean showicons = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons");
gboolean biglist = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons");
@@ -6123,8 +5966,6 @@
PurpleConversation *conv;
- PidginBlistTheme *theme;
gboolean selected = (gtkblist->selected_node == node);
gboolean nick_said = FALSE;
@@ -6150,37 +5991,23 @@
mark = g_markup_escape_text(purple_chat_get_name(chat), -1);
- theme = pidgin_blist_get_theme();
- pair = pidgin_blist_theme_get_unread_message_nick_said_text_info(theme);
- pair = pidgin_blist_theme_get_unread_message_text_info(theme);
- else pair = pidgin_blist_theme_get_online_text_info(theme);
- font = theme_font_get_face_default(pair, "");
- if (selected || !(color = theme_font_get_color_default(pair, NULL)))
/* nick_said color is the same as gtkconv:tab-label-attention */
color = (nick_said ? "#006aff" : NULL);
- tmp = g_strdup_printf("<span font_desc='%s' color='%s' weight='%s'>%s</span>",
- font, color, hidden ? "bold" : "normal", mark);
+ tmp = g_strdup_printf("<span color='%s' weight='%s'>%s</span>", + color, hidden ? "bold" : "normal", mark); - tmp = g_strdup_printf("<span font_desc='%s' weight='%s'>%s</span>",
- font, hidden ? "bold" : "normal", mark);
+ tmp = g_strdup_printf("<span weight='%s'>%s</span>", + hidden ? "bold" : "normal", mark); protocol_icon = pidgin_create_protocol_icon(purple_chat_get_account(chat), PIDGIN_PROTOCOL_ICON_SMALL);
- bgcolor = pidgin_blist_theme_get_contact_color(theme);
gtk_tree_store_set(gtkblist->treemodel, &iter,
STATUS_ICON_COLUMN, status,
STATUS_ICON_VISIBLE_COLUMN, TRUE,
@@ -6799,39 +6626,6 @@
-pidgin_blist_set_theme(PidginBlistTheme *theme)
- PidginBuddyListPrivate *priv =
- pidgin_buddy_list_get_instance_private(gtkblist);
- PurpleBuddyList *list = purple_blist_get_default();
- purple_prefs_set_string(PIDGIN_PREFS_ROOT "/blist/theme",
- purple_theme_get_name(PURPLE_THEME(theme)));
- purple_prefs_set_string(PIDGIN_PREFS_ROOT "/blist/theme", "");
- if (priv->current_theme)
- g_object_unref(priv->current_theme);
- priv->current_theme = theme ? g_object_ref(theme) : NULL;
- pidgin_blist_build_layout(list);
- pidgin_blist_refresh(list);
-pidgin_blist_get_theme()
- PidginBuddyListPrivate *priv =
- pidgin_buddy_list_get_instance_private(gtkblist);
- return priv->current_theme;
void pidgin_blist_init(void)
void *gtk_blist_handle = pidgin_blist_get_handle();
@@ -6852,8 +6646,6 @@
purple_prefs_add_int(PIDGIN_PREFS_ROOT "/blist/height", 405); /* Golden ratio, baby */
purple_prefs_add_string(PIDGIN_PREFS_ROOT "/blist/theme", "");
- purple_theme_manager_register_type(g_object_new(PIDGIN_TYPE_BLIST_THEME_LOADER, "type", "blist", NULL));
/* Register our signals */
purple_signal_register(gtk_blist_handle, "gtkblist-hiding",
purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
@@ -6937,7 +6729,6 @@
g_clear_object(>kblist->treemodel);
g_object_unref(G_OBJECT(gtkblist->empty_avatar));
- g_clear_object(&priv->current_theme);
if (priv->select_notebook_page_timeout) {
g_source_remove(priv->select_notebook_page_timeout);
--- a/pidgin/gtkprefs.c Sun Feb 07 01:42:09 2021 -0600
+++ b/pidgin/gtkprefs.c Fri Feb 12 00:17:08 2021 -0600
@@ -204,7 +204,6 @@
@@ -238,12 +237,10 @@
static PidginPrefsWindow *prefs = NULL;
-static GtkWidget *prefs_blist_themes_combo_box;
static GtkWidget *prefs_status_themes_combo_box;
static GtkWidget *prefs_smiley_themes_combo_box;
/* These exist outside the lifetime of the prefs dialog */
-static GtkListStore *prefs_blist_themes;
static GtkListStore *prefs_status_icon_themes;
static GtkListStore *prefs_smiley_themes;
@@ -852,7 +849,6 @@
purple_prefs_disconnect_by_handle(prefs);
- prefs_blist_themes_combo_box = NULL;
prefs_status_themes_combo_box = NULL;
prefs_smiley_themes_combo_box = NULL;
@@ -915,13 +911,10 @@
gchar *image_full = NULL, *markup;
const gchar *name, *author, *description;
- if (PIDGIN_IS_BLIST_THEME(theme) || PIDGIN_IS_STATUS_ICON_THEME(theme)){
+ if (PIDGIN_IS_STATUS_ICON_THEME(theme)){ - if (PIDGIN_IS_BLIST_THEME(theme))
- store = prefs_blist_themes;
- store = prefs_status_icon_themes;
+ store = prefs_status_icon_themes; image_full = purple_theme_get_image_full(theme);
@@ -985,14 +978,6 @@
pixbuf = pidgin_pixbuf_new_from_file_at_scale(tmp, PREFS_OPTIMAL_ICON_SIZE, PREFS_OPTIMAL_ICON_SIZE, TRUE);
- gtk_list_store_clear(prefs_blist_themes);
- gtk_list_store_append(prefs_blist_themes, &iter);
- tmp = get_theme_markup(_("Default"), FALSE, _("Penguin Pimps"),
- _("The default Pidgin buddy list theme"));
- gtk_list_store_set(prefs_blist_themes, &iter, 0, pixbuf, 1, tmp, 2, "", -1);
gtk_list_store_clear(prefs_status_icon_themes);
gtk_list_store_append(prefs_status_icon_themes, &iter);
@@ -1010,7 +995,6 @@
smileys_refresh_theme_list();
- prefs_set_active_theme_combo(prefs_blist_themes_combo_box, prefs_blist_themes, purple_prefs_get_string(PIDGIN_PREFS_ROOT "/blist/theme"));
prefs_set_active_theme_combo(prefs_status_themes_combo_box, prefs_status_icon_themes, purple_prefs_get_string(PIDGIN_PREFS_ROOT "/status/icon-theme"));
prefs_set_active_theme_combo(prefs_smiley_themes_combo_box, prefs_smiley_themes, purple_prefs_get_string(PIDGIN_PREFS_ROOT "/smileys/theme"));
@@ -1019,8 +1003,6 @@
- prefs_blist_themes = gtk_list_store_new(3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING);
prefs_status_icon_themes = gtk_list_store_new(3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING);
prefs_smiley_themes = gtk_list_store_new(3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING);
@@ -1431,27 +1413,6 @@
-/* sets the current buddy list theme */
-prefs_set_blist_theme_cb(GtkComboBox *combo_box, gpointer user_data)
- PidginBlistTheme *theme = NULL;
- if(gtk_combo_box_get_active_iter(combo_box, &iter)) {
- gtk_tree_model_get(GTK_TREE_MODEL(prefs_blist_themes), &iter, 2, &name, -1);
- theme = PIDGIN_BLIST_THEME(purple_theme_manager_find_theme(name, "blist"));
- pidgin_blist_set_theme(theme);
/* sets the current icon theme */
prefs_set_status_icon_theme_cb(GtkComboBox *combo_box, gpointer user_data)
@@ -1477,11 +1438,6 @@
bind_theme_page(PidginPrefsWindow *win)
- /* Buddy List Themes */
- prefs_build_theme_combo_box(win->theme.blist, prefs_blist_themes,
- PIDGIN_PREFS_ROOT "/blist/theme", "blist");
- prefs_blist_themes_combo_box = win->theme.blist;
prefs_build_theme_combo_box(win->theme.status, prefs_status_icon_themes,
PIDGIN_PREFS_ROOT "/status/icon-theme",
@@ -2971,14 +2927,10 @@
gtk_widget_class_bind_template_child(
- widget_class, PidginPrefsWindow, theme.blist);
- gtk_widget_class_bind_template_child(
widget_class, PidginPrefsWindow, theme.status);
gtk_widget_class_bind_template_child(
widget_class, PidginPrefsWindow, theme.smiley);
gtk_widget_class_bind_template_callback(widget_class,
- prefs_set_blist_theme_cb);
- gtk_widget_class_bind_template_callback(widget_class,
prefs_set_status_icon_theme_cb);
gtk_widget_class_bind_template_callback(widget_class,
prefs_set_smiley_theme_cb);