comparison mcabber/mcabber/screen.c @ 1950:aec86670047b

Automatically set readmark flag
author Mikael Berthe <mikael@lilotux.net>
date Mon, 14 Mar 2011 12:50:18 +0100
parents 13d18777a629
children 256cfc706ae5
comparison
equal deleted inserted replaced
1949:13d18777a629 1950:aec86670047b
1469 } 1469 }
1470 1470
1471 if (!dont_show) { 1471 if (!dont_show) {
1472 if (win_entry->bd->lock) 1472 if (win_entry->bd->lock)
1473 setmsgflg = TRUE; 1473 setmsgflg = TRUE;
1474 // If this is an outgoing message, update readmark
1475 if (!special && (prefix_flags & HBB_PREFIX_OUT))
1476 hbuf_set_readmark(win_entry->bd->hbuf, FALSE);
1474 // Show and refresh the window 1477 // Show and refresh the window
1475 top_panel(win_entry->panel); 1478 top_panel(win_entry->panel);
1476 scr_update_window(win_entry); 1479 scr_update_window(win_entry);
1477 top_panel(inputPanel); 1480 top_panel(inputPanel);
1478 update_panels(); 1481 update_panels();
2373 // We don't want the chatstate to be changed again right now. 2376 // We don't want the chatstate to be changed again right now.
2374 lock_chatstate = TRUE; 2377 lock_chatstate = TRUE;
2375 2378
2376 prev_st = buddy_getstatus(BUDDATA(current_buddy), NULL); 2379 prev_st = buddy_getstatus(BUDDATA(current_buddy), NULL);
2377 buddy_setflags(BUDDATA(current_buddy), ROSTER_FLAG_LOCK, FALSE); 2380 buddy_setflags(BUDDATA(current_buddy), ROSTER_FLAG_LOCK, FALSE);
2378 if (chatmode) 2381 if (chatmode) {
2382 scr_buffer_readmark(TRUE);
2379 alternate_buddy = current_buddy; 2383 alternate_buddy = current_buddy;
2384 }
2380 current_buddy = newbuddy; 2385 current_buddy = newbuddy;
2381 // Lock the buddy in the buddylist if we're in chat mode 2386 // Lock the buddy in the buddylist if we're in chat mode
2382 if (chatmode) 2387 if (chatmode)
2383 buddy_setflags(BUDDATA(current_buddy), ROSTER_FLAG_LOCK, TRUE); 2388 buddy_setflags(BUDDATA(current_buddy), ROSTER_FLAG_LOCK, TRUE);
2384 // We should rebuild the buddylist but not everytime 2389 // We should rebuild the buddylist but not everytime
3480 } 3485 }
3481 3486
3482 void readline_disable_chat_mode(guint show_roster) 3487 void readline_disable_chat_mode(guint show_roster)
3483 { 3488 {
3484 scr_check_auto_away(TRUE); 3489 scr_check_auto_away(TRUE);
3490 if (chatmode)
3491 scr_buffer_readmark(TRUE);
3485 currentWindow = NULL; 3492 currentWindow = NULL;
3486 chatmode = FALSE; 3493 chatmode = FALSE;
3487 if (current_buddy) 3494 if (current_buddy)
3488 buddy_setflags(BUDDATA(current_buddy), ROSTER_FLAG_LOCK, FALSE); 3495 buddy_setflags(BUDDATA(current_buddy), ROSTER_FLAG_LOCK, FALSE);
3489 if (show_roster) 3496 if (show_roster)