Closed bootstrap-prime closed 1 year ago
@bootstrap-prime Are you interested in following up on my little review?
absolutely, sorry for the delay.
I sort of figured out how to make this better - spawn an interactive qcalc session and then pipe up inputs and outputs. Unfortunately, it seems that gio g_inputstream* doesn't have the ability to read, and then return after a timeout, and I'm not familiar enough with async here to implement a cancel. I thought I could get around this by just directly using libqalculate, but it's C++ and this project is pure C. libqalculate may expose a C abi, but I'm not sure how to use it or what to look for.
Shall I take a proper look at this PR or do you wanna research this topic further first?
I don't think I have the motivation to continue, honestly. Most of the window opening spam is removed, so this is probably a good stopping point.
Sorry for forgetting about this for so long. Finally merged it. Thanks!
I changed the behavior of calc_preprocess_input to only call qcalc when the input string changes. This is a partial solution to #40. I'm still learning C so I may or may not have a better solution for this later on.