Mercurial > pidgin.yaz
changeset 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 | 5425bbaa2630 |
children | 8c71c0727a1c |
files | src/conversation.c src/gtkconv.c |
diffstat | 2 files changed, 21 insertions(+), 21 deletions(-) [+] |
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();
--- a/src/gtkconv.c Tue Apr 15 05:53:54 2003 +0000 +++ b/src/gtkconv.c Wed Apr 16 00:59:07 2003 +0000 @@ -326,7 +326,8 @@ conv = gaim_window_get_active_conversation(win); - gaim_conversation_set_logging(conv, !gaim_conversation_is_logging(conv)); + gaim_conversation_set_logging(conv, + gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))); } static void @@ -343,7 +344,8 @@ gtkconv = GAIM_GTK_CONVERSATION(conv); - gtkconv->make_sound = !gtkconv->make_sound; + gtkconv->make_sound = + gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); } static gboolean @@ -1662,7 +1664,9 @@ new_win = gaim_window_new(); - gaim_window_add_conversation(new_win, gaim_window_remove_conversation(win, gaim_conversation_get_index(conv))); + gaim_window_add_conversation(new_win, + gaim_window_remove_conversation(win, + gaim_conversation_get_index(conv))); gtkconv->make_sound = noisy; @@ -3684,8 +3688,10 @@ /* go back to tabless if need be */ if (gaim_window_get_conversation_count(win) <= 2) { gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gtkwin->notebook), - ((conv_type == GAIM_CONV_IM && im_options & OPT_IM_ONE_WINDOW) || - (conv_type == GAIM_CONV_CHAT && im_options & OPT_CHAT_ONE_WINDOW))); + ((conv_type == GAIM_CONV_IM && + (im_options & OPT_IM_ONE_WINDOW)) || + (conv_type == GAIM_CONV_CHAT && + (im_options & OPT_CHAT_ONE_WINDOW)))); }