Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.21.0-rc.8 #196

Merged
merged 4 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/rust-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,13 @@ jobs:

# Language Spec
mkdir -p build/language-specs
copy C:\gtk-build\build\x64\release\gtksourceview5\data\language-specs\def.lang build/language-specs
copy C:\gtk-build\build\x64\release\gtksourceview5\data\language-specs\language2.rng build/language-specs
copy C:\gtk-build\build\x64\release\gtksourceview5\data\language-specs\lua.lang build/language-specs

mkdir -p build/styles
copy C:\gtk-build\build\x64\release\gtksourceview5\data\styles\* build/styles

- name: Save Cargo cache
uses: actions/cache/save@v3
with:
Expand Down
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace.package]
version = "0.21.0-rc.7"
version = "0.21.0-rc.8"
edition = "2021"

[workspace]
Expand Down
70 changes: 35 additions & 35 deletions testangel-time/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
use std::{sync::Mutex, thread::sleep, time::Duration};

use lazy_static::lazy_static;
use testangel_engine::*;
use thiserror::Error;

#[derive(Error, Debug)]
pub enum EngineError {
#[error("Duration cannot be negative.")]
CantWaitNegative,
}

lazy_static! {
static ref ENGINE: Mutex<Engine<'static, ()>> = Mutex::new(
Engine::new("Time", "Time", env!("CARGO_PKG_VERSION")).with_instruction(
Instruction::new(
"time-wait",
"Wait",
"Wait",
"Wait for a specified number of milliseconds.",
)
.with_parameter("duration", "Duration (ms)", ParameterKind::Decimal),
|_state, params, _output, _evidence| {
let duration = params["duration"].value_i32();
if duration < 0 {
return Err(Box::new(EngineError::CantWaitNegative));
}
sleep(Duration::from_millis(duration as u64));
Ok(())
}
)
);
}

expose_engine!(ENGINE);
use std::{sync::Mutex, thread::sleep, time::Duration};
use lazy_static::lazy_static;
use testangel_engine::*;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum EngineError {
#[error("Duration cannot be negative.")]
CantWaitNegative,
}
lazy_static! {
static ref ENGINE: Mutex<Engine<'static, ()>> = Mutex::new(
Engine::new("Time", "Time", env!("CARGO_PKG_VERSION")).with_instruction(
Instruction::new(
"time-wait",
"Wait",
"Wait",
"Wait for a specified number of milliseconds.",
)
.with_parameter("duration", "Duration (ms)", ParameterKind::Integer),
|_state, params, _output, _evidence| {
let duration = params["duration"].value_i32();
if duration < 0 {
return Err(Box::new(EngineError::CantWaitNegative));
}
sleep(Duration::from_millis(duration as u64));
Ok(())
}
)
);
}
expose_engine!(ENGINE);
4 changes: 4 additions & 0 deletions testangel/src/ui/actions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use relm4::{
adw, gtk, Component, ComponentController, ComponentParts, ComponentSender, Controller,
RelmWidgetExt,
};
use sourceview::StyleSchemeManager;
use testangel::{
action_loader::ActionMap,
ipc::EngineList,
Expand Down Expand Up @@ -377,6 +378,9 @@ impl Component for ActionsModel {
}),
);

// Setup source view style manager
StyleSchemeManager::default().append_search_path("styles");

let model = ActionsModel {
action_map: init.0,
engine_list: init.1,
Expand Down
4 changes: 4 additions & 0 deletions testangel/src/ui/flows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,8 @@ impl Component for FlowsModel {
}
}

log::debug!("After cut, flow is: {flow:?}");

self.needs_saving = true;
}
FlowInputs::PasteStep(idx, config) => {
Expand All @@ -734,6 +736,8 @@ impl Component for FlowsModel {
}
}

log::debug!("After paste, flow is: {flow:?}");

self.needs_saving = true;

// Trigger UI steps refresh
Expand Down