comparison src/conversation.c @ 9108:6a17b7e2e3b2

[gaim-migrate @ 9885] I did some more prefslashing. Test, discuss. I'll stay up for a bit. If nobody objects, let's tag and release. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Fri, 28 May 2004 05:53:34 +0000
parents 8f838ae3e710
children 6ea36eac6f22
comparison
equal deleted inserted replaced
9107:f0be63d6d192 9108:6a17b7e2e3b2
2261 static void 2261 static void
2262 conv_placement_last_created_win(GaimConversation *conv) 2262 conv_placement_last_created_win(GaimConversation *conv)
2263 { 2263 {
2264 GaimConvWindow *win; 2264 GaimConvWindow *win;
2265 2265
2266 #if 0 /* Last-minute prefslash */
2266 if (gaim_prefs_get_bool("/core/conversations/combine_chat_im")) 2267 if (gaim_prefs_get_bool("/core/conversations/combine_chat_im"))
2267 win = g_list_last(gaim_get_windows())->data; 2268 win = g_list_last(gaim_get_windows())->data;
2268 else 2269 else
2269 win = gaim_get_last_window_with_type(gaim_conversation_get_type(conv)); 2270 win = gaim_get_last_window_with_type(gaim_conversation_get_type(conv));
2271 #else
2272 win = g_list_last(gaim_get_windows())->data;
2273 #endif
2270 2274
2271 if (win == NULL) { 2275 if (win == NULL) {
2272 win = gaim_conv_window_new(); 2276 win = gaim_conv_window_new();
2273 2277
2274 gaim_conv_window_add_conversation(win, conv); 2278 gaim_conv_window_add_conversation(win, conv);
2352 { 2356 {
2353 conv2 = (GaimConversation *)cl->data; 2357 conv2 = (GaimConversation *)cl->data;
2354 2358
2355 group2 = conv_get_group(conv2); 2359 group2 = conv_get_group(conv2);
2356 2360
2357 if ((gaim_prefs_get_bool("/core/conversations/combine_chat_im") || 2361 if (group == group2)
2358 type == gaim_conversation_get_type(conv2)) &&
2359 group == group2)
2360 { 2362 {
2361 gaim_conv_window_add_conversation(win2, conv); 2363 gaim_conv_window_add_conversation(win2, conv);
2362 2364
2363 return; 2365 return;
2364 } 2366 }
2392 convs != NULL; 2394 convs != NULL;
2393 convs = convs->next) 2395 convs = convs->next)
2394 { 2396 {
2395 conv2 = (GaimConversation *)convs->data; 2397 conv2 = (GaimConversation *)convs->data;
2396 2398
2397 if ((gaim_prefs_get_bool("/core/conversations/combine_chat_im") || 2399 if (account == gaim_conversation_get_account(conv2))
2398 type == gaim_conversation_get_type(conv2)) &&
2399 account == gaim_conversation_get_account(conv2))
2400 { 2400 {
2401 gaim_conv_window_add_conversation(win2, conv); 2401 gaim_conv_window_add_conversation(win2, conv);
2402 return; 2402 return;
2403 } 2403 }
2404 } 2404 }
2405 } 2405 }
2406 2406
2407 /* Make a new window. */ 2407 /* Make a new window. */
2408 conv_placement_new_window(conv); 2408 conv_placement_new_window(conv);
2409 } 2409 }
2410
2411 #if 0 /* I don't like this */
2410 2412
2411 static void 2413 static void
2412 conv_placement_by_number(GaimConversation *conv) 2414 conv_placement_by_number(GaimConversation *conv)
2413 { 2415 {
2414 GaimConvWindow *win = NULL; 2416 GaimConvWindow *win = NULL;
2446 gaim_conv_window_add_conversation(win, conv); 2448 gaim_conv_window_add_conversation(win, conv);
2447 gaim_conv_window_show(win); 2449 gaim_conv_window_show(win);
2448 } 2450 }
2449 } 2451 }
2450 } 2452 }
2453
2454 #endif
2451 2455
2452 static ConvPlacementData * 2456 static ConvPlacementData *
2453 get_conv_placement_data(const char *id) 2457 get_conv_placement_data(const char *id)
2454 { 2458 {
2455 ConvPlacementData *data = NULL; 2459 ConvPlacementData *data = NULL;
2490 conv_placement_new_window); 2494 conv_placement_new_window);
2491 add_conv_placement_fnc("group", _("By group"), 2495 add_conv_placement_fnc("group", _("By group"),
2492 conv_placement_by_group); 2496 conv_placement_by_group);
2493 add_conv_placement_fnc("account", _("By account"), 2497 add_conv_placement_fnc("account", _("By account"),
2494 conv_placement_by_account); 2498 conv_placement_by_account);
2495 add_conv_placement_fnc("number", _("By conversation count"),
2496 conv_placement_by_number);
2497 } 2499 }
2498 } 2500 }
2499 2501
2500 GList * 2502 GList *
2501 gaim_conv_placement_get_options(void) 2503 gaim_conv_placement_get_options(void)