From a5f3515ad87f978c24d9454d45a454d824eb0897 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Tue, 16 Jan 2024 17:28:14 +1100 Subject: Set groundwork for better disabled reasons with range select Something dumb that we're currently doing is expecting list items to define an ID method which returns a string. We use that when copying items to clipboard with ctrl+o and when getting a ref name for diffing. This commit gets us a little deeper into that hole by explicitly requiring list items to implement that method so that we can easily use the new helper functions in list_controller_trait.go. In future we need to just remove the whole ID thing entirely but I'm too lazy to do that right now. --- pkg/gui/types/context.go | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg/gui/types/context.go') diff --git a/pkg/gui/types/context.go b/pkg/gui/types/context.go index 860a49588..92b07a729 100644 --- a/pkg/gui/types/context.go +++ b/pkg/gui/types/context.go @@ -136,6 +136,7 @@ type IListContext interface { Context GetSelectedItemId() string + GetSelectedItemIds() ([]string, int, int) IsItemVisible(item HasUrn) bool GetList() IList -- cgit v1.2.3