News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Copy/Cut including line copy/cut

Started by IvanBatrakov, September 23, 2011, 10:44:38 AM

Previous topic - Next topic

IvanBatrakov

to copy/cut entire string if no selection

void cbStyledTextCtrl::Copy()
{
   if(true == GetSelectedText().IsEmpty())
   {
      wxScintilla::LineCopy();
   }
   else
   {
      wxScintilla::Copy();
   }
}

//cbstyledtextctrl.cpp

void cbStyledTextCtrl::Cut()
{
   if(true == GetSelectedText().IsEmpty())
   {
      wxScintilla::LineCut();
   }
   else
   {
      wxScintilla::Cut();
   }
}


// main.cpp

       canCut = !eb->IsReadOnly();// && hasSel;
       canSelAll = eb->CanSelectAll();
...

mbar->Enable(idEditCopy, true);//hasSel);

...

m_pToolbar->EnableTool(idEditCopy, true);//hasSel);
       m_pToolbar->EnableTool(idEditPaste, canPaste);

oBFusCATed

Same request here.
But please put some text, too.
What is this topic about?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

MortenMacFly

Another thing: Such a change in the behaviour should be configurable. (...as it changes the workflow for users.)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Jenna

Quote from: oBFusCATed on September 23, 2011, 11:06:37 AM
Same request here.
But please put some text, too.
What is this topic about?
And as in the other thread:

Please post patches, instead of code-snippets, so it is clear which parts of the code are new.
Makes it also easier to test.