# HG changeset patch # User Justin Rodriguez # Date 1215672585 0 # Node ID 1242a922a4bc1f67f6f25ac0020590a761cb2cdd # Parent 331a7a69d955ba433a2faf1c6d20822a69fe9b23 start of blist themes (themes have no effect on display) diff -r 331a7a69d955 -r 1242a922a4bc pidgin/Makefile.am --- a/pidgin/Makefile.am Sun Jul 06 05:57:26 2008 +0000 +++ b/pidgin/Makefile.am Thu Jul 10 06:49:45 2008 +0000 @@ -78,6 +78,8 @@ pidginstock.c \ gtkaccount.c \ gtkblist.c \ + gtkblist-loader.c \ + gtkblist-theme.c \ gtkcelllayout.c \ gtkcellrendererexpander.c \ gtkcellrendererprogress.c \ @@ -127,6 +129,8 @@ eggtrayicon.h \ gtkaccount.h \ gtkblist.h \ + gtkblist-loader.h \ + gtkblist-theme.h \ gtkcelllayout.h \ gtkcellrendererexpander.h \ gtkcellrendererprogress.h \ diff -r 331a7a69d955 -r 1242a922a4bc pidgin/gtkblist-loader.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/gtkblist-loader.c Thu Jul 10 06:49:45 2008 +0000 @@ -0,0 +1,115 @@ +/* + * GTKBlistThemeLoader for 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 "gtkblist-loader.h" +#include "gtkblist-theme.h" + +/****************************************************************************** + * Globals + *****************************************************************************/ +/***************************************************************************** + * Sound Theme Builder + *****************************************************************************/ + +static gpointer +pidgin_buddy_list_loader_build(const gchar *dir) +{ + xmlnode *root_node, *sub_node; + gchar *filename, *filename_full, *data; + GDir *gdir; + PidginBuddyListTheme *theme; + + /* Find the theme file */ + gdir = g_dir_open(dir, 0, NULL); + g_return_val_if_fail(gdir != NULL, NULL); + + while ((filename = g_strdup(g_dir_read_name(gdir))) != NULL && ! g_str_has_suffix(filename, ".xml")) + g_free(filename); + + g_return_val_if_fail(filename != NULL, NULL); + + /* Build the xml tree */ + filename_full = g_build_filename(dir, filename, NULL); + + root_node = xmlnode_from_file(dir, filename, "sound themes", "sound-loader"); + g_return_val_if_fail(root_node != NULL, NULL); + + /* Parse the tree */ + sub_node = xmlnode_get_child(root_node, "description"); + data = xmlnode_get_data(sub_node); + + theme = g_object_new(PIDGIN_TYPE_BUDDY_LIST_THEME, + "type", "blist", + "name", xmlnode_get_attrib(root_node, "name"), + "author", xmlnode_get_attrib(root_node, "author"), + "image", xmlnode_get_attrib(root_node, "image"), + "directory", dir, + "description", data, NULL); + + xmlnode_free(sub_node); + + xmlnode_free(root_node); + g_dir_close(gdir); + g_free(filename_full); + g_free(data); + return theme; +} + +/****************************************************************************** + * GObject Stuff + *****************************************************************************/ + +static void +pidgin_buddy_list_theme_loader_class_init (PidginBuddyListThemeLoaderClass *klass) +{ + PurpleThemeLoaderClass *loader_klass = PURPLE_THEME_LOADER_CLASS(klass); + + loader_klass->purple_theme_loader_build = pidgin_buddy_list_loader_build; +} + + +GType +pidgin_buddy_list_theme_loader_get_type (void) +{ + static GType type = 0; + if (type == 0) { + static const GTypeInfo info = { + sizeof (PidginBuddyListThemeLoaderClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc)pidgin_buddy_list_theme_loader_class_init, /* class_init */ + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (PidginBuddyListThemeLoader), + 0, /* n_preallocs */ + NULL, /* instance_init */ + NULL, /* value table */ + }; + type = g_type_register_static (PURPLE_TYPE_THEME_LOADER, + "PidginBuddyListThemeLoader", + &info, 0); + } + return type; +} + + diff -r 331a7a69d955 -r 1242a922a4bc pidgin/gtkblist-loader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/gtkblist-loader.h Thu Jul 10 06:49:45 2008 +0000 @@ -0,0 +1,71 @@ +/** + * @file gtkblist-loader.h Pidgin Buddy List Theme Loader Class API + */ + +/* 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 + */ + +#ifndef _PIDGIN_BUDDY_LIST_THEME_LOADER_H_ +#define _PIDGIN_BUDDY_LIST_THEME_LOADER_H_ + +#include +#include +#include "theme-loader.h" + +/** + * A pidgin buddy list theme loader. extends PurpleThemeLoader (theme-loader.h) + * This is a class designed to build sound themes + * + * PidginBuddyListThemeLoader is a GObject. + */ +typedef struct _PidginBuddyListThemeLoader PidginBuddyListThemeLoader; +typedef struct _PidginBuddyListThemeLoaderClass PidginBuddyListThemeLoaderClass; + +#define PIDGIN_TYPE_BUDDY_LIST_THEME_LOADER (pidgin_buddy_list_theme_loader_get_type ()) +#define PIDGIN_BUDDY_LIST_THEME_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIDGIN_TYPE_BUDDY_LIST_THEME_LOADER, PidginBuddyListThemeLoader)) +#define PIDGIN_BUDDY_LIST_THEME_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIDGIN_TYPE_BUDDY_LIST_THEME_LOADER, PidginBuddyListThemeLoaderClass)) +#define PIDGIN_IS_BUDDY_LIST_THEME_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIDGIN_TYPE_BUDDY_LIST_THEME_LOADER)) +#define PIDGIN_IS_BUDDY_LIST_THEME_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIDGIN_TYPE_BUDDY_LIST_THEME_LOADER)) +#define PIDGIN_BUDDY_LIST_THEME_LOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIDGIN_TYPE_BUDDY_LIST_THEME_LOADER, PidginBuddyListThemeLoaderClass)) + +struct _PidginBuddyListThemeLoader +{ + PurpleThemeLoader parent; +}; + +struct _PidginBuddyListThemeLoaderClass +{ + PurpleThemeLoaderClass parent_class; +}; + +/**************************************************************************/ +/** @name Buddy List Theme-Loader API */ +/**************************************************************************/ +G_BEGIN_DECLS + +/** + * GObject foo. + * @internal. + */ +GType pidgin_buddy_list_theme_loader_get_type(void); + +G_END_DECLS +#endif /* _PIDGIN_BUDDY_LIST_THEME_LOADER_H_ */ diff -r 331a7a69d955 -r 1242a922a4bc pidgin/gtkblist-theme.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/gtkblist-theme.c Thu Jul 10 06:49:45 2008 +0000 @@ -0,0 +1,149 @@ +/* + * Buddy List Themes for 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 "gtkblist-theme.h" + +#define PIDGIN_BUDDY_LIST_THEME_GET_PRIVATE(Gobject) \ + ((PidginBuddyListThemePrivate *) ((PIDGIN_BUDDY_LIST_THEME(Gobject))->priv)) + + +/****************************************************************************** + * Structs + *****************************************************************************/ +typedef struct { + gchar *icon_theme; + + /* Buddy list */ + gchar *blist_color; + gdouble opacity; + + /* groups */ + gchar *expanded_bgcolor; + gchar *expanded_tcolor; + gchar *expanded_font; + + gchar *minimized_bgcolor; + gchar *minimized_tcolor; + gchar *minimized_font; + + /* buddy */ + gchar *buddy_bgcolor1; + gchar *buddy_bgcolor2; + + gint icon; + gint text; + gint status_icon; + gboolean status; + + gchar *online_font; + gchar *online_color; + + gchar *away_font; + gchar *away_color; + + gchar *offline_font; + gchar *offline_color; + + gchar *message_font; + gchar *message_color; + + gchar *status_font; + gchar *status_color; + +} PidginBuddyListThemePrivate; + +/****************************************************************************** + * Globals + *****************************************************************************/ + +static GObjectClass *parent_class = NULL; + +/****************************************************************************** + * Enums + *****************************************************************************/ + +/****************************************************************************** + * GObject Stuff + *****************************************************************************/ + +static void +pidgin_buddy_list_theme_init(GTypeInstance *instance, + gpointer klass) +{ + PidginBuddyListThemePrivate *priv; + + (PIDGIN_BUDDY_LIST_THEME(instance))->priv = g_new0(PidginBuddyListThemePrivate, 1); + + priv = PIDGIN_BUDDY_LIST_THEME_GET_PRIVATE(instance); + +} + +static void +pidgin_buddy_list_theme_finalize (GObject *obj) +{ + PidginBuddyListThemePrivate *priv; + + priv = PIDGIN_BUDDY_LIST_THEME_GET_PRIVATE(obj); + + parent_class->finalize (obj); +} + +static void +pidgin_buddy_list_theme_class_init (PidginBuddyListThemeClass *klass) +{ + GObjectClass *obj_class = G_OBJECT_CLASS(klass); + + parent_class = g_type_class_peek_parent (klass); + + obj_class->finalize = pidgin_buddy_list_theme_finalize; +} + +GType +pidgin_buddy_list_theme_get_type (void) +{ + static GType type = 0; + if (type == 0) { + static const GTypeInfo info = { + sizeof (PidginBuddyListThemeClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc)pidgin_buddy_list_theme_class_init, /* class_init */ + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (PidginBuddyListTheme), + 0, /* n_preallocs */ + pidgin_buddy_list_theme_init, /* instance_init */ + NULL, /* value table */ + }; + type = g_type_register_static (PURPLE_TYPE_THEME, + "PidginBuddyListTheme", + &info, 0); + } + return type; +} + + +/***************************************************************************** + * Public API functions + *****************************************************************************/ + diff -r 331a7a69d955 -r 1242a922a4bc pidgin/gtkblist-theme.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/gtkblist-theme.h Thu Jul 10 06:49:45 2008 +0000 @@ -0,0 +1,75 @@ +/** + * @file gtkblist-theme.h GTK+ Buddy List Theme API + */ + +/* 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 + */ + +#ifndef _PIDGIN_BUDDY_LIST_THEME_H_ +#define _PIDGIN_BUDDY_LIST_THEME_H_ + +#include +#include +#include "theme.h" +#include "sound.h" + +/** + * extends PurpleTheme (theme.h) + * A pidgin buddy list theme. + * This is an object for Purple to represent a sound theme. + * + * PidginBuddyListTheme is a PurpleTheme Object. + */ +typedef struct _PidginBuddyListTheme PidginBuddyListTheme; +typedef struct _PidginBuddyListThemeClass PidginBuddyListThemeClass; + +#define PIDGIN_TYPE_BUDDY_LIST_THEME (pidgin_buddy_list_theme_get_type ()) +#define PIDGIN_BUDDY_LIST_THEME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIDGIN_TYPE_BUDDY_LIST_THEME, PidginBuddyListTheme)) +#define PIDGIN_BUDDY_LIST_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIDGIN_TYPE_BUDDY_LIST_THEME, PidginBuddyListThemeClass)) +#define PIDGIN_IS_BUDDY_LIST_THEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIDGIN_TYPE_BUDDY_LIST_THEME)) +#define PIDGIN_IS_BUDDY_LIST_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIDGIN_TYPE_BUDDY_LIST_THEME)) +#define PIDGIN_BUDDY_LIST_THEME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIDGIN_TYPE_BUDDY_LIST_THEME, PidginBuddyListThemeClass)) + +struct _PidginBuddyListTheme +{ + PurpleTheme parent; + gpointer priv; +}; + +struct _PidginBuddyListThemeClass +{ + PurpleThemeClass parent_class; +}; + +/**************************************************************************/ +/** @name Purple Sound Theme API */ +/**************************************************************************/ +G_BEGIN_DECLS + +/** + * GObject foo. + * @internal. + */ +GType pidgin_buddy_list_theme_get_type(void); + + +G_END_DECLS +#endif /* _PIDGIN_BUDDY_LIST_THEME_H_ */ diff -r 331a7a69d955 -r 1242a922a4bc pidgin/gtkblist.c --- a/pidgin/gtkblist.c Sun Jul 06 05:57:26 2008 +0000 +++ b/pidgin/gtkblist.c Thu Jul 10 06:49:45 2008 +0000 @@ -38,6 +38,8 @@ #include "request.h" #include "signals.h" #include "pidginstock.h" +#include "theme-loader.h" +#include "theme-manager.h" #include "util.h" #include "gtkaccount.h" @@ -121,6 +123,8 @@ * is showing; @c NULL otherwise. */ PidginMiniDialog *signed_on_elsewhere; + + PidginBuddyListTheme *current_theme; } PidginBuddyListPrivate; #define PIDGIN_BUDDY_LIST_GET_PRIVATE(list) \ @@ -5255,6 +5259,8 @@ gtkblist = PIDGIN_BLIST(list); priv = PIDGIN_BUDDY_LIST_GET_PRIVATE(gtkblist); + priv->current_theme = PIDGIN_BUDDY_LIST_THEME(purple_theme_manager_find_theme(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/blist/theme"), "blist")); + gtkblist->empty_avatar = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, 32, 32); gdk_pixbuf_fill(gtkblist->empty_avatar, 0x00000000); @@ -5287,8 +5293,8 @@ gtk_item_factory_create_items(gtkblist->ift, sizeof(blist_menu) / sizeof(*blist_menu), blist_menu, NULL); pidgin_load_accels(); - g_signal_connect(G_OBJECT(accel_group), "accel-changed", - G_CALLBACK(pidgin_save_accels_cb), NULL); + g_signal_connect(G_OBJECT(accel_group), "accel-changed", G_CALLBACK(pidgin_save_accels_cb), NULL); + menu = gtk_item_factory_get_widget(gtkblist->ift, ""); gtkblist->menutray = pidgin_menu_tray_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtkblist->menutray); @@ -5438,11 +5444,13 @@ gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(gtkblist->treeview), FALSE); + /* columns */ column = gtk_tree_view_column_new(); gtk_tree_view_append_column(GTK_TREE_VIEW(gtkblist->treeview), column); gtk_tree_view_column_set_visible(column, FALSE); gtk_tree_view_set_expander_column(GTK_TREE_VIEW(gtkblist->treeview), column); + /* group */ gtkblist->text_column = column = gtk_tree_view_column_new (); rend = pidgin_cell_renderer_expander_new(); gtk_tree_view_column_pack_start(column, rend, FALSE); @@ -5455,6 +5463,7 @@ #endif NULL); + /* contact */ rend = pidgin_cell_renderer_expander_new(); gtk_tree_view_column_pack_start(column, rend, FALSE); gtk_tree_view_column_set_attributes(column, rend, @@ -5466,6 +5475,7 @@ "visible", CONTACT_EXPANDER_VISIBLE_COLUMN, NULL); + /* status icons */ rend = gtk_cell_renderer_pixbuf_new(); gtk_tree_view_column_pack_start(column, rend, FALSE); gtk_tree_view_column_set_attributes(column, rend, @@ -5477,14 +5487,15 @@ NULL); g_object_set(rend, "xalign", 0.0, "xpad", 6, "ypad", 0, NULL); + /* name */ gtkblist->text_rend = rend = gtk_cell_renderer_text_new(); gtk_tree_view_column_pack_start (column, rend, TRUE); gtk_tree_view_column_set_attributes(column, rend, #if GTK_CHECK_VERSION(2,6,0) - "cell-background-gdk", BGCOLOR_COLUMN, + "cell-background-gdk", BGCOLOR_COLUMN, #endif - "markup", NAME_COLUMN, - NULL); + "markup", NAME_COLUMN, + NULL); #if GTK_CHECK_VERSION(2,6,0) g_signal_connect(G_OBJECT(rend), "editing-started", G_CALLBACK(gtk_blist_renderer_editing_started_cb), NULL); g_signal_connect(G_OBJECT(rend), "editing-canceled", G_CALLBACK(gtk_blist_renderer_editing_cancelled_cb), list); @@ -5496,6 +5507,7 @@ #endif gtk_tree_view_append_column(GTK_TREE_VIEW(gtkblist->treeview), column); + /* idle */ rend = gtk_cell_renderer_text_new(); g_object_set(rend, "xalign", 1.0, "ypad", 0, NULL); gtk_tree_view_column_pack_start(column, rend, FALSE); @@ -5507,6 +5519,7 @@ #endif NULL); + /* emblem */ rend = gtk_cell_renderer_pixbuf_new(); g_object_set(rend, "xalign", 1.0, "yalign", 0.5, "ypad", 0, "xpad", 3, NULL); gtk_tree_view_column_pack_start(column, rend, FALSE); @@ -5516,6 +5529,7 @@ #endif "visible", EMBLEM_VISIBLE_COLUMN, NULL); + /* protocol icon */ rend = gtk_cell_renderer_pixbuf_new(); gtk_tree_view_column_pack_start(column, rend, FALSE); gtk_tree_view_column_set_attributes(column, rend, @@ -5527,6 +5541,7 @@ NULL); g_object_set(rend, "xalign", 0.0, "xpad", 3, "ypad", 0, NULL); + /* buddy icon */ rend = gtk_cell_renderer_pixbuf_new(); g_object_set(rend, "xalign", 1.0, "ypad", 0, NULL); gtk_tree_view_column_pack_start(column, rend, FALSE); @@ -5971,6 +5986,10 @@ bgcolor = gtkblist->treeview->style->bg[GTK_STATE_ACTIVE]; +/* gdk_color_parse("red", &bgcolor); + gdk_colormap_alloc_color(gdk_colormap_get_system(), &bgcolor, TRUE, FALSE); +g_print("\n\n%s\n\n", gdk_color_to_string(&bgcolor));*/ + 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); @@ -5987,7 +6006,7 @@ STATUS_ICON_COLUMN, NULL, NAME_COLUMN, title, NODE_COLUMN, gnode, - /* BGCOLOR_COLUMN, &bgcolor, */ + BGCOLOR_COLUMN, &bgcolor, GROUP_EXPANDER_COLUMN, TRUE, GROUP_EXPANDER_VISIBLE_COLUMN, TRUE, CONTACT_EXPANDER_VISIBLE_COLUMN, FALSE, @@ -7159,6 +7178,25 @@ (GSourceFunc)buddy_signonoff_timeout_cb, buddy); } +void +pidgin_blist_set_theme(PidginBuddyListTheme *theme) +{ + PidginBuddyListPrivate *priv = PIDGIN_BUDDY_LIST_GET_PRIVATE(gtkblist); + + g_return_if_fail(PIDGIN_IS_BUDDY_LIST_THEME(theme)); + + priv->current_theme = theme; +} + + +PidginBuddyListTheme * +pidgin_blist_get_theme() +{ + PidginBuddyListPrivate *priv = PIDGIN_BUDDY_LIST_GET_PRIVATE(gtkblist); + + return priv->current_theme; +} + void pidgin_blist_init(void) { void *gtk_blist_handle = pidgin_blist_get_handle(); @@ -7184,6 +7222,7 @@ purple_prefs_add_int(PIDGIN_PREFS_ROOT "/blist/width", 250); /* Golden ratio, baby */ purple_prefs_add_int(PIDGIN_PREFS_ROOT "/blist/height", 405); /* Golden ratio, baby */ purple_prefs_add_int(PIDGIN_PREFS_ROOT "/blist/tooltip_delay", 500); + purple_prefs_add_string(PIDGIN_PREFS_ROOT "/blist/theme", ""); /* Register our signals */ purple_signal_register(gtk_blist_handle, "gtkblist-hiding", diff -r 331a7a69d955 -r 1242a922a4bc pidgin/gtkblist.h --- a/pidgin/gtkblist.h Sun Jul 06 05:57:26 2008 +0000 +++ b/pidgin/gtkblist.h Thu Jul 10 06:49:45 2008 +0000 @@ -59,6 +59,7 @@ #include "pidgin.h" #include "blist.h" +#include "gtkblist-theme.h" /************************************************************************** * @name Structures @@ -250,6 +251,19 @@ */ void pidgin_blist_add_alert(GtkWidget *widget); +/** + * Sets the current theme for Pidgin to use + * + * @param theme the new theme to use + */ +void pidgin_blist_set_theme(PidginBuddyListTheme *theme); + +/** + * Gets Pidgin's current buddy list theme + * + * @returns the current theme + */ +PidginBuddyListTheme *pidgin_blist_get_theme(void); /************************************************************************** * @name GTK+ Buddy List sorting functions