summaryrefslogtreecommitdiff
path: root/plugins/HistorySweeperLight
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/HistorySweeperLight')
-rw-r--r--plugins/HistorySweeperLight/src/historysweeperlight.h4
-rw-r--r--plugins/HistorySweeperLight/src/main.cpp14
-rw-r--r--plugins/HistorySweeperLight/src/options.cpp31
3 files changed, 24 insertions, 25 deletions
diff --git a/plugins/HistorySweeperLight/src/historysweeperlight.h b/plugins/HistorySweeperLight/src/historysweeperlight.h
index 407f3973d2..9f820ec439 100644
--- a/plugins/HistorySweeperLight/src/historysweeperlight.h
+++ b/plugins/HistorySweeperLight/src/historysweeperlight.h
@@ -49,8 +49,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern HINSTANCE hInst;
// options.c
-extern const char* time_stamp_strings[];
-extern const char* keep_strings[];
+extern char* time_stamp_strings[];
+extern char* keep_strings[];
int HSOptInitialise(WPARAM wParam, LPARAM lParam);
void InitIcons(void);
void ReleaseIconEx(const char* name);
diff --git a/plugins/HistorySweeperLight/src/main.cpp b/plugins/HistorySweeperLight/src/main.cpp
index b3653d8a9a..75f8d65143 100644
--- a/plugins/HistorySweeperLight/src/main.cpp
+++ b/plugins/HistorySweeperLight/src/main.cpp
@@ -59,14 +59,14 @@ int OnIconPressed(WPARAM wParam, LPARAM lParam)
sid.szModule = ModuleName;
sid.dwId = nh;
sid.flags = MBF_HIDDEN;
- CallService(MS_MSG_MODIFYICON, (WPARAM)hContact, (LPARAM)&sid);
+ Srmm_ModifyIcon(hContact, &sid);
nh = (nh + 1) % 4;
db_set_b((HANDLE)wParam, ModuleName, "SweepHistory", (BYTE)nh);
sid.dwId = nh;
sid.flags = 0;
- CallService(MS_MSG_MODIFYICON, (WPARAM)hContact, (LPARAM)&sid);
+ Srmm_ModifyIcon(hContact, &sid);
}
return 0;
}
@@ -84,9 +84,9 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
if (sweep == 0)
sid.szTooltip = LPGEN("Keep all events");
else if (sweep == 1)
- sid.szTooltip = (char*)time_stamp_strings[db_get_b(NULL, ModuleName, "StartupShutdownOlder", 0)];
+ sid.szTooltip = time_stamp_strings[db_get_b(NULL, ModuleName, "StartupShutdownOlder", 0)];
else if (sweep == 2)
- sid.szTooltip = (char*)keep_strings[db_get_b(NULL, ModuleName, "StartupShutdownKeep", 0)];
+ sid.szTooltip = keep_strings[db_get_b(NULL, ModuleName, "StartupShutdownKeep", 0)];
else if (sweep == 3)
sid.szTooltip = LPGEN("Delete all events");
@@ -95,13 +95,13 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
sid.dwId = 1;
sid.hIcon = LoadIconEx("act1");
- sid.szTooltip = (char*)time_stamp_strings[db_get_b(NULL, ModuleName, "StartupShutdownOlder", 0)];
+ sid.szTooltip = time_stamp_strings[db_get_b(NULL, ModuleName, "StartupShutdownOlder", 0)];
sid.flags = MBF_HIDDEN;
Srmm_AddIcon(&sid);
sid.dwId = 2;
sid.hIcon = LoadIconEx("act2");
- sid.szTooltip = (char*)keep_strings[db_get_b(NULL, ModuleName, "StartupShutdownKeep", 0)];
+ sid.szTooltip = keep_strings[db_get_b(NULL, ModuleName, "StartupShutdownKeep", 0)];
sid.flags = MBF_HIDDEN;
Srmm_AddIcon(&sid);
@@ -123,7 +123,7 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
for(i = 0; i < 4; i++) {
sid.dwId = i;
sid.flags = (sweep == i) ? 0 : MBF_HIDDEN;
- CallService(MS_MSG_MODIFYICON, (WPARAM)hContact, (LPARAM)&sid);
+ Srmm_ModifyIcon(hContact, &sid);
}
}
diff --git a/plugins/HistorySweeperLight/src/options.cpp b/plugins/HistorySweeperLight/src/options.cpp
index 06686fe2d6..436fecd86f 100644
--- a/plugins/HistorySweeperLight/src/options.cpp
+++ b/plugins/HistorySweeperLight/src/options.cpp
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "historysweeperlight.h"
// Time Stamps strings
-const char* time_stamp_strings[] =
+char* time_stamp_strings[] =
{
LPGEN("Delete older than 1 day"),
LPGEN("Delete older than 3 days"),
@@ -34,7 +34,7 @@ const char* time_stamp_strings[] =
LPGEN("Delete older than 1 year (365 days)")
};
-const char* keep_strings[] =
+char* keep_strings[] =
{
LPGEN("Keep 1 last event"),
LPGEN("Keep 2 last events"),
@@ -179,14 +179,13 @@ void SaveSettings(HWND hwndDlg)
st = SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, 0);
if ( st != 0 ) db_set_b(hContact, ModuleName, "SweepHistory", (BYTE)st);
- else db_unset(hContact, ModuleName, "SweepHistory");
+ else db_unset(hContact, ModuleName, "SweepHistory");
// set per-contact icons in status bar
- for(i = 0; i < 4; i++)
- {
+ for(i = 0; i < 4; i++) {
sid.dwId = i;
sid.flags = (st == i) ? 0 : MBF_HIDDEN;
- CallService(MS_MSG_MODIFYICON, (WPARAM)hContact, (LPARAM)&sid);
+ Srmm_ModifyIcon(hContact, &sid);
}
}
@@ -194,20 +193,20 @@ void SaveSettings(HWND hwndDlg)
st = db_get_b(NULL, ModuleName, "SweepHistory", 0);
sid.dwId = 0;
- if (st == 0) sid.szTooltip = Translate("Keep all events");
- else if (st == 1) sid.szTooltip = Translate(time_stamp_strings[db_get_b(NULL, ModuleName, "StartupShutdownOlder", 0)]);
- else if (st == 2) sid.szTooltip = Translate(keep_strings[db_get_b(NULL, ModuleName, "StartupShutdownKeep", 0)]);
- else if (st == 3) sid.szTooltip = Translate("Delete all events");
- CallService(MS_MSG_MODIFYICON, 0, (LPARAM)&sid);
+ if (st == 0) sid.szTooltip = LPGEN("Keep all events");
+ else if (st == 1) sid.szTooltip = LPGEN(time_stamp_strings[db_get_b(NULL, ModuleName, "StartupShutdownOlder", 0)]);
+ else if (st == 2) sid.szTooltip = LPGEN(keep_strings[db_get_b(NULL, ModuleName, "StartupShutdownKeep", 0)]);
+ else if (st == 3) sid.szTooltip = LPGEN("Delete all events");
+ Srmm_ModifyIcon(NULL, &sid);
sid.dwId = 1;
- sid.szTooltip = Translate(time_stamp_strings[db_get_b(NULL, ModuleName, "StartupShutdownOlder", 0)]);
- CallService(MS_MSG_MODIFYICON, 0, (LPARAM)&sid);
+ sid.szTooltip = time_stamp_strings[db_get_b(NULL, ModuleName, "StartupShutdownOlder", 0)];
+ Srmm_ModifyIcon(NULL, &sid);
sid.dwId = 2;
- sid.szTooltip = Translate(keep_strings[db_get_b(NULL, ModuleName, "StartupShutdownKeep", 0)]);
- CallService(MS_MSG_MODIFYICON, 0, (LPARAM)&sid);
-}//SaveSettings
+ sid.szTooltip = keep_strings[db_get_b(NULL, ModuleName, "StartupShutdownKeep", 0)];
+ Srmm_ModifyIcon(NULL, &sid);
+}
INT_PTR CALLBACK DlgProcHSOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{