Don Ho 2015-07-30 00:25:51 +02:00
commit c2cf84e774
8 changed files with 30 additions and 35 deletions

View File

@ -2128,17 +2128,17 @@ void Notepad_plus::setUniModeText()
switch (um)
{
case uniUTF8:
uniModeTextString = TEXT("UTF-8"); break;
uniModeTextString = TEXT("UTF-8-BOM"); break;
case uni16BE:
uniModeTextString = TEXT("UCS-2 Big Endian"); break;
uniModeTextString = TEXT("UCS-2 BE BOM"); break;
case uni16LE:
uniModeTextString = TEXT("UCS-2 Little Endian"); break;
uniModeTextString = TEXT("UCS-2 LE BOM"); break;
case uni16BE_NoBOM:
uniModeTextString = TEXT("UCS-2 BE w/o BOM"); break;
uniModeTextString = TEXT("UCS-2 Big Endian"); break;
case uni16LE_NoBOM:
uniModeTextString = TEXT("UCS-2 LE w/o BOM"); break;
uniModeTextString = TEXT("UCS-2 Little Endian"); break;
case uniCookie:
uniModeTextString = TEXT("UTF-8 w/o BOM"); break;
uniModeTextString = TEXT("UTF-8"); break;
default :
uniModeTextString = TEXT("ANSI");
}

View File

@ -207,11 +207,6 @@ public:
LRESULT init(HWND hwnd);
LRESULT process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
void killAllChildren();
/*
HWND getWindowHandle() const {
return _pPublicInterface->getHSelf();
};
*/
enum comment_mode {cm_comment, cm_uncomment, cm_toggle};

View File

@ -518,10 +518,10 @@ BEGIN
POPUP "E&ncoding"
BEGIN
MENUITEM "Encode in ANSI", IDM_FORMAT_ANSI
MENUITEM "Encode in UTF-8 without BOM", IDM_FORMAT_AS_UTF_8
MENUITEM "Encode in UTF-8", IDM_FORMAT_UTF_8
MENUITEM "Encode in UCS-2 Big Endian", IDM_FORMAT_UCS_2BE
MENUITEM "Encode in UCS-2 Little Endian", IDM_FORMAT_UCS_2LE
MENUITEM "Encode in UTF-8", IDM_FORMAT_AS_UTF_8
MENUITEM "Encode in UTF-8-BOM", IDM_FORMAT_UTF_8
MENUITEM "Encode in UCS-2 BE BOM", IDM_FORMAT_UCS_2BE
MENUITEM "Encode in UCS-2 LE BOM", IDM_FORMAT_UCS_2LE
POPUP "Character sets"
BEGIN
POPUP "Arabic"
@ -636,11 +636,11 @@ BEGIN
END
END
MENUITEM SEPARATOR
MENUITEM "Convert to ANSI", IDM_FORMAT_CONV2_ANSI
MENUITEM "Convert to UTF-8 without BOM", IDM_FORMAT_CONV2_AS_UTF_8
MENUITEM "Convert to UTF-8", IDM_FORMAT_CONV2_UTF_8
MENUITEM "Convert to UCS-2 Big Endian", IDM_FORMAT_CONV2_UCS_2BE
MENUITEM "Convert to UCS-2 Little Endian", IDM_FORMAT_CONV2_UCS_2LE
MENUITEM "Convert to ANSI", IDM_FORMAT_CONV2_ANSI
MENUITEM "Convert to UTF-8", IDM_FORMAT_CONV2_AS_UTF_8
MENUITEM "Convert to UTF-8-BOM", IDM_FORMAT_CONV2_UTF_8
MENUITEM "Convert to UCS-2 BE BOM", IDM_FORMAT_CONV2_UCS_2BE
MENUITEM "Convert to UCS-2 LE BOM", IDM_FORMAT_CONV2_UCS_2LE
END
POPUP "&Language"

View File

