From 6d9d616fff4a06f2509e9c3386285a89334c74e8 Mon Sep 17 00:00:00 2001 From: Eric Wald Date: Mon, 25 Aug 2014 21:18:52 -0600 Subject: [PATCH] Prioritizing search hooks on the trade screen. The autotrade plugin has been intercepting the m/u/M/U keys if enabled after enabling the search plugin. An explicit priority makes the search plugin always accept those keys while typing in a search line. --- plugins/search.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/search.cpp b/plugins/search.cpp index 3e4638468..18586657b 100644 --- a/plugins/search.cpp +++ b/plugins/search.cpp @@ -693,10 +693,10 @@ template V generic_search_hook ::module; // Hook definition helpers -#define IMPLEMENT_HOOKS_WITH_ID(screen, module, id) \ +#define IMPLEMENT_HOOKS_WITH_ID(screen, module, id, prio) \ typedef generic_search_hook module##_hook; \ - template<> IMPLEMENT_VMETHOD_INTERPOSE(module##_hook, feed); \ - template<> IMPLEMENT_VMETHOD_INTERPOSE(module##_hook, render) + template<> IMPLEMENT_VMETHOD_INTERPOSE_PRIO(module##_hook, feed, prio); \ + template<> IMPLEMENT_VMETHOD_INTERPOSE_PRIO(module##_hook, render, prio) #define IMPLEMENT_HOOKS(screen, module) \ typedef generic_search_hook module##_hook; \ @@ -1108,7 +1108,7 @@ private: } }; -IMPLEMENT_HOOKS_WITH_ID(df::viewscreen_tradegoodsst, trade_search_merc, 1); +IMPLEMENT_HOOKS_WITH_ID(df::viewscreen_tradegoodsst, trade_search_merc, 1, 100); class trade_search_fort : public trade_search_base @@ -1150,7 +1150,7 @@ private: } }; -IMPLEMENT_HOOKS_WITH_ID(df::viewscreen_tradegoodsst, trade_search_fort, 2); +IMPLEMENT_HOOKS_WITH_ID(df::viewscreen_tradegoodsst, trade_search_fort, 2, 100); // // END: Trade screen search