diff src/conversation.c @ 6016:1e4a574bb46d

[gaim-migrate @ 6466] Removed move of the #if 0'ed code from gtkprefs.c. I think Chip or Nathan or whoever left this here so that they could go back later and make sure all the old #if 0'ed stuff works correctly with the new prefs, so to reassure whoever did that, I've been verifying that all these prefs work as they should. Made the "use server alias" checkbox instantly affect conversation titles. Fixed a crash caused by trying to enable buddy icon animation for static images which happened after toggling the "enable buddy icon animation" preference to the O-N positiO-N. All you people need to hop on the bug fix bandwagon. It's happy hour. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 04 Jul 2003 19:12:06 +0000
parents 059d95c67cda
children 3b6f48766acb
line wrap: on
line diff
--- a/src/conversation.c	Fri Jul 04 15:58:03 2003 +0000
+++ b/src/conversation.c	Fri Jul 04 19:12:06 2003 +0000
@@ -2313,6 +2313,21 @@
 	place_conv = fnc;
 }
 
+static void
+update_titles_pref_cb(const char *name, GaimPrefType type, gpointer value,
+		gpointer data)
+{
+	/*
+	 * If the use_server_alias option was changed, and use_alias_for_title 
+	 * is false, then we don't have to do anything here.
+	 */
+	if (!strcmp(name, "/core/buddies/use_server_alias") && 
+		!gaim_prefs_get_bool("/core/conversations/use_alias_for_title"))
+		return;
+
+	gaim_conversation_foreach(gaim_conversation_autoset_title);
+}
+
 void
 gaim_set_win_ui_ops(GaimWindowUiOps *ops)
 {
@@ -2350,4 +2365,8 @@
 	gaim_prefs_connect_callback("/core/conversations/placement",
 			conv_placement_pref_cb, NULL);
 	gaim_prefs_trigger_callback("/core/conversations/placement");
+	gaim_prefs_connect_callback("/core/conversations/use_alias_for_title",
+			update_titles_pref_cb, NULL);
+	gaim_prefs_connect_callback("/core/buddies/use_server_alias",
+			update_titles_pref_cb, NULL);
 }