From df58c75ca48e9a2f14844086f7add2116d642425 Mon Sep 17 00:00:00 2001 From: Phanindra kumar Paladi Date: Sun, 29 Jan 2023 10:03:59 +0530 Subject: [PATCH] Fixed breaking integrtion tests(old) --- pkg/gui/custom_patch_options_panel.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkg/gui/custom_patch_options_panel.go b/pkg/gui/custom_patch_options_panel.go index dcaa553bf..6d640157b 100644 --- a/pkg/gui/custom_patch_options_panel.go +++ b/pkg/gui/custom_patch_options_panel.go @@ -28,11 +28,6 @@ func (gui *Gui) handleCreatePatchOptionsMenu() error { OnPress: func() error { return gui.handleApplyPatch(true) }, Key: 'r', }, - { - Label: "copy patch to clipboard", - OnPress: func() error { return gui.copyPatchToClipboard() }, - Key: 'y', - }, } if gui.git.Patch.PatchManager.CanRebase && gui.git.Status.WorkingTreeState() == enums.REBASE_MODE_NONE { @@ -74,6 +69,14 @@ func (gui *Gui) handleCreatePatchOptionsMenu() error { } } + menuItems = append(menuItems, []*types.MenuItem{ + { + Label: "copy patch to clipboard", + OnPress: func() error { return gui.copyPatchToClipboard() }, + Key: 'y', + }, + }...) + return gui.c.Menu(types.CreateMenuOptions{Title: gui.c.Tr.PatchOptionsTitle, Items: menuItems}) } @@ -206,7 +209,7 @@ func (gui *Gui) copyPatchToClipboard() error { return gui.c.Error(err) } - gui.c.Toast(gui.c.Tr.Actions.CopyPatchToClipboard) + gui.c.Toast(gui.c.Tr.PatchCopiedToClipboard) return nil }