mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-27 07:44:24 +02:00
[BUG_FIXED] Fix language switching to English not working bug.
[MODIFY] Reduce PostIt/FullScreen restore button size. [BUG_FIXED] Fix PostIt wrong restore button position after toggling off fullScreen mode. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@627 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
468f93b3c1
commit
b127612e16
@ -3227,6 +3227,20 @@ void Notepad_plus::fullScreenToggle()
|
|||||||
//::SetForegroundWindow(_hSelf);
|
//::SetForegroundWindow(_hSelf);
|
||||||
_beforeSpecialView.isFullScreen = !_beforeSpecialView.isFullScreen;
|
_beforeSpecialView.isFullScreen = !_beforeSpecialView.isFullScreen;
|
||||||
::SendMessage(_hSelf, WM_SIZE, 0, 0);
|
::SendMessage(_hSelf, WM_SIZE, 0, 0);
|
||||||
|
if (_beforeSpecialView.isPostIt)
|
||||||
|
{
|
||||||
|
// show restore button on the right position
|
||||||
|
RECT rect;
|
||||||
|
GetWindowRect(_restoreButton.getHSelf(), &rect);
|
||||||
|
int w = rect.right - rect.left;
|
||||||
|
int h = rect.bottom - rect.top;
|
||||||
|
|
||||||
|
RECT nppRect;
|
||||||
|
GetWindowRect(_hSelf, &nppRect);
|
||||||
|
int x = nppRect.right - w - w;
|
||||||
|
int y = nppRect.top + 1;
|
||||||
|
::MoveWindow(_restoreButton.getHSelf(), x, y, w, h, FALSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Notepad_plus::postItToggle()
|
void Notepad_plus::postItToggle()
|
||||||
@ -3292,8 +3306,8 @@ void Notepad_plus::postItToggle()
|
|||||||
|
|
||||||
RECT nppRect;
|
RECT nppRect;
|
||||||
GetWindowRect(_hSelf, &nppRect);
|
GetWindowRect(_hSelf, &nppRect);
|
||||||
int x = nppRect.right - w;
|
int x = nppRect.right - w - w;
|
||||||
int y = nppRect.top;
|
int y = nppRect.top + 1;
|
||||||
::MoveWindow(_restoreButton.getHSelf(), x, y, w, h, FALSE);
|
::MoveWindow(_restoreButton.getHSelf(), x, y, w, h, FALSE);
|
||||||
|
|
||||||
_pEditView->getFocus();
|
_pEditView->getFocus();
|
||||||
@ -4010,7 +4024,7 @@ bool Notepad_plus::reloadLang()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_nativeLangSpeaker.init(nativeLangDocRootA);
|
_nativeLangSpeaker.init(nativeLangDocRootA, true);
|
||||||
|
|
||||||
pNppParam->reloadContextMenuFromXmlTree(_mainMenuHandle);
|
pNppParam->reloadContextMenuFromXmlTree(_mainMenuHandle);
|
||||||
|
|
||||||
|
@ -790,11 +790,11 @@ BEGIN
|
|||||||
EDITTEXT IDC_VALUE_EDIT,49,2,18,14,ES_NUMBER,WS_EX_DLGMODALFRAME
|
EDITTEXT IDC_VALUE_EDIT,49,2,18,14,ES_NUMBER,WS_EX_DLGMODALFRAME
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_BUTTON_DLG DIALOGEX 0, 0, 51, 17
|
IDD_BUTTON_DLG DIALOGEX 0, 0, 12, 10
|
||||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP
|
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP
|
||||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
PUSHBUTTON "Restore",IDC_RESTORE_BUTTON,0,0,51,17
|
PUSHBUTTON "+",IDC_RESTORE_BUTTON,0,0,12,10
|
||||||
END
|
END
|
||||||
|
|
||||||
// xp style
|
// xp style
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "localization.h"
|
#include "localization.h"
|
||||||
|
|
||||||
|
|
||||||
void NativeLangSpeaker::init(TiXmlDocumentA *nativeLangDocRootA)
|
void NativeLangSpeaker::init(TiXmlDocumentA *nativeLangDocRootA, bool loadIfEnglish)
|
||||||
{
|
{
|
||||||
if (nativeLangDocRootA)
|
if (nativeLangDocRootA)
|
||||||
{
|
{
|
||||||
@ -43,7 +43,7 @@ void NativeLangSpeaker::init(TiXmlDocumentA *nativeLangDocRootA)
|
|||||||
// get original file name (defined by Notpad++) from the attribute
|
// get original file name (defined by Notpad++) from the attribute
|
||||||
_fileName = element->Attribute("filename");
|
_fileName = element->Attribute("filename");
|
||||||
|
|
||||||
if (_fileName && stricmp("english.xml", _fileName) == 0)
|
if (!loadIfEnglish && _fileName && stricmp("english.xml", _fileName) == 0)
|
||||||
{
|
{
|
||||||
_nativeLangA = NULL;
|
_nativeLangA = NULL;
|
||||||
return;
|
return;
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
class NativeLangSpeaker {
|
class NativeLangSpeaker {
|
||||||
public:
|
public:
|
||||||
NativeLangSpeaker():_nativeLangA(NULL), _nativeLangEncoding(CP_ACP), _isRTL(false), _fileName(NULL){};
|
NativeLangSpeaker():_nativeLangA(NULL), _nativeLangEncoding(CP_ACP), _isRTL(false), _fileName(NULL){};
|
||||||
void init(TiXmlDocumentA *nativeLangDocRootA);
|
void init(TiXmlDocumentA *nativeLangDocRootA, bool loadIfEnglish = false);
|
||||||
/*
|
/*
|
||||||
void set(TiXmlNodeA *nativeLangA, int nativeLangEncoding) {
|
void set(TiXmlNodeA *nativeLangA, int nativeLangEncoding) {
|
||||||
_nativeLangA = nativeLangA;
|
_nativeLangA = nativeLangA;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user