@ -1219,7 +1219,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
case NPPM_SETSMOOTHFONT:
{
int param = lParam == 0 ? SC_EFF_QUALITY_DEFAULT : SC_EFF_QUALITY_LCD_OPTIMIZED;
int param = (lParam == 0 ? SC_EFF_QUALITY_DEFAULT : SC_EFF_QUALITY_LCD_OPTIMIZED);
_mainEditView.execute(SCI_SETFONTQUALITY, param);
_subEditView.execute(SCI_SETFONTQUALITY, param);
return TRUE;

View File

@ -84,7 +84,7 @@ WinMenuKeyDefinition winKeyDefs[] = {
{VK_NULL, IDM_FILE_PRINTNOW, false, false, false, NULL},
{VK_F4, IDM_FILE_EXIT, false, true, false, NULL},
{ VK_T, IDM_FILE_RESTORELASTCLOSEDFILE, true, false, true, NULL},
{ VK_T, IDM_FILE_RESTORELASTCLOSEDFILE, true, false, true, TEXT("Restore Recent Closed File")},
// {VK_NULL, IDM_EDIT_UNDO, false, false, false, NULL},
// {VK_NULL, IDM_EDIT_REDO, false, false, false, NULL},

View File

@ -162,12 +162,12 @@ BEGIN
CONTROL "Unix/OSX",IDC_RADIO_F_UNIX,"Button",BS_AUTORADIOBUTTON,75,81,50,10
GROUPBOX "Encoding",IDC_ENCODING_STATIC,212,28,175,122,BS_CENTER
CONTROL "ANSI",IDC_RADIO_ANSI,"Button",BS_AUTORADIOBUTTON | WS_GROUP,222,39,80,10
CONTROL "UTF-8 without BOM",IDC_RADIO_UTF8SANSBOM,"Button",BS_AUTORADIOBUTTON,222,53,128,10
CONTROL "UTF-8",IDC_RADIO_UTF8SANSBOM,"Button",BS_AUTORADIOBUTTON,222,53,128,10
CONTROL "Apply to opened ANSI files",IDC_CHECK_OPENANSIASUTF8,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,232,65,124,10
CONTROL "UTF-8",IDC_RADIO_UTF8,"Button",BS_AUTORADIOBUTTON,222,79,62,10
CONTROL "UCS-2 Big Endian",IDC_RADIO_UCS2BIG,"Button",BS_AUTORADIOBUTTON,222,95,103,10
CONTROL "UCS-2 Little Endian",IDC_RADIO_UCS2SMALL,"Button",BS_AUTORADIOBUTTON,222,111,102,10
CONTROL "UTF-8 with BOM",IDC_RADIO_UTF8,"Button",BS_AUTORADIOBUTTON,222,79,62,10
CONTROL "UCS-2 Big Endian with BOM",IDC_RADIO_UCS2BIG,"Button",BS_AUTORADIOBUTTON,222,95,110,10
CONTROL "UCS-2 Little Endian with BOM",IDC_RADIO_UCS2SMALL,"Button",BS_AUTORADIOBUTTON,222,111,110,10
CONTROL "",IDC_RADIO_OTHERCP,"Button",BS_AUTORADIOBUTTON,222,126,10,10
COMBOBOX IDC_COMBO_OTHERCP,236,126,100,140,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Default language :",IDC_DEFAULTLANG_STATIC,57,130,77,8

View File

@ -50,7 +50,7 @@ Splitter::Splitter() : Window()
void Splitter::init( HINSTANCE hInst, HWND hPere, int splitterSize,
int iSplitRatio, DWORD dwFlags)
double iSplitRatio, DWORD dwFlags)
{
if (hPere == NULL)
{
@ -100,7 +100,7 @@ void Splitter::init( HINSTANCE hInst, HWND hPere, int splitterSize,
if (_dwFlags & SV_HORIZONTAL) //Horizontal spliter
{
_rect.top = ((_rect.bottom * _splitPercent)/100);
_rect.top = (LONG)((_rect.bottom * _splitPercent)/100);
// y axis determined by the split% of the parent windows height
_rect.left = 0;
@ -115,7 +115,7 @@ void Splitter::init( HINSTANCE hInst, HWND hPere, int splitterSize,
{
// y axis is 0 always
_rect.left = ((_rect.right * _splitPercent)/100);
_rect.left = (LONG)((_rect.right * _splitPercent)/100);
// x axis determined by split% of the parent windows width.
_rect.right = _spiltterSize;
@ -340,7 +340,7 @@ LRESULT CALLBACK Splitter::spliterWndProc(UINT uMsg, WPARAM wParam, LPARAM lPara
if (pt.y <= (rt.bottom - 5))
{
_rect.top = pt.y;
_splitPercent = ((pt.y * 100 / rt.bottom*100) / 100);
_splitPercent = ((pt.y * 100 / (double)rt.bottom*100) / 100);
}
else
{
@ -361,7 +361,7 @@ LRESULT CALLBACK Splitter::spliterWndProc(UINT uMsg, WPARAM wParam, LPARAM lPara
if (pt.x <= (rt.right - 5))
{
_rect.left = pt.x;
_splitPercent = ((pt.x*100/rt.right*100)/100);
_splitPercent = ((pt.x*100 / (double)rt.right*100) / 100);
}
else
{
@ -425,7 +425,7 @@ void Splitter::resizeSpliter(RECT *pRect)
//if resizeing should be done proportionately.
if (_dwFlags & SV_RESIZEWTHPERCNT)
_rect.top = ((rect.bottom * _splitPercent)/100);
_rect.top = (LONG)((rect.bottom * _splitPercent)/100);
else // soit la fenetre en haut soit la fenetre en bas qui est fixee
_rect.top = getSplitterFixPosY();
}
@ -438,7 +438,7 @@ void Splitter::resizeSpliter(RECT *pRect)
//if resizeing should be done proportionately.
if (_dwFlags & SV_RESIZEWTHPERCNT)
{
_rect.left = ((rect.right * _splitPercent)/100);
_rect.left = (LONG)((rect.right * _splitPercent)/100);
}
else // soit la fenetre gauche soit la fenetre droit qui est fixee
_rect.left = getSplitterFixPosX();

View File

@ -74,7 +74,7 @@ public:
};
void resizeSpliter(RECT *pRect = NULL);
void init(HINSTANCE hInst, HWND hPere, int splitterSize,
int iSplitRatio, DWORD dwFlags);
double iSplitRatio, DWORD dwFlags);
void rotate();
int getPhisicalSize() const {
return _spiltterSize;
@ -82,7 +82,7 @@ public:
private:
RECT _rect;
int _splitPercent;
double _splitPercent;
int _spiltterSize;
bool _isDraged;
DWORD _dwFlags;