comparison mcabber/mcabber/screen.c @ 1821:60db836ad98a

Move some "update_roster" updates to a better place
author Mikael Berthe <mikael@lilotux.net>
date Wed, 24 Mar 2010 00:06:40 +0100
parents d13315366ba5
children 2b013c0f949a
comparison
equal deleted inserted replaced
1820:0628dcecaddf 1821:60db836ad98a
2895 g_hash_table_foreach(winbufhash, buffer_list, NULL); 2895 g_hash_table_foreach(winbufhash, buffer_list, NULL);
2896 scr_LogPrint(LPRINT_NORMAL, "End of buffer list."); 2896 scr_LogPrint(LPRINT_NORMAL, "End of buffer list.");
2897 scr_setmsgflag_if_needed(SPECIAL_BUFFER_STATUS_ID, TRUE); 2897 scr_setmsgflag_if_needed(SPECIAL_BUFFER_STATUS_ID, TRUE);
2898 scr_setattentionflag_if_needed(SPECIAL_BUFFER_STATUS_ID, TRUE, 2898 scr_setattentionflag_if_needed(SPECIAL_BUFFER_STATUS_ID, TRUE,
2899 ROSTER_UI_PRIO_STATUS_WIN_MESSAGE, prio_max); 2899 ROSTER_UI_PRIO_STATUS_WIN_MESSAGE, prio_max);
2900 update_roster = TRUE;
2901 } 2900 }
2902 2901
2903 // scr_set_chatmode() 2902 // scr_set_chatmode()
2904 // Public function to (un)set chatmode... 2903 // Public function to (un)set chatmode...
2905 inline void scr_set_chatmode(int enable) 2904 inline void scr_set_chatmode(int enable)
2943 iscurrentlocked = win_entry->bd->lock; 2942 iscurrentlocked = win_entry->bd->lock;
2944 } 2943 }
2945 } else { 2944 } else {
2946 current_id = NULL; 2945 current_id = NULL;
2947 } 2946 }
2948 if (!chatmode || !current_id || strcmp(bjid, current_id) || iscurrentlocked) 2947 if (!chatmode || !current_id || strcmp(bjid, current_id) || iscurrentlocked) {
2949 roster_msg_setflag(bjid, special, TRUE); 2948 roster_msg_setflag(bjid, special, TRUE);
2949 update_roster = TRUE;
2950 }
2950 } 2951 }
2951 2952
2952 // scr_setattentionflag_if_needed(bare_jid, special, value, action) 2953 // scr_setattentionflag_if_needed(bare_jid, special, value, action)
2953 // Set the attention flag unless we're already in the jid buffer window 2954 // Set the attention flag unless we're already in the jid buffer window
2954 // TODO: avoid code duplication with scr_setmsgflag_if_needed() 2955 // TODO: avoid code duplication with scr_setmsgflag_if_needed()
2978 } 2979 }
2979 } else { 2980 } else {
2980 current_id = NULL; 2981 current_id = NULL;
2981 } 2982 }
2982 2983
2983 if (!chatmode || !current_id || strcmp(bjid, current_id) || iscurrentlocked) 2984 if (!chatmode || !current_id || strcmp(bjid, current_id) || iscurrentlocked) {
2984 roster_setuiprio(bjid, special, value, action); 2985 roster_setuiprio(bjid, special, value, action);
2986 update_roster = TRUE;
2987 }
2985 } 2988 }
2986 2989
2987 // scr_set_multimode() 2990 // scr_set_multimode()
2988 // Public function to (un)set multimode... 2991 // Public function to (un)set multimode...
2989 // Convention: 2992 // Convention: