*************** *** 82,87 **** ChatView *te; QComboBox *cb_type, *cb_preset; QCheckBox *save; int timeout; QTimer* timer; QString prefix; --- 82,90 ---- ChatView *te; QComboBox *cb_type, *cb_preset; QCheckBox *save; + Jid j; + JidList jl; + setStatusEnum setStatusMode; int timeout; QTimer* timer; QString prefix; *************** *** 99,106 **** d->timeout = option.statusTimeout; d->prefix = tr("Set Status: All accounts"); - init(); } StatusSetDlg::StatusSetDlg(PsiAccount *pa, const Status &s) --- 102,110 ---- d->timeout = option.statusTimeout; d->prefix = tr("Set Status: All accounts"); + d->setStatusMode = setStatusForAccount; + init(); } StatusSetDlg::StatusSetDlg(PsiAccount *pa, const Status &s) *************** *** 115,122 **** d->timeout = option.statusTimeout; d->prefix = tr("Set Status: %1").arg(pa->name()); - init(); } void StatusSetDlg::init() --- 119,139 ---- d->timeout = option.statusTimeout; d->prefix = tr("Set Status: %1").arg(pa->name()); + d->setStatusMode = setStatusForAccount; + init(); + } + + void StatusSetDlg::setJid(const Jid &j) + { + d->j = j; + d->setStatusMode = setStatusForJid; + } + + void StatusSetDlg::setJidList(const JidList &jl) + { + d->jl = jl; + d->setStatusMode = setStatusForJidList; } void StatusSetDlg::init() *************** *** 317,324 **** // trim if((int)option.recentStatus.size() > option.recentStatusLimit) option.recentStatus.pop_back(); - - set(makeStatus(type, str)); close(); } --- 334,351 ---- // trim if((int)option.recentStatus.size() > option.recentStatusLimit) option.recentStatus.pop_back(); + + switch(d->setStatusMode) { + case setStatusForAccount: + set(makeStatus(type, str)); + break; + case setStatusForJid: + setJid(d->j, makeStatus(type, str)); + break; + case setStatusForJidList: + setJidList(d->jl, makeStatus(type, str)); + break; + } close(); }