diff options
author | George Hazan <ghazan@miranda.im> | 2022-08-04 17:52:34 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-08-04 17:52:34 +0300 |
commit | 3de995f6736e1869fedbff7d14c210df0b9b20a9 (patch) | |
tree | 659c27f242e1e0bca78013849f195564e6ab145b /plugins/SeenPlugin/src | |
parent | 4cb450857e40d6c61f1346801c40374e7f1b0d10 (diff) |
custom icons for UserInfo (AVS, SeenPlugin)
Diffstat (limited to 'plugins/SeenPlugin/src')
-rw-r--r-- | plugins/SeenPlugin/src/main.cpp | 31 | ||||
-rw-r--r-- | plugins/SeenPlugin/src/resource.h | 1 | ||||
-rw-r--r-- | plugins/SeenPlugin/src/stdafx.h | 2 | ||||
-rw-r--r-- | plugins/SeenPlugin/src/userinfo.cpp | 2 |
4 files changed, 22 insertions, 14 deletions
diff --git a/plugins/SeenPlugin/src/main.cpp b/plugins/SeenPlugin/src/main.cpp index 6ba25a154c..1e2b114f73 100644 --- a/plugins/SeenPlugin/src/main.cpp +++ b/plugins/SeenPlugin/src/main.cpp @@ -68,6 +68,18 @@ void UninitHistoryDialog(void); /////////////////////////////////////////////////////////////////////////////////////////
+INT_PTR GetParsedFormat(WPARAM wParam, LPARAM)
+{
+ MCONTACT hContact = (MCONTACT)wParam;
+ ptrW wszStamp(g_plugin.getWStringA("MenuStamp"));
+
+ CMStringW wszRet(ParseString(wszStamp ? wszStamp : DEFAULT_MENUSTAMP, hContact));
+
+ return (INT_PTR)wszRet.Detach();
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
static int MainInit(WPARAM, LPARAM)
{
if (g_bFileActive = g_plugin.getByte("FileOutput", 0))
@@ -92,8 +104,15 @@ static int OnShutdown(WPARAM, LPARAM) return 0;
}
+static IconItem iconList[] =
+{
+ { LPGEN("Clock"), "clock", IDI_CLOCK },
+};
+
int CMPlugin::Load()
{
+ registerIcon(MODULENAME, iconList);
+
g_pUserInfo = WindowList_Create();
g_hShutdownEvent = CreateEvent(nullptr, TRUE, FALSE, nullptr);
@@ -136,15 +155,3 @@ int CMPlugin::Unload() UninitHistoryDialog();
return 0;
}
-
-
-INT_PTR GetParsedFormat(WPARAM wParam, LPARAM)
-{
-
- MCONTACT hContact = (MCONTACT)wParam;
- ptrW wszStamp(g_plugin.getWStringA("MenuStamp"));
-
- CMStringW wszRet(ParseString(wszStamp ? wszStamp : DEFAULT_MENUSTAMP, hContact));
-
- return (INT_PTR)wszRet.Detach();
-}
\ No newline at end of file diff --git a/plugins/SeenPlugin/src/resource.h b/plugins/SeenPlugin/src/resource.h index f3a5d84aec..f89bed3c03 100644 --- a/plugins/SeenPlugin/src/resource.h +++ b/plugins/SeenPlugin/src/resource.h @@ -8,6 +8,7 @@ #define IDD_USERDETAILS 104
#define IDD_HISTORY 105
#define IDD_POPUPS 106
+#define IDI_CLOCK 107
#define IDC_SEENMENUITEM 1000
#define IDC_MENUITEM 1001
#define IDC_UINFOTAB 1002
diff --git a/plugins/SeenPlugin/src/stdafx.h b/plugins/SeenPlugin/src/stdafx.h index 9172cce71d..61f6009db6 100644 --- a/plugins/SeenPlugin/src/stdafx.h +++ b/plugins/SeenPlugin/src/stdafx.h @@ -121,8 +121,6 @@ void ShowHistory(MCONTACT hContact, uint8_t isAlert); void InitFileOutput(void);
void UninitFileOutput(void);
-INT_PTR GetParsedFormat(WPARAM wParam, LPARAM lParam);
-
struct logthread_info
{
MCONTACT hContact;
diff --git a/plugins/SeenPlugin/src/userinfo.cpp b/plugins/SeenPlugin/src/userinfo.cpp index adbe29c85c..3a4db98022 100644 --- a/plugins/SeenPlugin/src/userinfo.cpp +++ b/plugins/SeenPlugin/src/userinfo.cpp @@ -65,8 +65,10 @@ int UserinfoInit(WPARAM wparam, LPARAM hContact) char *szProto = Proto_GetBaseAccountName(hContact);
if (IsWatchedProtocol(szProto) && !Contact::IsGroupChat(hContact, szProto)) {
USERINFOPAGE uip = {};
+ uip.flags = ODPF_ICON;
uip.szTitle.a = LPGEN("Last seen");
uip.pDialog = new UserinfoDlg();
+ uip.dwInitParam = (LPARAM)g_plugin.getIconHandle(IDI_CLOCK);
g_plugin.addUserInfo(wparam, &uip);
}
return 0;
|