From 38b94f19a5bc2a3d11a3ebf8d22d03d8f07bd77e Mon Sep 17 00:00:00 2001 From: kichik Date: Thu, 17 Mar 2005 20:44:31 +0000 Subject: [PATCH] implemented feature request #1159701 - "RTLREADING" flag support in the "MessageBox" git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3922 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/build.cpp | 2 +- Source/exehead/Main.c | 2 +- Source/exehead/exec.c | 6 +++--- Source/exehead/util.c | 6 +++--- Source/script.cpp | 8 ++++---- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Source/build.cpp b/Source/build.cpp index 8ad58cdb..07da33ea 100644 --- a/Source/build.cpp +++ b/Source/build.cpp @@ -3245,7 +3245,7 @@ again: // error if (add_label("Initialize_____Plugins_error")) return PS_ERROR; // error message box - ret=add_entry_direct(EW_MESSAGEBOX, MB_OK|MB_ICONSTOP|(IDOK<<20), add_string("Error! Can't initialize plug-ins directory. Please try again later.")); + ret=add_entry_direct(EW_MESSAGEBOX, MB_OK|MB_ICONSTOP|(IDOK<<21), add_string("Error! Can't initialize plug-ins directory. Please try again later.")); if (ret != PS_OK) return ret; // Quit ret=add_entry_direct(EW_QUIT); diff --git a/Source/exehead/Main.c b/Source/exehead/Main.c index aac9eb55..97a33805 100644 --- a/Source/exehead/Main.c +++ b/Source/exehead/Main.c @@ -261,7 +261,7 @@ end: if (m_Err) { - my_MessageBox(m_Err, MB_OK | MB_ICONSTOP | (IDOK << 20)); + my_MessageBox(m_Err, MB_OK | MB_ICONSTOP | (IDOK << 21)); ExitProcess(2); return 0; } diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c index 148a7658..2ec4706d 100644 --- a/Source/exehead/exec.c +++ b/Source/exehead/exec.c @@ -496,7 +496,7 @@ static int NSISCALL ExecuteEntry(entry *entry_) GetNSISString(buf0,LANG_ERRORDECOMPRESSING); } log_printf2("%s",buf0); - my_MessageBox(buf0,MB_OK|MB_ICONSTOP|(IDOK<<20)); + my_MessageBox(buf0,MB_OK|MB_ICONSTOP|(IDOK<<21)); return EXEC_ERROR; } } @@ -667,7 +667,7 @@ static int NSISCALL ExecuteEntry(entry *entry_) if (!s) { log_printf2("Exch: stack < %d elements",parm2); - my_MessageBox(GetNSISStringTT(LANG_INSTCORRUPTED),MB_OK|MB_ICONSTOP|(IDOK<<20)); + my_MessageBox(GetNSISStringTT(LANG_INSTCORRUPTED),MB_OK|MB_ICONSTOP|(IDOK<<21)); return EXEC_ERROR; } mystrcpy(buf0,s->text); @@ -1069,7 +1069,7 @@ static int NSISCALL ExecuteEntry(entry *entry_) case EW_REBOOT: if (parm0!=0xbadf00d) { - my_MessageBox(GetNSISStringTT(LANG_INSTCORRUPTED),MB_OK|MB_ICONSTOP|(IDOK<<20)); + my_MessageBox(GetNSISStringTT(LANG_INSTCORRUPTED),MB_OK|MB_ICONSTOP|(IDOK<<21)); return EXEC_ERROR; } diff --git a/Source/exehead/util.c b/Source/exehead/util.c index ac150b3e..79358ad9 100644 --- a/Source/exehead/util.c +++ b/Source/exehead/util.c @@ -78,11 +78,11 @@ int NSISCALL my_GetDialogItemText(UINT idx, char *val) } int NSISCALL my_MessageBox(const char *text, UINT type) { - int _type = type & 0x000FFFFF; + int _type = type & 0x001FFFFF; #ifdef NSIS_CONFIG_SILENT_SUPPORT // default for silent installers - if (g_exec_flags.silent && type >> 20) - return type >> 20; + if (g_exec_flags.silent && type >> 21) + return type >> 21; #endif // no silent or no default, just show if (g_exec_flags.rtl) diff --git a/Source/script.cpp b/Source/script.cpp index a91bb33f..b1763f5d 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -3558,7 +3558,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) { int k=line.gettoken_enum(4,retstr); if (k <= 0) PRINTHELP(); - ent.offsets[0]|=rettab[k]<<20; + ent.offsets[0]|=rettab[k]<<21; a=5; } else if (line.getnumtokens() > 7) @@ -5477,7 +5477,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) DefineInnerLangString(NLF_CANT_WRITE); ent.offsets[0]=1; // overwrite off - ent.offsets[0]|=(MB_RETRYCANCEL|MB_ICONSTOP|(IDCANCEL<<20))<<3; + ent.offsets[0]|=(MB_RETRYCANCEL|MB_ICONSTOP|(IDCANCEL<<21))<<3; ent.offsets[1]=add_string(tempDLL); ent.offsets[2]=data_handle; ent.offsets[3]=0xffffffff; @@ -5887,13 +5887,13 @@ int CEXEBuild::add_file(const string& dir, const string& file, int attrib, const { mb = MB_ABORTRETRYIGNORE | MB_ICONSTOP; // default for silent installers - mb |= IDIGNORE << 20; + mb |= IDIGNORE << 21; } else { mb = MB_RETRYCANCEL | MB_ICONSTOP; // default for silent installers - mb |= IDCANCEL << 20; + mb |= IDCANCEL << 21; } ent.offsets[0] |= mb << 3;