summaryrefslogtreecommitdiff
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
parent5224477773e6e5fc858df2d7c71e92b946d29098 (diff)
dynamic updates dialog
git-svn-id: http://svn.miranda-ng.org/main/trunk@1408 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/PluginUpdater/res/Resource.rc25
-rw-r--r--plugins/PluginUpdater/src/Notifications.cpp20
-rw-r--r--plugins/PluginUpdater/src/resource.h7
3 files changed, 37 insertions, 15 deletions
diff --git a/plugins/PluginUpdater/res/Resource.rc b/plugins/PluginUpdater/res/Resource.rc
index a2be929413..768f348f9f 100644
--- a/plugins/PluginUpdater/res/Resource.rc
+++ b/plugins/PluginUpdater/res/Resource.rc
@@ -35,17 +35,19 @@ IDI_CANCEL ICON "btnClose.ico"
// Dialog
//
-IDD_UPDATE DIALOGEX 0, 0, 241, 206
+IDD_UPDATE DIALOGEX 0, 0, 240, 236
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Updates found!"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- DEFPUSHBUTTON "Update",IDOK,12,188,50,14
- PUSHBUTTON "Select &all",IDC_SELALL,68,188,50,14,NOT WS_TABSTOP
- PUSHBUTTON "Cancel",IDCANCEL,180,188,50,14
- CTEXT "PluginUpdater has detected updated versions\nof the following Miranda components:",IDC_UPDATETEXT,9,9,223,22
- CONTROL "",IDC_LIST_UPDATES,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,6,35,229,149
- PUSHBUTTON "Select &none",IDC_SELNONE,124,188,50,14,NOT WS_TABSTOP
+ CTEXT "PluginUpdater has detected updated versions of some Miranda components. Click on Details button to view more information",IDC_UPDATETEXT,9,9,223,22
+ DEFPUSHBUTTON "Update",IDOK,32,36,50,14
+ PUSHBUTTON "Details >>",IDC_DETAILS,95,36,50,14,NOT WS_TABSTOP
+ PUSHBUTTON "Cancel",IDCANCEL,157,36,50,14
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,1,58,236,1
+ CONTROL "",IDC_LIST_UPDATES,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,6,64,229,149
+ PUSHBUTTON "Select &all",IDC_SELALL,129,218,50,14,NOT WS_TABSTOP
+ PUSHBUTTON "Select &none",IDC_SELNONE,185,218,50,14,NOT WS_TABSTOP
END
IDD_POPUPDUMMI DIALOGEX 65526, 65526, 1, 1
@@ -127,18 +129,18 @@ END
// TEXTINCLUDE
//
-1 TEXTINCLUDE
+1 TEXTINCLUDE
BEGIN
"..\\src\\resource.h\0"
END
-2 TEXTINCLUDE
+2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
-3 TEXTINCLUDE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
@@ -157,7 +159,7 @@ GUIDELINES DESIGNINFO
BEGIN
IDD_UPDATE, DIALOG
BEGIN
- BOTTOMMARGIN, 204
+ BOTTOMMARGIN, 234
END
IDD_POPUPDUMMI, DIALOG
@@ -188,4 +190,3 @@ END
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
-
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;
diff --git a/plugins/PluginUpdater/src/resource.h b/plugins/PluginUpdater/src/resource.h
index 40bb68f2ca..c5d64e2b7f 100644
--- a/plugins/PluginUpdater/src/resource.h
+++ b/plugins/PluginUpdater/src/resource.h
@@ -17,6 +17,7 @@
#define IDC_INFO2 1005
#define IDC_SELNONE 1005
#define IDC_LABEL 1006
+#define IDC_DETAILS 1006
#define IDC_USEWINCOLORS 1007
#define IDC_RC 1008
#define IDC_USEPOPUPCOLORS 1009
@@ -40,6 +41,7 @@
#define IDC_PROGR_DLG_MSG 1027
#define IDC_LINK_HOTKEY 1028
#define IDC_UPDATEICONS 1029
+#define IDC_SEPARATOR 1030
#define IDC_NOTIFY 1034
#define IDC_UPDATEONSTARTUP 1035
#define IDC_ONLYONCEADAY 1036
@@ -47,6 +49,7 @@
#define IDC_PERIOD 1038
#define IDC_PERIODSPIN 1039
#define IDC_PERIODMEASURE 1040
+#define IDC_EDIT1 1042
#define IDC_MSG_BOXES 40071
#define IDC_ERRORS 40072
#define IDC_INFO_MESSAGES 40073
@@ -61,12 +64,12 @@
#define IDC_PROGR_DLG_BG 42074
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 110
#define _APS_NEXT_COMMAND_VALUE 40075
-#define _APS_NEXT_CONTROL_VALUE 1042
+#define _APS_NEXT_CONTROL_VALUE 1043
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif