From 3137fd5bc6e78529f57a9829041ce53d2f6bd63c Mon Sep 17 00:00:00 2001 From: Tobias Predel Date: Tue, 6 Aug 2024 18:57:26 +0200 Subject: [PATCH] Use stock window ID for Paste --- src/document.h | 2 +- src/main.cpp | 1 - src/myframe.h | 6 +++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/document.h b/src/document.h index 03c549c6..69e45e51 100644 --- a/src/document.h +++ b/src/document.h @@ -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 diff --git a/src/main.cpp b/src/main.cpp index 24898173..5fc08cd9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -45,7 +45,6 @@ static const uint TS_SELECTION_MASK = 0x80; enum { A_SAVEALL = 500, - A_PASTE, A_COLLAPSE, A_NEWGRID, A_UNDO, diff --git a/src/myframe.h b/src/myframe.h index 590219d8..92c8bb84 100644 --- a/src/myframe.h +++ b/src/myframe.h @@ -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")); @@ -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); @@ -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");