added: winix uses now [filter] statement from ezc
added: notifications to threads (were temporarily disabled) changed: templates in notifications git-svn-id: svn://ttmath.org/publicrep/winix/trunk@712 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -23,56 +23,44 @@ Ezc::Functions<NotifyStream> ezc_functions;
|
||||
NotifyUserMsg notify_user_msg;
|
||||
NotifyMsg notify_msg;
|
||||
|
||||
// name in qencoding
|
||||
static std::string name_q;
|
||||
static std::string qencode_tmp;
|
||||
|
||||
|
||||
void notify_file_added(Info & i)
|
||||
void fil_qencode(Info & i)
|
||||
{
|
||||
i.res = (notify_msg.code & WINIX_NOTIFY_CODE_FILE_ADD) != 0;
|
||||
// QEncode can be used in other threads
|
||||
QEncode(i.in.Str(), qencode_tmp);
|
||||
i.out << qencode_tmp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void notify_file_edited(Info & i)
|
||||
void notify_add(Info & i)
|
||||
{
|
||||
i.res = (notify_msg.code & WINIX_NOTIFY_CODE_FILE_EDIT) != 0;
|
||||
i.res = (notify_msg.code & WINIX_NOTIFY_CODE_ADD) != 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void notify_file_deleted(Info & i)
|
||||
void notify_edit(Info & i)
|
||||
{
|
||||
i.res = (notify_msg.code & WINIX_NOTIFY_CODE_FILE_DELETE) != 0;
|
||||
i.res = (notify_msg.code & WINIX_NOTIFY_CODE_EDIT) != 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void notify_dir_added(Info & i)
|
||||
void notify_delete(Info & i)
|
||||
{
|
||||
i.res = (notify_msg.code & WINIX_NOTIFY_CODE_DIR_ADD) != 0;
|
||||
i.res = (notify_msg.code & WINIX_NOTIFY_CODE_DELETE) != 0;
|
||||
}
|
||||
|
||||
|
||||
void notify_thread_added(Info & i)
|
||||
void notify_reply(Info & i)
|
||||
{
|
||||
i.res = (notify_msg.code & WINIX_NOTIFY_CODE_THREAD_ADD) != 0;
|
||||
i.res = (notify_msg.code & WINIX_NOTIFY_CODE_REPLY) != 0;
|
||||
}
|
||||
|
||||
|
||||
void notify_thread_replayed(Info & i)
|
||||
{
|
||||
i.res = (notify_msg.code & WINIX_NOTIFY_CODE_THREAD_REPLAYED) != 0;
|
||||
}
|
||||
|
||||
|
||||
void notify_thread_post_changed(Info & i)
|
||||
{
|
||||
i.res = (notify_msg.code & WINIX_NOTIFY_CODE_THREAD_POST_CHANGED) != 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void notify_to_email(Info & i)
|
||||
{
|
||||
i.out << notify_user_msg.email;
|
||||
@@ -81,8 +69,7 @@ void notify_to_email(Info & i)
|
||||
|
||||
void notify_to_name(Info & i)
|
||||
{
|
||||
QEncode(notify_user_msg.name, name_q);
|
||||
i.out << name_q;
|
||||
i.out << notify_user_msg.name;
|
||||
}
|
||||
|
||||
|
||||
@@ -104,19 +91,17 @@ void CreateFunctions()
|
||||
{
|
||||
ezc_functions.Clear();
|
||||
|
||||
ezc_functions.Insert("notify_file_added", notify_file_added);
|
||||
ezc_functions.Insert("notify_file_edited", notify_file_edited);
|
||||
ezc_functions.Insert("notify_file_deleted", notify_file_deleted);
|
||||
ezc_functions.Insert("notify_dir_added", notify_dir_added);
|
||||
ezc_functions.Insert("fil_qencode", fil_qencode);
|
||||
|
||||
ezc_functions.Insert("notify_thread_added", notify_thread_added);
|
||||
ezc_functions.Insert("notify_thread_replayed", notify_thread_replayed);
|
||||
ezc_functions.Insert("notify_thread_post_changed", notify_thread_post_changed);
|
||||
ezc_functions.Insert("notify_add", notify_add);
|
||||
ezc_functions.Insert("notify_edit", notify_edit);
|
||||
ezc_functions.Insert("notify_delete", notify_delete);
|
||||
ezc_functions.Insert("notify_reply", notify_reply);
|
||||
|
||||
ezc_functions.Insert("notify_to_email", notify_to_email);
|
||||
ezc_functions.Insert("notify_to_name", notify_to_name);
|
||||
ezc_functions.Insert("notify_item_link", notify_item_link);
|
||||
ezc_functions.Insert("notify_dir_link", notify_dir_link);
|
||||
ezc_functions.Insert("notify_to_email", notify_to_email);
|
||||
ezc_functions.Insert("notify_to_name", notify_to_name);
|
||||
ezc_functions.Insert("notify_item_link", notify_item_link);
|
||||
ezc_functions.Insert("notify_dir_link", notify_dir_link);
|
||||
|
||||
plugin.Call(WINIX_NOTIFY_TEMPLATES_CREATEFUNCTIONS, &ezc_functions);
|
||||
}
|
||||
|
Reference in New Issue
Block a user