summaryrefslogtreecommitdiff
path: root/plugins/WhenWasIt
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-08-01 19:52:54 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-08-01 19:52:54 +0300
commitcc0d067c335b23113c03eea94d735ecd6e3b945c (patch)
tree6b46bdb2ff3fe28144799e78ed6e24511652ff2b /plugins/WhenWasIt
parenta28bdfd70c5a3dc86fae95035e32870a170538f6 (diff)
fixes #3135 (WhenWasIt: после переписывания интерфейса на классы обрезается название группы настроек)
Diffstat (limited to 'plugins/WhenWasIt')
-rw-r--r--plugins/WhenWasIt/WhenWasIt.vcxproj19
-rw-r--r--plugins/WhenWasIt/WhenWasIt.vcxproj.filters53
-rw-r--r--plugins/WhenWasIt/src/options.cpp32
-rw-r--r--plugins/WhenWasIt/src/resource.h3
4 files changed, 14 insertions, 93 deletions
diff --git a/plugins/WhenWasIt/WhenWasIt.vcxproj b/plugins/WhenWasIt/WhenWasIt.vcxproj
index 060150066d..f0a5b19ae9 100644
--- a/plugins/WhenWasIt/WhenWasIt.vcxproj
+++ b/plugins/WhenWasIt/WhenWasIt.vcxproj
@@ -58,23 +58,4 @@
<ResourceCompile Include="res\version.rc" />
<ResourceCompile Include="res\WhenWasIt.rc" />
</ItemGroup>
- <ItemGroup>
- <Image Include="res\add.ico" />
- <Image Include="res\check.ico" />
- <Image Include="res\dtb0.ico" />
- <Image Include="res\dtb1.ico" />
- <Image Include="res\dtb2.ico" />
- <Image Include="res\dtb3.ico" />
- <Image Include="res\dtb4.ico" />
- <Image Include="res\dtb5.ico" />
- <Image Include="res\dtb6.ico" />
- <Image Include="res\dtb7.ico" />
- <Image Include="res\dtb8.ico" />
- <Image Include="res\dtb9.ico" />
- <Image Include="res\dtbX.ico" />
- <Image Include="res\export.ico" />
- <Image Include="res\import.ico" />
- <Image Include="res\list.ico" />
- <Image Include="res\refresh.ico" />
- </ItemGroup>
</Project> \ No newline at end of file
diff --git a/plugins/WhenWasIt/WhenWasIt.vcxproj.filters b/plugins/WhenWasIt/WhenWasIt.vcxproj.filters
index 783657b38c..c873dba007 100644
--- a/plugins/WhenWasIt/WhenWasIt.vcxproj.filters
+++ b/plugins/WhenWasIt/WhenWasIt.vcxproj.filters
@@ -88,57 +88,4 @@
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
- <ItemGroup>
- <Image Include="res\check.ico">
- <Filter>Resource Files</Filter>
- </Image>
- <Image Include="res\list.ico">
- <Filter>Resource Files</Filter>
- </Image>
- <Image Include="res\dtb1.ico">
- <Filter>Resource Files</Filter>
- </Image>
- <Image Include="res\dtb9.ico">
- <Filter>Resource Files</Filter>
- </Image>
- <Image Include="res\dtb2.ico">
- <Filter>Resource Files</Filter>
- </Image>
- <Image Include="res\dtb3.ico">
- <Filter>Resource Files</Filter>
- </Image>
- <Image Include="res\dtb4.ico">
- <Filter>Resource Files</Filter>
- </Image>
- <Image Include="res\dtb5.ico">
- <Filter>Resource Files</Filter>
- </Image>
- <Image Include="res\dtb6.ico">
- <Filter>Resource Files</Filter>
- </Image>
- <Image Include="res\dtb7.ico">
- <Filter>Resource Files</Filter>
- </Image>
- <Image Include="res\dtb8.ico">
- <Filter>Resource Files</Filter>
- </Image>
- <Image Include="res\dtb0.ico">
- <Filter>Resource Files</Filter>
- </Image>
- <Image Include="res\dtbX.ico">
- <Filter>Resource Files</Filter>
- </Image>
- <Image Include="res\add.ico">
- <Filter>Resource Files</Filter>
- </Image>
- <Image Include="res\refresh.ico">
- <Filter>Resource Files</Filter>
- </Image>
- <Image Include="res\import.ico">
- <Filter>Resource Files</Filter>
- </Image>
- <Image Include="res\export.ico">
- <Filter>Resource Files</Filter>
- </Image>
- </ItemGroup>
</Project> \ No newline at end of file
diff --git a/plugins/WhenWasIt/src/options.cpp b/plugins/WhenWasIt/src/options.cpp
index cd4fb8463d..d4f90d3125 100644
--- a/plugins/WhenWasIt/src/options.cpp
+++ b/plugins/WhenWasIt/src/options.cpp
@@ -71,10 +71,23 @@ static wchar_t* strtrim(wchar_t *str)
class COptionsDlg : public CDlgBase
{
CCtrlButton btnPreview;
- CCtrlCheck chkPopups, chkClistIcon, chkDialog, chkOncePerDay;
+ CCtrlCheck chkPopups, chkDialog, chkOncePerDay;
CCtrlCombo cmbAge, cmbLClick, cmbRClick, cmbNotify;
CCtrlColor clrFore, clrBack;
+ SIZE oldPopupsSize, oldDialogSize;
+
+ UI_MESSAGE_MAP(COptionsDlg, CDlgBase);
+ UI_MESSAGE(WM_INITDIALOG, OnInitWindow);
+ UI_MESSAGE_MAP_END();
+
+ INT_PTR OnInitWindow(UINT, WPARAM, LPARAM)
+ {
+ oldPopupsSize = GetControlTextSize(GetDlgItem(m_hwnd, IDC_USE_POPUPS));
+ oldDialogSize = GetControlTextSize(GetDlgItem(m_hwnd, IDC_USE_DIALOG));
+ return FALSE;
+ }
+
public:
COptionsDlg() :
CDlgBase(g_plugin, IDD_OPT_WWI),
@@ -87,7 +100,6 @@ public:
cmbRClick(this, IDC_RIGHT_CLICK),
chkPopups(this, IDC_USE_POPUPS),
chkDialog(this, IDC_USE_DIALOG),
- chkClistIcon(this, IDC_USE_CLISTICON),
chkOncePerDay(this, IDC_ONCE_PER_DAY)
{
CreateLink(clrFore, g_plugin.foreground);
@@ -97,18 +109,12 @@ public:
chkPopups.OnChange = Callback(this, &COptionsDlg::onChange_Popups);
chkDialog.OnChange = Callback(this, &COptionsDlg::onChange_Dialog);
- chkClistIcon.OnChange = Callback(this, &COptionsDlg::onChange_ClistIcon);
chkOncePerDay.OnChange = Callback(this, &COptionsDlg::onChange_OncePerDay);
}
bool OnInitDialog() override
{
- SIZE oldPopupsSize = GetControlTextSize(chkPopups.GetHwnd());
- SIZE oldClistIconSize = GetControlTextSize(chkClistIcon.GetHwnd());
- SIZE oldDialogSize = GetControlTextSize(GetDlgItem(m_hwnd, IDC_USE_DIALOG));
-
EnlargeControl(chkPopups.GetHwnd(), GetDlgItem(m_hwnd, IDC_POPUPS_STATIC), oldPopupsSize);
- EnlargeControl(chkClistIcon.GetHwnd(), GetDlgItem(m_hwnd, IDC_CLIST_STATIC), oldClistIconSize);
EnlargeControl(GetDlgItem(m_hwnd, IDC_USE_DIALOG), GetDlgItem(m_hwnd, IDC_DIALOG_STATIC), oldDialogSize);
for (auto &it : szShowAgeMode)
@@ -155,9 +161,6 @@ public:
CheckDlgButton(m_hwnd, IDC_USE_DIALOG, (g_plugin.bUseDialog) ? BST_CHECKED : BST_UNCHECKED);
chkPopups.SetState(g_plugin.bUsePopups);
-
- chkClistIcon.SetState(true);
- chkClistIcon.Disable();
return true;
}
@@ -220,13 +223,6 @@ public:
cmbRClick.Enable(bEnable);
}
- void onChange_ClistIcon(CCtrlCheck *pCheck)
- {
- bool bEnable = pCheck->GetState();
- EnableWindow(GetDlgItem(m_hwnd, IDC_CLIST_STATIC), bEnable);
- EnableWindow(GetDlgItem(m_hwnd, IDC_ADVANCED_ICON), bEnable);
- }
-
void onChange_Dialog(CCtrlCheck *pCheck)
{
bool bEnable = pCheck->GetState();
diff --git a/plugins/WhenWasIt/src/resource.h b/plugins/WhenWasIt/src/resource.h
index 063a8e2ef8..debc690fbe 100644
--- a/plugins/WhenWasIt/src/resource.h
+++ b/plugins/WhenWasIt/src/resource.h
@@ -27,14 +27,11 @@
#define IDD_ADD_ANNIVERSARY 127
#define IDD_UPCOMING 128
#define IDC_USE_POPUPS 1002
-#define IDC_USE_CLISTICON 1003
#define IDC_USE_DIALOG 1004
#define IDC_DAYS_IN_ADVANCE 1005
-#define IDC_ADVANCED_ICON 1008
#define IDC_CHECK_INTERVAL 1009
#define IDC_POPUP_TIMEOUT 1010
#define IDC_POPUPS_STATIC 1011
-#define IDC_CLIST_STATIC 1012
#define IDC_BACKGROUND 1014
#define IDC_FOREGROUND 1015
#define IDC_BIRTHDAYS_LIST 1016