diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-05-30 11:37:54 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-05-30 11:37:54 +0000 |
commit | 7b40d91a4f81cbba63ae7cabc263af69539bd22b (patch) | |
tree | 8fae732011bf7f5138092b97f3c8fcedf3990095 /plugins/YAPP/src/services.cpp | |
parent | 98b1830b0bef5b46ce8d023b6aeef5e6d02350bf (diff) |
Unify Popup's and YAPP's value to check if they are enabled; YAPP's version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@9369 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YAPP/src/services.cpp')
-rw-r--r-- | plugins/YAPP/src/services.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/plugins/YAPP/src/services.cpp b/plugins/YAPP/src/services.cpp index aec7da79f6..772b7aaff3 100644 --- a/plugins/YAPP/src/services.cpp +++ b/plugins/YAPP/src/services.cpp @@ -70,7 +70,7 @@ static INT_PTR CreatePopup(WPARAM wParam, LPARAM lParam) pd_out->timeout = pd_in->iSeconds;
lstPopupHistory.Add(pd_out->pwzTitle, pd_out->pwzText, time(0));
- if (!db_get_b(0, MODULE, "Enabled", 1)) {
+ if (!db_get_b(0, "Popup", "ModuleIsEnabled", 1)) {
mir_free(pd_out->pwzTitle);
mir_free(pd_out->pwzText);
mir_free(pd_out);
@@ -111,7 +111,7 @@ static INT_PTR CreatePopupW(WPARAM wParam, LPARAM lParam) pd_out->timeout = pd_in->iSeconds;
lstPopupHistory.Add(pd_out->pwzTitle, pd_out->pwzText, time(0));
- if (!db_get_b(0, MODULE, "Enabled", 1)) {
+ if (!db_get_b(0, "Popup", "ModuleIsEnabled", 1)) {
mir_free(pd_out->pwzTitle);
mir_free(pd_out->pwzText);
mir_free(pd_out);
@@ -151,7 +151,7 @@ void ShowPopup(PopupData &pd_in) lstPopupHistory.Add(pd_out->pwzTitle, pd_out->pwzText, time(0));
- if (!db_get_b(0, MODULE, "Enabled", 1)) {
+ if (!db_get_b(0, "Popup", "ModuleIsEnabled", 1)) {
mir_free(pd_out->pwzTitle);
mir_free(pd_out->pwzText);
mir_free(pd_out);
@@ -193,7 +193,7 @@ static INT_PTR GetOpaque(WPARAM wParam, LPARAM lParam) void UpdateMenu()
{
- bool isEnabled = db_get_b(0, MODULE, "Enabled", 1) == 1;
+ bool isEnabled = db_get_b(0, "Popup", "ModuleIsEnabled", 1) == 1;
CLISTMENUITEM mi = { sizeof(mi) };
mi.ptszName = (isEnabled ? LPGENT("Disable Popups") : LPGENT("Enable Popups"));
@@ -213,21 +213,21 @@ INT_PTR PopupQuery(WPARAM wParam, LPARAM lParam) switch(wParam) {
case PUQS_ENABLEPOPUPS:
{
- bool enabled = db_get_b(0, MODULE, "Enabled", 1) != 0;
- if (!enabled) db_set_b(0, MODULE, "Enabled", 1);
+ bool enabled = db_get_b(0, "Popup", "ModuleIsEnabled", 1) != 0;
+ if (!enabled) db_set_b(0, "Popup", "ModuleIsEnabled", 1);
return !enabled;
}
break;
case PUQS_DISABLEPOPUPS:
{
- bool enabled = db_get_b(0, MODULE, "Enabled", 1) != 0;
- if (enabled) db_set_b(0, MODULE, "Enabled", 0);
+ bool enabled = db_get_b(0, "Popup", "ModuleIsEnabled", 1) != 0;
+ if (enabled) db_set_b(0, "Popup", "ModuleIsEnabled", 0);
return enabled;
}
break;
case PUQS_GETSTATUS:
- return db_get_b(0, MODULE, "Enabled", 1);
+ return db_get_b(0, "Popup", "ModuleIsEnabled", 1);
default:
return 1;
@@ -238,8 +238,8 @@ INT_PTR PopupQuery(WPARAM wParam, LPARAM lParam) static INT_PTR TogglePopups(WPARAM wParam, LPARAM lParam)
{
- BYTE val = db_get_b(0, MODULE, "Enabled", 1);
- db_set_b(0, MODULE, "Enabled", !val);
+ BYTE val = db_get_b(0, "Popup", "ModuleIsEnabled", 1);
+ db_set_b(0, "Popup", "ModuleIsEnabled", !val);
UpdateMenu();
return 0;
}
@@ -288,7 +288,7 @@ static INT_PTR ShowMessage(WPARAM wParam, LPARAM lParam) if (bShutdown)
return -1;
- if (db_get_b(0, MODULE, "Enabled", 1)) {
+ if (db_get_b(0, "Popup", "ModuleIsEnabled", 1)) {
POPUPDATAT pd = {0};
_tcscpy(pd.lptzContactName, lParam == SM_WARNING ? _T("Warning") : _T("Notification"));
pd.lchIcon = LoadIcon(0, lParam == SM_WARNING ? IDI_WARNING : IDI_INFORMATION);
@@ -303,7 +303,7 @@ static INT_PTR ShowMessageW(WPARAM wParam, LPARAM lParam) if (bShutdown)
return -1;
- if (db_get_b(0, MODULE, "Enabled", 1)) {
+ if (db_get_b(0, "Popup", "ModuleIsEnabled", 1)) {
POPUPDATAW pd = {0};
wcscpy(pd.lpwzContactName, lParam == SM_WARNING ? L"Warning" : L"Notification");
pd.lchIcon = LoadIcon(0, lParam == SM_WARNING ? IDI_WARNING : IDI_INFORMATION);
|