Merge pull request #1728 from darkfated/add-context-actions

Add user-defined context actions
This commit is contained in:
Jeremy Soller 2026-04-10 15:42:42 -06:00 committed by GitHub
commit 175f8ba724
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 252 additions and 9 deletions

View file

@ -441,8 +441,13 @@ impl<M: Send + 'static> Dialog<M> {
#[derive(Clone, Debug)]
enum DialogPage {
NewFolder { parent: PathBuf, name: String },
Replace { filename: String },
NewFolder {
parent: PathBuf,
name: String,
},
Replace {
filename: String,
},
}
#[derive(Clone, Debug)]
@ -1833,6 +1838,7 @@ impl Application for App {
&app.key_binds,
&app.modifiers,
false, // Paste not used in dialogs
&app.flags.config.context_actions,
)
.map(Message::TabMessage)
.map(cosmic::Action::App),
@ -2025,8 +2031,8 @@ impl Application for App {
}
col = col.push(
self.tab
.view(&self.key_binds, &self.modifiers, false)
self.tab
.view(&self.key_binds, &self.modifiers, false, &[])
.map(Message::TabMessage),
);