Patch #1942 2007-04-03 13:11

pauliusz

Patch for Feature Request #3264
Download
1942-Patch_for_Feat.patch (2.0 KB)
Category
 
Status
Accepted
Close date
2007-04-12 10:11
Assigned to
 
Index: src/sdk/cbeditor.cpp
===================================================================
--- src/sdk/cbeditor.cpp    (revision 3808)
+++ src/sdk/cbeditor.cpp    (working copy)
@@ -368,6 +368,8 @@
 const int idCopy = wxNewId();
 const int idPaste = wxNewId();
 const int idDelete = wxNewId();
+const int idUpperCase = wxNewId();
+const int idLowerCase = wxNewId();
 const int idSelectAll = wxNewId();
 const int idSwapHeaderSource = wxNewId();
 const int idBookmarks = wxNewId();
@@ -406,6 +408,8 @@
     EVT_MENU(idCopy, cbEditor::OnContextMenuEntry)
     EVT_MENU(idPaste, cbEditor::OnContextMenuEntry)
     EVT_MENU(idDelete, cbEditor::OnContextMenuEntry)
+    EVT_MENU(idUpperCase, cbEditor::OnContextMenuEntry)
+    EVT_MENU(idLowerCase, cbEditor::OnContextMenuEntry)
     EVT_MENU(idSelectAll, cbEditor::OnContextMenuEntry)
     EVT_MENU(idSwapHeaderSource, cbEditor::OnContextMenuEntry)
     EVT_MENU(idBookmarksToggle, cbEditor::OnContextMenuEntry)
@@ -1930,6 +1934,9 @@
         menu->Append(idPaste, _("Paste"));
         menu->Append(idDelete, _("Delete"));
         menu->AppendSeparator();
+        menu->Append(idUpperCase, _("UPPERCASE"));
+        menu->Append(idLowerCase, _("lowercase"));
+        menu->AppendSeparator();
         menu->Append(idSelectAll, _("Select All"));
 
         bool hasSel = control->GetSelectionEnd() - control->GetSelectionStart() != 0;
@@ -1945,6 +1952,8 @@
             menu->Enable(idPaste, control->CanPaste());
 
         menu->Enable(idDelete, hasSel);
+        menu->Enable(idUpperCase, hasSel);
+        menu->Enable(idLowerCase, hasSel);
     }
     else if(id == idBookmarks)
     {
@@ -2196,6 +2205,10 @@
         control->Paste();
     else if (id == idDelete)
         control->ReplaceSelection(wxEmptyString);
+    else if (id == idUpperCase)
+        control->UpperCase();
+    else if (id == idLowerCase)
+        control->LowerCase();
     else if (id == idSelectAll)
         control->SelectAll();
     else if (id == idSwapHeaderSource)
mandrav 2007-04-12 10:11

Patch applied, thank you.