Permalink
Browse files

Splitting ISettings to separate file (need to fixup lfs in e.vcproj)

  • Loading branch information...
1 parent e7a6229 commit da449cdeba3708a320b6ac331d1fdbedb4938cd6 @adamv adamv committed Jun 21, 2009
Showing with 28 additions and 15 deletions.
  1. +1 −1 src/Document.cpp
  2. +1 −1 src/Document.h
  3. +3 −5 src/EditorCtrl.cpp
  4. +18 −0 src/ISettings.h
  5. +4 −0 src/e.vcproj
  6. +1 −8 src/eSettings.h
View
@@ -2369,8 +2369,8 @@ void Document::PrintAll() const {
DocumentWrapper::DocumentWrapper(CatalystWrapper& cw, bool createNew): m_doc(cw) {
wxASSERT(createNew);
if (createNew) {
- RecursiveCriticalSectionLocker cx_lock(GetReadLock());
ISettings& settings = eGetSettings();
+ RecursiveCriticalSectionLocker cx_lock(GetReadLock());
m_doc.CreateNew(settings);
}
}
View
@@ -22,7 +22,7 @@
#include "Catalyst.h"
#include "DataText.h"
-// pre-declarations
+
class doc_byte_iter;
struct real_pcre; // This double pre-definition is needed
typedef struct real_pcre pcre; // because of the way it is defined in pcre.h
View
@@ -6248,23 +6248,21 @@ void EditorCtrl::OnChar(wxKeyEvent& event) {
case WXK_ESCAPE:
if (m_snippetHandler.IsActive()) m_snippetHandler.Clear();
else if (m_lines.IsSelectionShadow()) m_lines.RemoveAllSelections();
- else {
- DoCompletion();
- }
+ else DoCompletion();
break;
default:
// If we process alt then menu shortcuts don't work
if (event.AltDown()) {
event.Skip();
- return; // do nothing if we don't know the char
+ return;
}
// Ignore unhandled keycodes
if (key >= WXK_START && key <= WXK_COMMAND) break;
//if (key >= WXK_SPECIAL1 && key <= WXK_SPECIAL20) break;
- //if (wxIsprint(c)) { // Normal chars (does not work with æøå??)
+ //if (wxIsprint(c)) { // Normal chars (does not work with 'ae', 'oslash', 'a-circle', etc.??)
if ((unsigned int)c > 31) { // Normal chars
InsertChar(c);
}
View
@@ -0,0 +1,18 @@
+#ifndef __ISETTINGS_H__
+#define __ISETTINGS_H__
+
+#include "wx/wxprec.h"
+#ifndef WX_PRECOMP
+ #include <wx/longlong.h>
+ #include <wx/string.h>
+#endif
+
+class ISettings {
+public:
+ virtual bool GetSettingBool(const wxString& name, bool& value) const = 0;
+ virtual bool GetSettingInt(const wxString& name, int& value) const = 0;
+ virtual bool GetSettingLong(const wxString& name, wxLongLong& value) const = 0;
+ virtual bool GetSettingString(const wxString& name, wxString& value) const = 0;
+};
+
+#endif
View
@@ -404,6 +404,10 @@
RelativePath=".\IPrintableDocument.h"
>
</File>
+ <File
+ RelativePath=".\ISettings.h"
+ >
+ </File>
<File
RelativePath=".\ITmGetSyntaxes.h"
>
View
@@ -22,18 +22,11 @@
#include "jsonval.h"
#include "Catalyst.h"
#include "auto_vector.h"
+#include "ISettings.h"
// pre-declarations
class RemoteProfile;
-class ISettings {
-public:
- virtual bool GetSettingBool(const wxString& name, bool& value) const = 0;
- virtual bool GetSettingInt(const wxString& name, int& value) const = 0;
- virtual bool GetSettingLong(const wxString& name, wxLongLong& value) const = 0;
- virtual bool GetSettingString(const wxString& name, wxString& value) const = 0;
-};
-
class eSettings: public ISettings {
public:
eSettings();

0 comments on commit da449cd

Please sign in to comment.