comparison mcabber/mcabber/screen.c @ 1802:b135572fcd26

Add urgent flag per screen buffer
author Mikael Berthe <mikael@lilotux.net>
date Sun, 21 Mar 2010 15:13:33 +0100
parents c3ddb52f1055
children 35a1250c111a
comparison
equal deleted inserted replaced
1801:07e73049f7c5 1802:b135572fcd26
2924 } 2924 }
2925 if (!chatmode || !current_id || strcmp(bjid, current_id) || iscurrentlocked) 2925 if (!chatmode || !current_id || strcmp(bjid, current_id) || iscurrentlocked)
2926 roster_msg_setflag(bjid, special, TRUE); 2926 roster_msg_setflag(bjid, special, TRUE);
2927 } 2927 }
2928 2928
2929 // scr_setattentionflag_if_needed(bare_jid, special, value, action)
2930 // Set the attention flag unless we're already in the jid buffer window
2931 // TODO: avoid code duplication with scr_setmsgflag_if_needed()
2932 void scr_setattentionflag_if_needed(const char *bjid, int special,
2933 guint value, enum setuiprio_ops action)
2934 {
2935 const char *current_id;
2936 winbuf *wb;
2937 bool iscurrentlocked = FALSE;
2938
2939 if (!bjid)
2940 return;
2941
2942 wb = scr_search_window(bjid, special);
2943 if (!wb)
2944 return;
2945
2946 if (current_buddy) {
2947 if (special)
2948 current_id = buddy_getname(BUDDATA(current_buddy));
2949 else
2950 current_id = buddy_getjid(BUDDATA(current_buddy));
2951 if (current_id) {
2952 winbuf *win_entry = scr_search_window(current_id, special);
2953 if (!win_entry) return;
2954 iscurrentlocked = win_entry->bd->lock;
2955 }
2956 } else {
2957 current_id = NULL;
2958 }
2959
2960 if (!chatmode || !current_id || strcmp(bjid, current_id) || iscurrentlocked)
2961 roster_setuiprio(bjid, special, value, action);
2962 }
2963
2929 // scr_set_multimode() 2964 // scr_set_multimode()
2930 // Public function to (un)set multimode... 2965 // Public function to (un)set multimode...
2931 // Convention: 2966 // Convention:
2932 // 0 = disabled / 1 = multimode / 2 = multimode verbatim (commands disabled) 2967 // 0 = disabled / 1 = multimode / 2 = multimode verbatim (commands disabled)
2933 void scr_set_multimode(int enable, char *subject) 2968 void scr_set_multimode(int enable, char *subject)