Skip to content

Commit

Permalink
Use stock window ID for Paste
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiolo committed Aug 6, 2024
1 parent 3e55c3d commit 3137fd5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/document.h
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ struct Document {
}
return nullptr;

case A_PASTE:
case wxID_PASTE:
if (!(c = selected.ThinExpand(this))) return OneCell();
if (wxTheClipboard->Open()) {
// wxDataObjectComposite does not work properly under Wayland for text atoms
Expand Down
1 change: 0 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ static const uint TS_SELECTION_MASK = 0x80;

enum {
A_SAVEALL = 500,
A_PASTE,
A_COLLAPSE,
A_NEWGRID,
A_UNDO,
Expand Down
6 changes: 3 additions & 3 deletions src/myframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ struct MyFrame : wxFrame {
MyAppend(editmenu, A_COPYBM, _(L"&Copy as Bitmap"));
MyAppend(editmenu, A_COPYCT, _(L"Copy As Continuous Text"));
editmenu->AppendSeparator();
MyAppend(editmenu, A_PASTE, _(L"&Paste\tCTRL+v"));
MyAppend(editmenu, wxID_PASTE, _(L"&Paste\tCTRL+v"));
MyAppend(editmenu, A_PASTESTYLE, _(L"Paste Style Only\tCTRL+SHIFT+v"),
_(L"only sets the colors and style of the copied cell, and keeps the text"));
MyAppend(editmenu, A_COLLAPSE, _(L"Collapse Ce&lls\tCTRL+l"));
Expand Down Expand Up @@ -594,7 +594,7 @@ struct MyFrame : wxFrame {

wxAcceleratorEntry entries[3];
entries[0].Set(wxACCEL_SHIFT, WXK_DELETE, wxID_CUT);
entries[1].Set(wxACCEL_SHIFT, WXK_INSERT, A_PASTE);
entries[1].Set(wxACCEL_SHIFT, WXK_INSERT, wxID_PASTE);
entries[2].Set(wxACCEL_CTRL, WXK_INSERT, wxID_COPY);
wxAcceleratorTable accel(3, entries);
SetAcceleratorTable(accel);
Expand Down Expand Up @@ -651,7 +651,7 @@ struct MyFrame : wxFrame {
SEPARATOR;
AddTBIcon(_(L"Undo (CTRL+z)"), A_UNDO, iconpath + L"undo.svg");
AddTBIcon(_(L"Copy (CTRL+c)"), wxID_COPY, iconpath + L"editcopy.svg");
AddTBIcon(_(L"Paste (CTRL+v)"), A_PASTE, iconpath + L"editpaste.svg");
AddTBIcon(_(L"Paste (CTRL+v)"), wxID_PASTE, iconpath + L"editpaste.svg");
SEPARATOR;
AddTBIcon(_(L"Zoom In (CTRL+mousewheel)"), A_ZOOMIN, iconpath + L"zoomin.svg");
AddTBIcon(_(L"Zoom Out (CTRL+mousewheel)"), A_ZOOMOUT, iconpath + L"zoomout.svg");
Expand Down

0 comments on commit 3137fd5

Please sign in to comment.