mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-09-05 09:05:47 +00:00
feat: disable undo in read only textbuffers
This commit is contained in:
parent
c22633c78f
commit
8508a06e2a
4 changed files with 4 additions and 1 deletions
|
@ -204,7 +204,7 @@ impl SimpleComponent for BuildWindow {
|
|||
title: "".into(),
|
||||
content: "".into(),
|
||||
can_close: false,
|
||||
textbuf: gtk::TextBuffer::builder().build(),
|
||||
textbuf: gtk::TextBuffer::builder().enable_undo(false).build(),
|
||||
textview: None,
|
||||
build_status: BuildStatus::Building,
|
||||
win: None,
|
||||
|
|
|
@ -223,6 +223,7 @@ impl SimpleComponent for DebugView {
|
|||
) -> ComponentParts<Self> {
|
||||
let textbuf = sourceview5::Buffer::builder()
|
||||
.highlight_syntax(false)
|
||||
.enable_undo(false)
|
||||
.build();
|
||||
if let Some(scheme) = &sourceview5::StyleSchemeManager::new().scheme("Adwaita-dark") {
|
||||
textbuf.set_style_scheme(Some(scheme));
|
||||
|
|
|
@ -296,6 +296,7 @@ impl SimpleComponent for MainView {
|
|||
}
|
||||
res
|
||||
}
|
||||
set_enable_undo: false,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -70,6 +70,7 @@ impl SimpleComponent for SteamLaunchOptionsBox {
|
|||
set_buffer: cmdbuf = >k::TextBuffer {
|
||||
#[track = "model.changed(Self::launch_options())"]
|
||||
set_text: model.launch_options.as_str(),
|
||||
set_enable_undo: false,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue