Skip to content

Commit 05a86ed

Browse files
committed
Fix header files.
Signed-off-by: Jocelyn Legault <jocelynlegault@gmail.com>
1 parent 3e3e28e commit 05a86ed

50 files changed

Lines changed: 162 additions & 197 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

NppPlugin/include/DockingDlgInterface.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2020
#ifndef DOCKINGDLGINTERFACE_H
2121
#define DOCKINGDLGINTERFACE_H
2222

23-
#include "stdafx.h"
24-
2523
#ifndef DOCKING_RESOURCE_H
2624
#include "dockingResource.h"
2725
#endif //DOCKING_RESOURCE_H

NppPlugin/include/PluginInterface.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@
1818
#ifndef PLUGININTERFACE_H
1919
#define PLUGININTERFACE_H
2020

21-
#include <windows.h>
22-
#include "Scintilla.h"
2321
#include "Notepad_plus_msgs.h"
2422

23+
struct SCNotification;
2524
const int nbChar = 64;
2625

2726
typedef const TCHAR * (__cdecl * PFUNCGETNAME)();

NppPlugin/include/Window.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#ifndef WINDOW_CONTROL_H
1919
#define WINDOW_CONTROL_H
2020

21-
#include <windows.h>
22-
2321
class Window
2422
{
2523
public:

PythonScript/include/PythonScript/NppPythonScript.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
#define _NPPPYTHONSCRIPT_H
33

44

5-
6-
#define WIN32_LEAN_AND_MEAN
7-
#include <Windows.h>
8-
#undef WIN32_LEAN_AND_MEAN
9-
10-
#include <tchar.h>
11-
125
#define PYSCR_START (WM_USER + 3500)
136

147
/** Execute a script in a file

PythonScript/src/AboutDialog.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
1-
#pragma once
2-
#include "stdafx.h"
1+
#ifndef _ABOUTDIALOG_H
2+
#define _ABOUTDIALOG_H
33

4+
#ifndef STATIC_DIALOG_H
45
#include "StaticDialog.h"
5-
#include "PluginInterface.h"
6+
#endif
7+
8+
struct NppData;
69

710
class AboutDialog : public StaticDialog
811
{
912
public:
1013
AboutDialog(void);
1114
~AboutDialog(void);
1215

13-
void init(HINSTANCE hInst, NppData nppData)
14-
{
15-
_nppData = nppData;
16-
Window::init(hInst, nppData._nppHandle);
17-
};
16+
void init(HINSTANCE hInst, NppData& nppData);
1817

1918
void doDialog();
2019
BOOL CALLBACK AboutDialog::run_dlgProc(HWND hWnd, UINT Message, WPARAM wParam, LPARAM lParam);
2120

2221
private:
23-
NppData _nppData;
24-
2522
HBRUSH m_hbrBackground;
2623
};
24+
25+
#endif // _ABOUTDIALOG_H

PythonScript/src/AboutDialog2.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
#include "AboutDialog.h"
33
#include "PythonScriptVersion.h"
44
#include "resource.h"
5-
6-
//using namespace std;
5+
#include "PluginInterface.h"
76

87
AboutDialog::AboutDialog(void)
98
{
@@ -73,4 +72,9 @@ BOOL CALLBACK AboutDialog::run_dlgProc(HWND hWnd, UINT Message, WPARAM wParam, L
7372
}
7473
}
7574
return FALSE;
76-
}
75+
}
76+
77+
void AboutDialog::init( HINSTANCE hInst, NppData& nppData )
78+
{
79+
Window::init(hInst, nppData._nppHandle);
80+
}

PythonScript/src/ConfigFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,4 @@ const std::string& ConfigFile::getMenuScript(int index) const
159159
{
160160
return m_emptyString;
161161
}
162-
}
162+
}

PythonScript/src/ConfigFile.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#ifndef _CONFIGFILE_H
22
#define _CONFIGFILE_H
33

4-
#include "stdafx.h"
5-
64
class ConfigFile
75
{
86
public:

PythonScript/src/ConsoleDialog.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
#include "stdafx.h"
22
#include "ConsoleDialog.h"
3-
#include "Notepad_Plus_msgs.h"
4-
#include "DockingDlgInterface.h"
53
#include "Scintilla.h"
64
#include "SciLexer.h"
75
#include "resource.h"
86
#include "PythonConsole.h"
7+
#include "PluginInterface.h"
98

109
using namespace std;
1110

@@ -29,7 +28,7 @@ ConsoleDialog::~ConsoleDialog()
2928
}
3029

3130

32-
void ConsoleDialog::init(HINSTANCE hInst, NppData nppData, ConsoleInterface* console)
31+
void ConsoleDialog::init(HINSTANCE hInst, NppData& nppData, ConsoleInterface* console)
3332
{
3433
DockingDlgInterface::init(hInst, nppData._nppHandle);
3534

@@ -993,4 +992,4 @@ void ConsoleDialog::onHotspotClick(SCNotification* notification)
993992
}
994993
}
995994

996-
}
995+
}

PythonScript/src/ConsoleDialog.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
#ifndef _CONSOLEDIALOG_H
22
#define _CONSOLEDIALOG_H
33

4-
#include "stdafx.h"
4+
#ifndef DOCKINGDLGINTERFACE_H
55
#include "DockingDlgInterface.h"
6-
#include "PluginInterface.h"
6+
#endif
77

88
void export_console();
99

10+
struct SCNotification;
11+
struct NppData;
1012
class ConsoleInterface;
1113
struct LineDetails;
1214

@@ -17,7 +19,7 @@ class ConsoleDialog : public DockingDlgInterface
1719
~ConsoleDialog();
1820

1921

20-
void init(HINSTANCE hInst, NppData nppData, ConsoleInterface *console);
22+
void init(HINSTANCE hInst, NppData& nppData, ConsoleInterface *console);
2123

2224
void doDialog();
2325
void hide();

0 commit comments

Comments
 (0)