summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator/Src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-05-07 04:18:34 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-05-07 04:18:34 +0000
commitb3ec2513d67356a200c56e3f9dd0a3e9e72d26c9 (patch)
tree368b97ad485b10a1283e738e45c7bf19622ebbcf /plugins/NewsAggregator/Src
parent6e1cd4f95a19f076c1fb3fbf938c2978b7afaac8 (diff)
Added hotkey support for checking all feeds
git-svn-id: http://svn.miranda-ng.org/main/trunk@9135 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewsAggregator/Src')
-rw-r--r--plugins/NewsAggregator/Src/Common.h9
-rw-r--r--plugins/NewsAggregator/Src/NewsAggregator.cpp12
-rw-r--r--plugins/NewsAggregator/Src/Services.cpp2
3 files changed, 18 insertions, 5 deletions
diff --git a/plugins/NewsAggregator/Src/Common.h b/plugins/NewsAggregator/Src/Common.h
index 48371e702f..09eb380307 100644
--- a/plugins/NewsAggregator/Src/Common.h
+++ b/plugins/NewsAggregator/Src/Common.h
@@ -39,6 +39,7 @@ Boston, MA 02111-1307, USA.
#include <m_protomod.h>
#include <m_xml.h>
#include <m_avatars.h>
+#include <m_hotkeys.h>
#include <m_folders.h>
#include <m_toptoolbar.h>
@@ -149,15 +150,15 @@ MCONTACT GetContactByURL(const TCHAR *url);
// WPARAM = LPARAM = NULL
#define MS_NEWSAGGREGATOR_ADDFEED "NewsAggregator/AddNewsFeed"
-// Add new Feed channel
+// Change Feed channel
// WPARAM = LPARAM = NULL
#define MS_NEWSAGGREGATOR_CHANGEFEED "NewsAggregator/ChangeNewsFeed"
-// Import Feed chanels from file
+// Import Feed channels from file
// WPARAM = LPARAM = NULL
#define MS_NEWSAGGREGATOR_IMPORTFEEDS "NewsAggregator/ImportFeeds"
-// Export Feed chanels to file
+// Export Feed channels to file
// WPARAM = LPARAM = NULL
#define MS_NEWSAGGREGATOR_EXPORTFEEDS "NewsAggregator/ExportFeeds"
@@ -165,6 +166,6 @@ MCONTACT GetContactByURL(const TCHAR *url);
// WPARAM = LPARAM = NULL
#define MS_NEWSAGGREGATOR_CHECKFEED "NewsAggregator/CheckFeed"
-// Check Feed info
+// Enable/disable getting feed info
// WPARAM = LPARAM = NULL
#define MS_NEWSAGGREGATOR_ENABLED "NewsAggregator/Enabled" \ No newline at end of file
diff --git a/plugins/NewsAggregator/Src/NewsAggregator.cpp b/plugins/NewsAggregator/Src/NewsAggregator.cpp
index e1bd14eba6..2d045613cd 100644
--- a/plugins/NewsAggregator/Src/NewsAggregator.cpp
+++ b/plugins/NewsAggregator/Src/NewsAggregator.cpp
@@ -71,7 +71,7 @@ extern "C" __declspec(dllexport) int Load(void)
PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
pd.szName = MODULE;
pd.type = PROTOTYPE_VIRTUAL;
- CallService(MS_PROTO_REGISTERMODULE,0,(LPARAM)&pd);
+ CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);
CreateProtoServiceFunction(MODULE, PS_GETNAME, NewsAggrGetName);
CreateProtoServiceFunction(MODULE, PS_GETCAPS, NewsAggrGetCaps);
@@ -89,6 +89,16 @@ extern "C" __declspec(dllexport) int Load(void)
CreateServiceFunction(MS_NEWSAGGREGATOR_CHECKFEED, CheckFeed);
CreateServiceFunction(MS_NEWSAGGREGATOR_CHANGEFEED, ChangeFeed);
CreateServiceFunction(MS_NEWSAGGREGATOR_ENABLED, EnableDisable);
+
+ HOTKEYDESC hkd = { sizeof(hkd) };
+ hkd.dwFlags = HKD_TCHAR;
+ hkd.pszName = "NewsAggregator/CheckAllFeeds";
+ hkd.ptszDescription = LPGENT("Check All Feeds");
+ hkd.ptszSection = LPGENT("News Aggregator");
+ hkd.pszService = MS_NEWSAGGREGATOR_CHECKALLFEEDS;
+ hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL+HKCOMB_A, 'O') | HKF_MIRANDA_LOCAL;
+ Hotkey_Register(&hkd);
+
return 0;
}
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp
index 9a130b5f17..54d7914ca9 100644
--- a/plugins/NewsAggregator/Src/Services.cpp
+++ b/plugins/NewsAggregator/Src/Services.cpp
@@ -79,6 +79,8 @@ int NewsAggrPreShutdown(WPARAM wParam, LPARAM lParam)
KillTimer(NULL, timerId);
NetlibUnInit();
+
+ CallService(MS_HOTKEY_UNREGISTER, 0, (LPARAM)"NewsAggregator/CheckAllFeeds");
return 0;
}