diff src/conversation.c @ 5139:d0182ae31ab8

[gaim-migrate @ 5503] Okay, some code cleanups! Yay! Oh yeah, and a fix for sound and logs not being saved. The problem was, when switching conversation tabs, the menu items would update to reflect the settings of the new conversation. When doing that, the callback was being called, and the settings in the conversation were being inversed. Fun. Now they're set to whatever the menu item's state is, which is the Correct Way To Do Things (CWTDT) (C) (R) (TM) committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 16 Apr 2003 00:59:07 +0000
parents 381da05cb5ed
children fefad67de2c7
line wrap: on
line diff
--- a/src/conversation.c	Tue Apr 15 05:53:54 2003 +0000
+++ b/src/conversation.c	Wed Apr 16 00:59:07 2003 +0000
@@ -568,22 +568,16 @@
 	if (win == NULL || win->ui_ops == ops)
 		return;
 
-	if (ops != NULL) {
-		if (ops->get_conversation_ui_ops != NULL)
-			conv_ops = ops->get_conversation_ui_ops();
-	}
-
-	if (win->ui_ops != NULL) {
-		if (win->ui_ops->destroy_window != NULL)
-			win->ui_ops->destroy_window(win);
-	}
+	if (ops != NULL && ops->get_conversation_ui_ops != NULL)
+		conv_ops = ops->get_conversation_ui_ops();
+
+	if (win->ui_ops != NULL && win->ui_ops->destroy_window != NULL)
+		win->ui_ops->destroy_window(win);
 
 	win->ui_ops = ops;
 
-	if (win->ui_ops != NULL) {
-		if (win->ui_ops->new_window != NULL)
-			win->ui_ops->new_window(win);
-	}
+	if (win->ui_ops != NULL && win->ui_ops->new_window != NULL)
+		win->ui_ops->new_window(win);
 
 	for (l = gaim_window_get_conversations(win);
 		 l != NULL;
@@ -874,7 +868,7 @@
 	conv->title        = g_strdup(name);
 	conv->send_history = g_list_append(NULL, NULL);
 	conv->history      = g_string_new("");
-	conv->data  = g_hash_table_new_full(g_str_hash, g_str_equal,
+	conv->data         = g_hash_table_new_full(g_str_hash, g_str_equal,
 											   g_free, NULL);
 
 	if (type == GAIM_CONV_IM)
@@ -907,8 +901,8 @@
 	 * created window.
 	 */
 	if (windows == NULL ||
-			(type == GAIM_CONV_IM && !(im_options & OPT_IM_ONE_WINDOW)) ||
-			(type == GAIM_CONV_CHAT && !(chat_options & OPT_CHAT_ONE_WINDOW))) {
+		(type == GAIM_CONV_IM && !(im_options & OPT_IM_ONE_WINDOW)) ||
+		(type == GAIM_CONV_CHAT && !(chat_options & OPT_CHAT_ONE_WINDOW))) {
 		struct gaim_window *win;
 
 		win = gaim_window_new();