From 145b1a2464ba9b84cf128e30a704165a432b451f Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 7 Apr 2016 22:16:05 +0100 Subject: [PATCH] Added on_room_win_focus hooks to test plugins --- tests/python-test.py | 4 ++++ tests/test-c-plugin/test-c-plugin.c | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/tests/python-test.py b/tests/python-test.py index 2293f37..590fd76 100644 --- a/tests/python-test.py +++ b/tests/python-test.py @@ -517,3 +517,7 @@ def prof_on_contact_presence(barejid, resource, presence, status, priority): def prof_on_chat_win_focus(barejid): _create_win() prof.win_show(plugin_win, "fired -> prof_on_chat_win_focus: " + barejid) + +def prof_on_room_win_focus(roomjid): + _create_win() + prof.win_show(plugin_win, "fired -> prof_on_room_win_focus: " + roomjid) diff --git a/tests/test-c-plugin/test-c-plugin.c b/tests/test-c-plugin/test-c-plugin.c index c019df8..f6a1526 100644 --- a/tests/test-c-plugin/test-c-plugin.c +++ b/tests/test-c-plugin/test-c-plugin.c @@ -873,3 +873,13 @@ prof_on_chat_win_focus(const char *const barejid) sprintf(buf, "%s%s", str, barejid); prof_win_show(plugin_win, buf); } + +void +prof_on_room_win_focus(const char *const roomjid) +{ + create_win(); + char *str = "fired -> prof_on_room_win_focus: "; + char buf[strlen(str) + strlen(roomjid) + 1]; + sprintf(buf, "%s%s", str, roomjid); + prof_win_show(plugin_win, buf); +}