summaryrefslogtreecommitdiff
path: root/plugins/Alarms/src/options.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-20 15:08:48 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-20 15:08:48 +0300
commit8a74e7495ce5ad39de4f5c25121a84d35df90c36 (patch)
tree03e5b4870f09a3163306740c2eebee47bc15b042 /plugins/Alarms/src/options.cpp
parentc5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff)
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'plugins/Alarms/src/options.cpp')
-rwxr-xr-xplugins/Alarms/src/options.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp
index 91880d9a80..3dc22dccba 100755
--- a/plugins/Alarms/src/options.cpp
+++ b/plugins/Alarms/src/options.cpp
@@ -68,7 +68,7 @@ static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LP
delete param;
- Utils_RestoreWindowPositionNoSize(hwndDlg, 0, MODULE, "AddEdit");
+ Utils_RestoreWindowPositionNoSize(hwndDlg, 0, MODULENAME, "AddEdit");
if (GetDlgCtrlID((HWND)wParam) != IDC_TITLE) {
SetFocus(GetDlgItem(hwndDlg, IDC_TITLE));
@@ -701,7 +701,7 @@ static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
else add_edit_alarm->sound_num = 0;
- Utils_SaveWindowPosition(hwndDlg, 0, MODULE, "AddEdit");
+ Utils_SaveWindowPosition(hwndDlg, 0, MODULENAME, "AddEdit");
// self-add (setting stored in invisible checkbox - see comments in WM_INITDIALOG
if (IsDlgButtonChecked(hwndDlg, IDC_CHK_INVIS)) {
@@ -734,7 +734,7 @@ static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LP
delete add_edit_alarm;
}
- Utils_SaveWindowPosition(hwndDlg, 0, MODULE, "AddEdit");
+ Utils_SaveWindowPosition(hwndDlg, 0, MODULENAME, "AddEdit");
// deal with modal and non-modal modes
PostMessage(hwndDlg, WMU_MYDESTROY, 0, 0);
@@ -820,7 +820,7 @@ void AddMenuItem()
SET_UID(mi, 0xd50b94e4, 0x8edd, 0x4083, 0x91, 0x93, 0x7c, 0x6a, 0xb8, 0x1, 0x41, 0xb9);
mi.hIcolibItem = IcoLib_GetIconHandle("alarms_menu_set");
mi.name.a = "Set alarm";
- mi.pszService = MODULE "/NewAlarm";
+ mi.pszService = MODULENAME "/NewAlarm";
mi.position = 500010000;
hMainMenuItem = Menu_AddMainMenuItem(&mi);
}
@@ -830,7 +830,7 @@ void AddMenuItem()
int OptionsModulesLoaded(WPARAM, LPARAM)
{
- CreateServiceFunction(MODULE "/NewAlarm", NewAlarmMenuFunc);
+ CreateServiceFunction(MODULENAME "/NewAlarm", NewAlarmMenuFunc);
AddMenuItem();
@@ -1224,36 +1224,36 @@ int OptInit(WPARAM wParam, LPARAM)
void LoadOptions()
{
- options.use_popup_module = (db_get_b(0, MODULE, "UsePopupModule", 0) == 1);
- options.snooze_minutes = (int)db_get_dw(0, MODULE, "SnoozeMinutes", 10);
- options.row_height = (int)db_get_dw(0, MODULE, "RowHeight", 20);
- options.indent = (int)db_get_dw(0, MODULE, "Indent", 5);
- options.aw_trans = (int)db_get_b(0, MODULE, "Transparency", 0);
- options.aw_roundcorners = (db_get_b(0, MODULE, "RoundCorners", 1) == 1);
- options.aw_dontstealfocus = (db_get_b(0, MODULE, "DontStealFocus", 1) == 1);
- options.auto_showhide = (db_get_b(0, MODULE, "AutoShowHide", 0) == 1);
- options.hide_with_clist = (db_get_b(0, MODULE, "HideWithClist", 0) == 1);
- options.loop_sound = (db_get_b(0, MODULE, "LoopSound", 1) == 1);
- options.auto_size_vert = (db_get_b(0, MODULE, "AutoSize", 0) == 1);
- options.reminder_period = (int)db_get_dw(0, MODULE, "ReminderPeriod", 8);
+ options.use_popup_module = (db_get_b(0, MODULENAME, "UsePopupModule", 0) == 1);
+ options.snooze_minutes = (int)db_get_dw(0, MODULENAME, "SnoozeMinutes", 10);
+ options.row_height = (int)db_get_dw(0, MODULENAME, "RowHeight", 20);
+ options.indent = (int)db_get_dw(0, MODULENAME, "Indent", 5);
+ options.aw_trans = (int)db_get_b(0, MODULENAME, "Transparency", 0);
+ options.aw_roundcorners = (db_get_b(0, MODULENAME, "RoundCorners", 1) == 1);
+ options.aw_dontstealfocus = (db_get_b(0, MODULENAME, "DontStealFocus", 1) == 1);
+ options.auto_showhide = (db_get_b(0, MODULENAME, "AutoShowHide", 0) == 1);
+ options.hide_with_clist = (db_get_b(0, MODULENAME, "HideWithClist", 0) == 1);
+ options.loop_sound = (db_get_b(0, MODULENAME, "LoopSound", 1) == 1);
+ options.auto_size_vert = (db_get_b(0, MODULENAME, "AutoSize", 0) == 1);
+ options.reminder_period = (int)db_get_dw(0, MODULENAME, "ReminderPeriod", 8);
HookEvent(ME_SYSTEM_MODULESLOADED, OptionsModulesLoaded);
}
void SaveOptions()
{
- db_set_b(0, MODULE, "UsePopupModule", options.use_popup_module ? 1 : 0);
- db_set_dw(0, MODULE, "SnoozeMinutes", options.snooze_minutes);
- db_set_dw(0, MODULE, "RowHeight", options.row_height);
- db_set_dw(0, MODULE, "Indent", options.indent);
- db_set_b(0, MODULE, "Transparency", options.aw_trans);
- db_set_b(0, MODULE, "RoundCorners", options.aw_roundcorners ? 1 : 0);
- db_set_b(0, MODULE, "DontStealFocus", options.aw_dontstealfocus ? 1 : 0);
- db_set_b(0, MODULE, "AutoShowHide", options.auto_showhide ? 1 : 0);
- db_set_b(0, MODULE, "HideWithClist", options.hide_with_clist ? 1 : 0);
- db_set_b(0, MODULE, "LoopSound", options.loop_sound ? 1 : 0);
- db_set_b(0, MODULE, "AutoSize", options.auto_size_vert ? 1 : 0);
- db_set_dw(0, MODULE, "ReminderPeriod", options.reminder_period);
+ db_set_b(0, MODULENAME, "UsePopupModule", options.use_popup_module ? 1 : 0);
+ db_set_dw(0, MODULENAME, "SnoozeMinutes", options.snooze_minutes);
+ db_set_dw(0, MODULENAME, "RowHeight", options.row_height);
+ db_set_dw(0, MODULENAME, "Indent", options.indent);
+ db_set_b(0, MODULENAME, "Transparency", options.aw_trans);
+ db_set_b(0, MODULENAME, "RoundCorners", options.aw_roundcorners ? 1 : 0);
+ db_set_b(0, MODULENAME, "DontStealFocus", options.aw_dontstealfocus ? 1 : 0);
+ db_set_b(0, MODULENAME, "AutoShowHide", options.auto_showhide ? 1 : 0);
+ db_set_b(0, MODULENAME, "HideWithClist", options.hide_with_clist ? 1 : 0);
+ db_set_b(0, MODULENAME, "LoopSound", options.loop_sound ? 1 : 0);
+ db_set_b(0, MODULENAME, "AutoSize", options.auto_size_vert ? 1 : 0);
+ db_set_dw(0, MODULENAME, "ReminderPeriod", options.reminder_period);
}
INT_PTR NewAlarmMenuFunc(WPARAM, LPARAM)