pidgin: 8ebfd17a: Automatically load the Default conversat...
qulogic at pidgin.im
qulogic at pidgin.im
Sat Mar 3 22:55:57 EST 2012
----------------------------------------------------------------------
Revision: 8ebfd17ae49cd9748daae939c128f8795c0d05fb
Parent: 6ec2768e7375bcd6e223f315be9a104414adcbef
Author: qulogic at pidgin.im
Date: 03/03/12 21:16:12
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/8ebfd17ae49cd9748daae939c128f8795c0d05fb
Changelog:
Automatically load the Default conversation theme and use it if a
theme can't be found.
Changes against parent 6ec2768e7375bcd6e223f315be9a104414adcbef
patched pidgin/gtkconv.c
-------------- next part --------------
============================================================
--- pidgin/gtkconv.c 58f38e92fbb0ed53aba3d5512c4dd1747b51b348
+++ pidgin/gtkconv.c 36e46362b0fd6d2e5dfe87ed97abc26f42ee68ef
@@ -192,6 +192,8 @@ static GHashTable *prpl_lists = NULL;
static GList *offline_list = NULL;
static GHashTable *prpl_lists = NULL;
+static PurpleTheme *default_conv_theme = NULL;
+
static gboolean update_send_to_selection(PidginWindow *win);
static void generate_send_to_items(PidginWindow *win);
@@ -5740,7 +5742,7 @@ private_gtkconv_new(PurpleConversation *
gtkconv->unseen_count = 0;
theme = purple_theme_manager_find_theme(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/theme"), "conversation");
if (!theme)
- theme = purple_theme_manager_find_theme("Default", "conversation");
+ theme = default_conv_theme;
gtkconv->theme = PIDGIN_CONV_THEME(g_object_ref(theme));
gtkconv->last_flags = 0;
@@ -8434,6 +8436,7 @@ pidgin_conversations_init(void)
{
void *handle = pidgin_conversations_get_handle();
void *blist_handle = purple_blist_get_handle();
+ char *theme_dir;
/* Conversations */
purple_prefs_add_none(PIDGIN_PREFS_ROOT "/conversations");
@@ -8723,6 +8726,9 @@ pidgin_conversations_init(void)
PURPLE_CALLBACK(wrote_msg_update_unseen_cb), NULL);
purple_theme_manager_register_type(g_object_new(PIDGIN_TYPE_CONV_THEME_LOADER, "type", "conversation", NULL));
+ theme_dir = g_build_filename(DATADIR, "pidgin", "theme", NULL);
+ default_conv_theme = purple_theme_manager_load_theme(theme_dir, "conversation");
+ g_free(theme_dir);
{
/* Set default tab colors */
More information about the Commits
mailing list