|
From: Eran I. <no...@so...> - 2013-12-19 11:42:54
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "codelite".
The branch, master has been updated
via ed975befe743d5f52b058929ab91a8d8e25f1b68 (commit)
from 397ddba115d331f9d4c9c0fcb3730ffde24502db (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceforge.net/p/codelite/codelitegit/ci/ed975befe743d5f52b058929ab91a8d8e25f1b68
commit ed975befe743d5f52b058929ab91a8d8e25f1b68
Author: Eran <era...@gm...>
Date: Thu Dec 19 13:42:42 2013 +0200
Allow paste into multiple selections
diff --git a/LiteEditor.workspace b/LiteEditor.workspace
index 0a5eb45..8b5cb81 100644
--- a/LiteEditor.workspace
+++ b/LiteEditor.workspace
@@ -43,7 +43,7 @@
</Environment>
<Project Name="Tweaks" Path="Tweaks/Tweaks.project" Active="No"/>
<BuildMatrix>
- <WorkspaceConfiguration Name="Win Release Unicode" Selected="yes">
+ <WorkspaceConfiguration Name="Win Release Unicode" Selected="no">
<Project Name="ZoomNavigator" ConfigName="WinReleaseUnicode"/>
<Project Name="wxsqlite3" ConfigName="WinReleaseUnicode"/>
<Project Name="wxshapeframework" ConfigName="WinReleaseUnicode"/>
diff --git a/LiteEditor/EditorOptionsCopyPaste.cpp b/LiteEditor/EditorOptionsCopyPaste.cpp
index 7249ff1..65e8576 100644
--- a/LiteEditor/EditorOptionsCopyPaste.cpp
+++ b/LiteEditor/EditorOptionsCopyPaste.cpp
@@ -13,6 +13,8 @@ EditorOptionsCopyPaste::EditorOptionsCopyPaste(wxWindow* parent)
sel = 2;
}
m_radioBoxCopyOptions->SetSelection( sel );
+ m_checkBoxDisableMultiPaste->SetValue( flags & OptionsConfig::Opt_Disable_Multipaste );
+ m_checkBoxDisableMultiSelection->SetValue( flags & OptionsConfig::Opt_Disable_Multiselect );
}
EditorOptionsCopyPaste::~EditorOptionsCopyPaste()
@@ -22,7 +24,11 @@ EditorOptionsCopyPaste::~EditorOptionsCopyPaste()
void EditorOptionsCopyPaste::Save(OptionsConfigPtr options)
{
size_t flags = options->GetOptions();
- flags &= ~(OptionsConfig::Opt_AlwaysCopyLine|OptionsConfig::Opt_CopyNothing|OptionsConfig::Opt_CopyLineIfLineNotEmpty);
+ flags &= ~( OptionsConfig::Opt_AlwaysCopyLine|
+ OptionsConfig::Opt_CopyNothing|
+ OptionsConfig::Opt_CopyLineIfLineNotEmpty|
+ OptionsConfig::Opt_Disable_Multipaste|
+ OptionsConfig::Opt_Disable_Multiselect);
switch ( m_radioBoxCopyOptions->GetSelection() ) {
case 1:
@@ -36,5 +42,8 @@ void EditorOptionsCopyPaste::Save(OptionsConfigPtr options)
flags |= OptionsConfig::Opt_AlwaysCopyLine;
break;
}
+
+ if ( m_checkBoxDisableMultiPaste->IsChecked() ) flags |= OptionsConfig::Opt_Disable_Multipaste;
+ if ( m_checkBoxDisableMultiSelection->IsChecked() ) flags |= OptionsConfig::Opt_Disable_Multiselect;
options->SetOptions( flags );
}
diff --git a/LiteEditor/cl_editor.cpp b/LiteEditor/cl_editor.cpp
index 24a8667..3f9b3a6 100644
--- a/LiteEditor/cl_editor.cpp
+++ b/LiteEditor/cl_editor.cpp
@@ -295,10 +295,9 @@ void LEditor::SetCaretAt(long pos)
/// Setup some scintilla properties
void LEditor::SetProperties()
{
- SetMultipleSelection(true);
SetRectangularSelectionModifier(wxSTC_SCMOD_CTRL);
SetAdditionalSelectionTyping(true);
- SetVirtualSpaceOptions(1);
+ SetVirtualSpaceOptions(2);
OptionsConfigPtr options = GetOptions();
CallTipUseStyle(1);
@@ -311,7 +310,9 @@ void LEditor::SetProperties()
m_autoAdjustHScrollbarWidth = options->GetAutoAdjustHScrollBarWidth();
m_disableSmartIndent = options->GetDisableSmartIndent();
m_disableSemicolonShift = options->GetDisableSemicolonShift();
-
+ SetMultipleSelection( !options->HasOption(OptionsConfig::Opt_Disable_Multiselect ) );
+ SetMultiPaste( options->HasOption(OptionsConfig::Opt_Disable_Multipaste ) ? 0 : 1 );
+
if (!m_hightlightMatchedBraces) {
wxStyledTextCtrl::BraceHighlight(wxSTC_INVALID_POSITION, wxSTC_INVALID_POSITION);
SetHighlightGuide(0);
diff --git a/LiteEditor/editor_options_copy_paste.cpp b/LiteEditor/editor_options_copy_paste.cpp
index 8575a7d..fe39d7a 100644
--- a/LiteEditor/editor_options_copy_paste.cpp
+++ b/LiteEditor/editor_options_copy_paste.cpp
@@ -34,6 +34,22 @@ EditorOptionsCopyPasteBase::EditorOptionsCopyPasteBase(wxWindow* parent, wxWindo
boxSizer2->Add(m_radioBoxCopyOptions, 0, wxALL|wxEXPAND, 5);
+ wxStaticBoxSizer* staticBoxSizer12 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Multiple selections && Caret:")), wxVERTICAL);
+
+ boxSizer2->Add(staticBoxSizer12, 0, wxALL|wxEXPAND, 5);
+
+ m_checkBoxDisableMultiSelection = new wxCheckBox(this, wxID_ANY, _("Disable multiple selection"), wxDefaultPosition, wxSize(-1,-1), 0);
+ m_checkBoxDisableMultiSelection->SetValue(false);
+ m_checkBoxDisableMultiSelection->SetToolTip(_("When multiple selection is disabled, it is not possible to select multiple ranges by holding down the Ctrl key while dragging with the mouse."));
+
+ staticBoxSizer12->Add(m_checkBoxDisableMultiSelection, 0, wxALL, 5);
+
+ m_checkBoxDisableMultiPaste = new wxCheckBox(this, wxID_ANY, _("Disable multi caret paste"), wxDefaultPosition, wxSize(-1,-1), 0);
+ m_checkBoxDisableMultiPaste->SetValue(false);
+ m_checkBoxDisableMultiPaste->SetToolTip(_("When pasting into multiple selections, the pasted text can go into just the main selection or into each selection"));
+
+ staticBoxSizer12->Add(m_checkBoxDisableMultiPaste, 0, wxALL, 5);
+
SetSizeHints(-1,-1);
if ( GetSizer() ) {
GetSizer()->Fit(this);
diff --git a/LiteEditor/editor_options_copy_paste.h b/LiteEditor/editor_options_copy_paste.h
index d0cc747..c397247 100644
--- a/LiteEditor/editor_options_copy_paste.h
+++ b/LiteEditor/editor_options_copy_paste.h
@@ -10,13 +10,18 @@
#include <wx/xrc/xmlres.h>
#include <wx/xrc/xh_bmp.h>
#include <wx/panel.h>
+#include <wx/artprov.h>
#include <wx/sizer.h>
#include <wx/radiobox.h>
+#include <wx/statbox.h>
+#include <wx/checkbox.h>
class EditorOptionsCopyPasteBase : public wxPanel
{
protected:
wxRadioBox* m_radioBoxCopyOptions;
+ wxCheckBox* m_checkBoxDisableMultiSelection;
+ wxCheckBox* m_checkBoxDisableMultiPaste;
protected:
diff --git a/LiteEditor/editor_options_copy_paste.wxcp b/LiteEditor/editor_options_copy_paste.wxcp
index 3252eaf..d7907ac 100644
--- a/LiteEditor/editor_options_copy_paste.wxcp
+++ b/LiteEditor/editor_options_copy_paste.wxcp
@@ -1,7 +1,7 @@
{
"metadata": {
"m_generatedFilesDir": ".",
- "m_objCounter": 10,
+ "m_objCounter": 16,
"m_includeFiles": [],
"m_bitmapFunction": "wxCA7InitBitmapResources",
"m_bitmapsFile": "editor_options_copy_paste_liteeditor_bitmaps.cpp",
@@ -204,6 +204,184 @@
}],
"m_events": [],
"m_children": []
+ }, {
+ "m_type": 4449,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "staticBoxSizer12"
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "choice",
+ "m_label": "Orientation:",
+ "m_selection": 0,
+ "m_options": ["Vertical", "Horizontal"]
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Multiple selections && Caret:"
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4415,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_checkBoxDisableMultiSelection"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": "When multiple selection is disabled, it is not possible to select multiple ranges by holding down the Ctrl key while dragging with the mouse."
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Disable multiple selection"
+ }, {
+ "type": "bool",
+ "m_label": "Value:",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4415,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_checkBoxDisableMultiPaste"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": "When pasting into multiple selections, the pasted text can go into just the main selection or into each selection"
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Disable multi caret paste"
+ }, {
+ "type": "bool",
+ "m_label": "Value:",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": []
+ }]
}]
}]
}]
diff --git a/Plugin/optionsconfig.h b/Plugin/optionsconfig.h
index 5e1f3e1..8af43eb 100644
--- a/Plugin/optionsconfig.h
+++ b/Plugin/optionsconfig.h
@@ -56,6 +56,8 @@ public:
Opt_CopyLineIfLineNotEmpty = 0x00010000,
Opt_CopyNothing = 0x00020000,
Opt_Use_CodeLite_Terminal = 0x00040000,
+ Opt_Disable_Multiselect = 0x00080000,
+ Opt_Disable_Multipaste = 0x00100000,
};
protected:
-----------------------------------------------------------------------
Summary of changes:
LiteEditor.workspace | 2 +-
LiteEditor/EditorOptionsCopyPaste.cpp | 11 ++-
LiteEditor/cl_editor.cpp | 7 +-
LiteEditor/editor_options_copy_paste.cpp | 16 +++
LiteEditor/editor_options_copy_paste.h | 5 +
LiteEditor/editor_options_copy_paste.wxcp | 180 ++++++++++++++++++++++++++++-
Plugin/optionsconfig.h | 2 +
7 files changed, 217 insertions(+), 6 deletions(-)
hooks/post-receive
--
codelite
|