diff options
author | George Hazan <ghazan@miranda.im> | 2019-03-05 21:10:22 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-03-05 21:10:22 +0300 |
commit | d9fddc0cfa9066eb1b5ad3f4807b37426ae6ca88 (patch) | |
tree | f09baaf9b91477d009cedc5bd77449b0fa3e3af7 /src/core/stdmsg | |
parent | 8a1ff32e54b39ceef22df61bda17bbfda94918fc (diff) |
Popup:
- wiping out checks for service presence;
- code cleaning
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r-- | src/core/stdmsg/src/chat_manager.cpp | 1 | ||||
-rw-r--r-- | src/core/stdmsg/src/chat_options.cpp | 35 | ||||
-rw-r--r-- | src/core/stdmsg/src/globals.h | 2 |
3 files changed, 14 insertions, 24 deletions
diff --git a/src/core/stdmsg/src/chat_manager.cpp b/src/core/stdmsg/src/chat_manager.cpp index 5f01aa640c..86dc4aa572 100644 --- a/src/core/stdmsg/src/chat_manager.cpp +++ b/src/core/stdmsg/src/chat_manager.cpp @@ -224,7 +224,6 @@ static void ShowRoom(SESSION_INFO *si) int OnCheckPlugins(WPARAM, LPARAM) { g_dat.bSmileyInstalled = ServiceExists(MS_SMILEYADD_REPLACESMILEYS); - g_dat.bPopupInstalled = ServiceExists(MS_POPUP_ADDPOPUPW); return 0; } diff --git a/src/core/stdmsg/src/chat_options.cpp b/src/core/stdmsg/src/chat_options.cpp index 4089bea769..ded9c7b1c7 100644 --- a/src/core/stdmsg/src/chat_options.cpp +++ b/src/core/stdmsg/src/chat_options.cpp @@ -320,8 +320,7 @@ class COptMainDlg : public CDlgBase CheckHeading(hListHeading3); CheckHeading(hListHeading4); CheckHeading(hListHeading5); - if (g_dat.bPopupInstalled) - CheckHeading(hListHeading6); + CheckHeading(hListHeading6); } public: @@ -341,17 +340,15 @@ public: hListHeading3 = InsertBranch(LPGEN("Default events to show in new chat rooms if the 'event filter' is enabled"), db_get_b(0, CHAT_MODULE, "Branch3Exp", 0) ? TRUE : FALSE); hListHeading4 = InsertBranch(LPGEN("Icons to display in the message log"), db_get_b(0, CHAT_MODULE, "Branch4Exp", 0) ? TRUE : FALSE); hListHeading5 = InsertBranch(LPGEN("Icons to display in the tray"), db_get_b(0, CHAT_MODULE, "Branch5Exp", 0) ? TRUE : FALSE); + hListHeading6 = InsertBranch(LPGEN("Popups to display"), db_get_b(0, CHAT_MODULE, "Branch6Exp", 0) ? TRUE : FALSE); FillBranch(hListHeading1, branch1, _countof(branch1), 0); FillBranch(hListHeading2, branch2, _countof(branch2), 0); FillBranch(hListHeading3, branch3, _countof(branch3), 0x03E0); FillBranch(hListHeading4, branch4, _countof(branch4), 0x0000); FillBranch(hListHeading5, branch5, _countof(branch5), 0x1000); - - if (g_dat.bPopupInstalled) { - hListHeading6 = InsertBranch(LPGEN("Popups to display"), db_get_b(0, CHAT_MODULE, "Branch6Exp", 0) ? TRUE : FALSE); - FillBranch(hListHeading6, branch6, _countof(branch6), 0x0000); - } + FillBranch(hListHeading6, branch6, _countof(branch6), 0x0000); + FixHeadings(); return true; } @@ -363,8 +360,7 @@ public: SaveBranch(branch3, _countof(branch3)); SaveBranch(branch4, _countof(branch4)); SaveBranch(branch5, _countof(branch5)); - if (g_dat.bPopupInstalled) - SaveBranch(branch6, _countof(branch6)); + SaveBranch(branch6, _countof(branch6)); g_chatApi.ReloadSettings(); Chat_UpdateOptions(); @@ -383,11 +379,8 @@ public: db_set_b(0, CHAT_MODULE, "Branch4Exp", b); b = checkBoxes.GetItemState(hListHeading5, TVIS_EXPANDED) & TVIS_EXPANDED ? 1 : 0; db_set_b(0, CHAT_MODULE, "Branch5Exp", b); - - if (g_dat.bPopupInstalled) { - b = checkBoxes.GetItemState(hListHeading6, TVIS_EXPANDED) & TVIS_EXPANDED ? 1 : 0; - db_set_b(0, CHAT_MODULE, "Branch6Exp", b); - } + b = checkBoxes.GetItemState(hListHeading6, TVIS_EXPANDED) & TVIS_EXPANDED ? 1 : 0; + db_set_b(0, CHAT_MODULE, "Branch6Exp", b); } void onChange_Tree(CCtrlTreeView::TEventInfo *evt) @@ -669,13 +662,11 @@ int ChatOptionsInitialize(WPARAM wParam) odp.pDialog = new COptLogDlg(); g_plugin.addOptions(wParam, &odp); - if (g_dat.bPopupInstalled) { - odp.position = 910000002; - odp.szTitle.a = LPGEN("Chat"); - odp.szGroup.a = LPGEN("Popups"); - odp.szTab.a = nullptr; - odp.pDialog = new COptPopupDlg(); - g_plugin.addOptions(wParam, &odp); - } + odp.position = 910000002; + odp.szTitle.a = LPGEN("Chat"); + odp.szGroup.a = LPGEN("Popups"); + odp.szTab.a = nullptr; + odp.pDialog = new COptPopupDlg(); + g_plugin.addOptions(wParam, &odp); return 0; } diff --git a/src/core/stdmsg/src/globals.h b/src/core/stdmsg/src/globals.h index 7640aa8c4d..0f8cdad3aa 100644 --- a/src/core/stdmsg/src/globals.h +++ b/src/core/stdmsg/src/globals.h @@ -65,7 +65,7 @@ struct GlobalMessageData CMOption<BYTE> iLoadHistory;
CMOption<WORD> nLoadCount, nLoadTime;
- bool bSmileyInstalled = false, bPopupInstalled = false;
+ bool bSmileyInstalled = false;
};
void InitGlobals();
|