summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/Notifications.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-08-08 19:29:41 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-08-08 19:29:41 +0000
commit0b7dc4b65ecb2b3367a8a68973fb4b97ce643947 (patch)
tree77c2eda251dcd7a44d9e6b6a4be91f3e2c2b6e5e /plugins/PluginUpdater/src/Notifications.cpp
parent5224477773e6e5fc858df2d7c71e92b946d29098 (diff)
dynamic updates dialog
git-svn-id: http://svn.miranda-ng.org/main/trunk@1408 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src/Notifications.cpp')
-rw-r--r--plugins/PluginUpdater/src/Notifications.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/plugins/PluginUpdater/src/Notifications.cpp b/plugins/PluginUpdater/src/Notifications.cpp
index 04b24b56e2..70a337d88b 100644
--- a/plugins/PluginUpdater/src/Notifications.cpp
+++ b/plugins/PluginUpdater/src/Notifications.cpp
@@ -20,6 +20,7 @@ Boston, MA 02111-1307, USA.
#include "common.h"
HWND hwndDialog = NULL;
+static bool bShowDetails;
void PopupAction(HWND hWnd, BYTE action)
{
@@ -289,6 +290,14 @@ static void ApplyUpdates(void* param)
CallFunctionAsync(RestartMe, 0);
}
+static void ResizeVert(HWND hDlg, int yy)
+{
+ RECT r = { 0, 0, 244, yy };
+ MapDialogRect(hDlg, &r);
+ r.bottom += GetSystemMetrics(SM_CYSMCAPTION);
+ SetWindowPos(hDlg, 0, 0, 0, r.right, r.bottom, SWP_NOMOVE | SWP_NOZORDER);
+}
+
INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
HWND hwndList = GetDlgItem(hDlg, IDC_LIST_UPDATES);
@@ -343,8 +352,12 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
todo[i].enabled = true;
}
HWND hwOk = GetDlgItem(hDlg, IDOK);
- EnableWindow(hwOk, true/*one_enabled ? TRUE : FALSE*/);
+ EnableWindow(hwOk, true);
}
+
+ bShowDetails = false;
+ ResizeVert(hDlg, 60);
+
// do this after filling list - enables 'ITEMCHANGED' below
SetWindowLongPtr(hDlg, GWLP_USERDATA, lParam);
Utils_RestoreWindowPositionNoSize(hDlg,0,MODNAME,"ConfirmWindow");
@@ -390,6 +403,11 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
mir_forkthread(ApplyUpdates, hDlg);
return TRUE;
+ case IDC_DETAILS:
+ bShowDetails = !bShowDetails;
+ ResizeVert(hDlg, bShowDetails ? 242 : 60);
+ break;
+
case IDC_SELALL:
SelectAll(hDlg, true);
break;