summaryrefslogtreecommitdiff
path: root/Source/exehead/Ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'Source/exehead/Ui.c')
-rwxr-xr-xSource/exehead/Ui.c34
1 files changed, 24 insertions, 10 deletions
diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c
index 6e6b3bf..1fa13c4 100755
--- a/Source/exehead/Ui.c
+++ b/Source/exehead/Ui.c
@@ -3,7 +3,7 @@
*
* This file is a part of NSIS.
*
- * Copyright (C) 1999-2016 Nullsoft, Jeff Doozan and Contributors
+ * Copyright (C) 1999-2017 Nullsoft, Jeff Doozan and Contributors
*
* Licensed under the zlib/libpng license (the "License");
* you may not use this file except in compliance with the License.
@@ -103,6 +103,15 @@ static void NSISCALL SetActiveCtl(HWND hCtl)
SendMessage(g_hwnd, WM_NEXTDLGCTL, (WPARAM) hCtl, TRUE);
}
+static BOOL NSISCALL LaunchURL(HWND hOwner, LPCTSTR URL, int ShowMode)
+{
+ SHELLEXECUTEINFO sei;
+ sei.fMask = SEE_MASK_FLAG_NO_UI|SEE_MASK_FLAG_DDEWAIT;
+ sei.hwnd = hOwner, sei.nShow = SW_SHOWNORMAL;
+ sei.lpVerb = _T("open"), sei.lpFile = URL, sei.lpParameters=NULL, sei.lpDirectory = NULL;
+ return myShellExecuteEx(&sei);
+}
+
static void NSISCALL NotifyCurWnd(UINT uNotifyCode)
{
if (m_curwnd)
@@ -170,6 +179,16 @@ void NSISCALL build_g_logfile()
int *cur_langtable;
+static TCHAR* update_caption()
+{
+ TCHAR *gcap = g_caption;
+ GetNSISString(gcap, LANG_CAPTION);
+#ifdef NSIS_SUPPORT_BGBG
+ my_SetWindowText(m_bgwnd, gcap);
+#endif
+ return gcap;
+}
+
static void NSISCALL set_language()
{
LANGID lang_mask=(LANGID)~0;
@@ -200,14 +219,9 @@ lang_again:
}
cur_langtable = selected_langtable;
-
myitoa(state_language, *(LANGID*)language_table);
- {
- TCHAR *caption = GetNSISString(g_caption,LANG_CAPTION);
-#ifdef NSIS_SUPPORT_BGBG
- my_SetWindowText(m_bgwnd, caption);
-#endif
- }
+
+ update_caption();
// reload section names
{
@@ -581,7 +595,7 @@ nextPage:
SetActiveCtl(m_hwndOK);
}
- mystrcpy(g_tmp,g_caption);
+ mystrcpy(g_tmp,update_caption());
GetNSISString(g_tmp+mystrlen(g_tmp),this_page->caption);
my_SetWindowText(hwndDlg,g_tmp);
@@ -808,7 +822,7 @@ static INT_PTR CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
if (tr.chrg.cpMax-tr.chrg.cpMin < COUNTOF(ps_tmpbuf)) {
SendMessage(hwLicense,EM_GETTEXTRANGE,0,(LPARAM)&tr);
SetCursor(LoadCursor(0, IDC_WAIT));
- ShellExecute(hwndDlg,_T("open"),tr.lpstrText,NULL,NULL,SW_SHOWNORMAL);
+ LaunchURL(hwndDlg,tr.lpstrText,SW_SHOWNORMAL);
SetCursor(LoadCursor(0, IDC_ARROW));
}
}