summaryrefslogtreecommitdiff
path: root/plugins/HistorySweeperLight/src/options.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-11 16:47:12 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-11 16:47:12 +0000
commit52fe3f7be13509bd336c5efa28b8310a23211034 (patch)
tree70e0948e92b71cd09367545f9655dc343c5cc862 /plugins/HistorySweeperLight/src/options.cpp
parentfa837bfbc2a705947b14f1ce8ba36d996bb11104 (diff)
- Srmm_ModifyIcon helper applied instead of CallService(MS_MSG_MODIFYICON)
- various fixes related to SRMM icons; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@4426 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HistorySweeperLight/src/options.cpp')
-rw-r--r--plugins/HistorySweeperLight/src/options.cpp31
1 files changed, 15 insertions, 16 deletions
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)
{