Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions PythonScript/project/PythonScript2010.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@ xcopy $(ProjectDir)..\python_tests\*.* "e:\notepadtest\unicode\plugins\config\py
<None Include="..\python_tests\tests\MathTestCase.py">
<FileType>CppHeader</FileType>
</None>
<None Include="..\python_tests\tests\ScintillaCallbackTestCase.py" />
<ClInclude Include="..\python_tests\tests\ScintillaWrapperTestCase.py">
<FileType>Document</FileType>
</ClInclude>
Expand Down Expand Up @@ -489,7 +488,6 @@ xcopy $(ProjectDir)..\python_tests\*.* "e:\notepadtest\unicode\plugins\config\py
<ClInclude Include="..\src\MenuManager.h" />
<ClInclude Include="..\src\MutexHolder.h" />
<ClInclude Include="..\src\NotAllowedInCallbackException.h" />
<ClInclude Include="..\src\NotepadPlusBuffer.h" />
<ClInclude Include="..\src\NotepadPlusWrapper.h" />
<ClInclude Include="..\src\NotepadPython.h" />
<ClInclude Include="..\src\NotSupportedException.h" />
Expand Down
14 changes: 5 additions & 9 deletions PythonScript/project/PythonScript2010.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<None Include="..\python_tests\__init__.py">
<Filter>PythonTests</Filter>
</None>
<None Include="..\python_tests\tests\ScintillaCallbackTestCase.py" />
<None Include="..\python_tests\tests\MathTestCase.py">
<Filter>PythonTests\Tests</Filter>
</None>
Expand Down Expand Up @@ -129,7 +128,7 @@
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\UTF8Iterator.cpp">
<Filter>Header Files</Filter>
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\UtfConversion.cpp">
<Filter>Source Files</Filter>
Expand Down Expand Up @@ -202,9 +201,6 @@
<ClInclude Include="..\src\Enums.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\NotepadPlusBuffer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\NotepadPlusWrapper.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down Expand Up @@ -293,7 +289,7 @@
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\ANSIIterator.h">
<Filter>Source Files</Filter>
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\python_tests\RunTests.py">
<Filter>PythonTests</Filter>
Expand Down Expand Up @@ -326,7 +322,7 @@
<Filter>PythonTests\Tests</Filter>
</ClInclude>
<ClInclude Include="..\src\NotSupportedException.h">
<Filter>Source Files</Filter>
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\python_tests\tests\ReplaceTestLastIndex.py">
<Filter>PythonTests\Tests</Filter>
Expand Down Expand Up @@ -368,13 +364,13 @@
<Filter>PythonTests\Tests</Filter>
</ClInclude>
<ClInclude Include="..\src\ScintillaCallback.h">
<Filter>Source Files</Filter>
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\MainThread.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\NotAllowedInCallbackException.h">
<Filter>Source Files</Filter>
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\DepthCounter.h">
<Filter>Header Files</Filter>
Expand Down
4 changes: 2 additions & 2 deletions PythonScript/src/AboutDialog2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ INT_PTR CALLBACK AboutDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM /*
}

case WM_CTLCOLORDLG:
return (LONG)m_hbrBackground;
return (INT_PTR)m_hbrBackground;

case WM_CTLCOLORSTATIC:
{
HDC hdcStatic = (HDC)wParam;
SetBkMode(hdcStatic, TRANSPARENT);
return (LONG)m_hbrBackground;
return (INT_PTR)m_hbrBackground;
}

case WM_COMMAND :
Expand Down
12 changes: 6 additions & 6 deletions PythonScript/src/ConsoleDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,14 @@ void ConsoleDialog::historyPrevious()
{
size_t length = GetWindowTextLength(m_hInput);
TCHAR *buffer = new TCHAR[length + 1];
GetWindowText(m_hInput, buffer, length + 1);
GetWindowText(m_hInput, buffer, (int)length + 1);

// Not an empty string and different from orig
if (buffer[0] && (m_historyIter == m_history.end() || *m_historyIter != buffer))
{
if (m_changes.find(m_currentHistory) == m_changes.end())
{
m_changes.insert(std::pair<int, tstring>(m_currentHistory, tstring(buffer)));
m_changes.insert(std::pair<idx_t, tstring>(m_currentHistory, tstring(buffer)));
}
else
{
Expand Down Expand Up @@ -302,7 +302,7 @@ void ConsoleDialog::historyNext()
{
if (m_changes.find(m_currentHistory) == m_changes.end())
{
m_changes.insert(std::pair<int, tstring>(m_currentHistory, tstring(buffer)));
m_changes.insert(std::pair<idx_t, tstring>(m_currentHistory, tstring(buffer)));
}
else
{
Expand Down Expand Up @@ -413,9 +413,9 @@ void ConsoleDialog::runStatement()
{

HWND hText = ::GetDlgItem(_hSelf, IDC_INPUT);
size_t length = GetWindowTextLengthW(hText);
size_t length = GetWindowTextLength(hText);
TCHAR *buffer = new TCHAR[length + 1];
GetWindowText(hText, buffer, length + 1);
GetWindowText(hText, buffer, (int)length + 1);
historyAdd(buffer);
std::shared_ptr<char> charBuffer = WcharMbcsConverter::tchar2char(buffer);
delete [] buffer;
Expand Down Expand Up @@ -450,7 +450,7 @@ void ConsoleDialog::createOutputWindow(HWND hParentWindow)
{
m_scintilla = (HWND)::SendMessage(_hParent, NPPM_CREATESCINTILLAHANDLE, 0, reinterpret_cast<LPARAM>(hParentWindow));

LONG currentStyle = GetWindowLongPtr(m_scintilla, GWL_STYLE);
LONG_PTR currentStyle = GetWindowLongPtr(m_scintilla, GWL_STYLE);
SetWindowLongPtr(m_scintilla, GWL_STYLE, currentStyle | WS_TABSTOP);


Expand Down
6 changes: 3 additions & 3 deletions PythonScript/src/ConstString.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
template <class CharT>
class ConstString {
public:
typedef unsigned int size_type;
typedef size_t size_type;
ConstString() : _length(0), _str(0) { }
ConstString(const CharT* str, size_type length) : _length(length), _str(str) { }
ConstString(const ConstString<CharT>& source) {
Expand Down Expand Up @@ -52,10 +52,10 @@ class ConstString {
template <class CharT1, class CharT2>
bool operator==(const ConstString<CharT1>& a, const ConstString<CharT2>& b)
{
unsigned int a_length = a.length();
size_t a_length = a.length();
if (a_length != b.length())
return false;
for (unsigned int i = 0; i < a_length; i++)
for (size_t i = 0; i < a_length; i++)
if (a[i] != b[i])
return false;
return true;
Expand Down
Loading