Back to pop-up menu, multiple languages soon.
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@843 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
851e5d1fc5
commit
22a71cf015
1 changed files with 50 additions and 41 deletions
|
@ -356,7 +356,7 @@ int NSISCALL ui_doinstall(void)
|
||||||
int size;
|
int size;
|
||||||
lang_num=g_inst_header->common.str_tables_num;
|
lang_num=g_inst_header->common.str_tables_num;
|
||||||
size=lang_num*sizeof(common_strings);
|
size=lang_num*sizeof(common_strings);
|
||||||
cur_common_strings_table=common_strings_tables=(common_strings*)GlobalAlloc(GPTR,size);
|
cur_common_strings_table=common_strings_tables=(common_strings*)my_alloc(size);
|
||||||
GetCompressedDataFromDataBlockToMemory(g_inst_header->common.str_tables,(char*)common_strings_tables,size);
|
GetCompressedDataFromDataBlockToMemory(g_inst_header->common.str_tables,(char*)common_strings_tables,size);
|
||||||
#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
|
#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
|
||||||
if (g_is_uninstaller)
|
if (g_is_uninstaller)
|
||||||
|
@ -364,7 +364,7 @@ int NSISCALL ui_doinstall(void)
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
size=lang_num*sizeof(installer_strings);
|
size=lang_num*sizeof(installer_strings);
|
||||||
cur_install_strings_table=install_strings_tables=(char *)GlobalAlloc(GPTR,size);
|
cur_install_strings_table=install_strings_tables=(char *)my_alloc(size);
|
||||||
GetCompressedDataFromDataBlockToMemory(g_inst_header->common.inst_str_tables,install_strings_tables,size);
|
GetCompressedDataFromDataBlockToMemory(g_inst_header->common.inst_str_tables,install_strings_tables,size);
|
||||||
|
|
||||||
myitoa(state_language, GetUserDefaultLangID());
|
myitoa(state_language, GetUserDefaultLangID());
|
||||||
|
@ -665,7 +665,7 @@ static BOOL CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
|
||||||
char *szUrl;
|
char *szUrl;
|
||||||
long min=enlink->chrg.cpMin, max=enlink->chrg.cpMax;
|
long min=enlink->chrg.cpMin, max=enlink->chrg.cpMax;
|
||||||
SendMessage(hwLicense,EM_SETSEL,min,max);
|
SendMessage(hwLicense,EM_SETSEL,min,max);
|
||||||
szUrl=(char *)GlobalAlloc(GPTR,max-min+1);
|
szUrl=(char *)my_alloc(max-min+1);
|
||||||
SendMessage(hwLicense,EM_GETSELTEXT,0,(LPARAM)szUrl);
|
SendMessage(hwLicense,EM_GETSELTEXT,0,(LPARAM)szUrl);
|
||||||
SetCursor(LoadCursor(0,IDC_WAIT));
|
SetCursor(LoadCursor(0,IDC_WAIT));
|
||||||
ShellExecute(hwndDlg,"open",szUrl,NULL,NULL,SW_SHOWNORMAL);
|
ShellExecute(hwndDlg,"open",szUrl,NULL,NULL,SW_SHOWNORMAL);
|
||||||
|
@ -926,7 +926,7 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
||||||
HBITMAP hBMcheck1;
|
HBITMAP hBMcheck1;
|
||||||
int x;
|
int x;
|
||||||
if (hTreeItems) GlobalFree(hTreeItems);
|
if (hTreeItems) GlobalFree(hTreeItems);
|
||||||
hTreeItems=(HTREEITEM*)GlobalAlloc(GPTR,sizeof(HTREEITEM)*num_sections);
|
hTreeItems=(HTREEITEM*)my_alloc(sizeof(HTREEITEM)*num_sections);
|
||||||
|
|
||||||
hBMcheck1=LoadBitmap(g_hInstance, MAKEINTRESOURCE(IDB_BITMAP1));
|
hBMcheck1=LoadBitmap(g_hInstance, MAKEINTRESOURCE(IDB_BITMAP1));
|
||||||
SetUITextFromLang(hwndDlg,IDC_INTROTEXT,g_inst_header->common.intro_text_id,LANGID_COMP_TEXT);
|
SetUITextFromLang(hwndDlg,IDC_INTROTEXT,g_inst_header->common.intro_text_id,LANGID_COMP_TEXT);
|
||||||
|
@ -1405,14 +1405,22 @@ static BOOL CALLBACK InstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//>>>Ximon Eighteen aka Sunjammer 30th August 2002
|
//>>>Ximon Eighteen aka Sunjammer 30th August 2002
|
||||||
//+++If CTRL-C is pressed (yeah I know this has got to be the most stupid
|
//+++Popup "Copy Details To Clipboard" menu when RMB clicked in DetailView
|
||||||
//+++way to test for this) copy the DetailPrint'd strings to the clipboard.
|
//+++Currently this has no language support for the popup menu tex
|
||||||
if (uMsg == WM_NOTIFY && ((NMHDR*)lParam)->code == LVN_KEYDOWN &&
|
if (uMsg == WM_NOTIFY && ((NMHDR*)lParam)->code == NM_RCLICK)
|
||||||
((VK_CONTROL == ((NMLVKEYDOWN*)lParam)->wVKey && GetKeyState('C') != 0) ||
|
|
||||||
('C' == ((NMLVKEYDOWN*)lParam)->wVKey && GetKeyState(VK_CONTROL) != 0)))
|
|
||||||
{
|
{
|
||||||
int count = ListView_GetItemCount(insthwnd);
|
int count = ListView_GetItemCount(insthwnd);
|
||||||
if (count > 0)
|
if (count > 0)
|
||||||
|
{
|
||||||
|
DWORD pos = GetMessagePos();
|
||||||
|
HMENU menu = CreatePopupMenu();
|
||||||
|
AppendMenu(menu,MF_STRING,1,"Copy Details To Clipboard");
|
||||||
|
if (1==TrackPopupMenu(
|
||||||
|
menu,
|
||||||
|
TPM_NONOTIFY|TPM_RETURNCMD,
|
||||||
|
GET_X_LPARAM(pos),
|
||||||
|
GET_Y_LPARAM(pos),
|
||||||
|
0,insthwnd,0))
|
||||||
{
|
{
|
||||||
char textBuf[1024];
|
char textBuf[1024];
|
||||||
int i,total = 0;
|
int i,total = 0;
|
||||||
|
@ -1451,6 +1459,7 @@ static BOOL CALLBACK InstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
||||||
CloseClipboard();
|
CloseClipboard();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//<<<
|
//<<<
|
||||||
return HandleStaticBkColor();
|
return HandleStaticBkColor();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue