mirror of
https://github.com/mii443/vrclipboard-ime-gui.git
synced 2025-08-22 16:15:32 +00:00
activate profile
This commit is contained in:
@ -1,6 +1,5 @@
|
|||||||
use crate::{config::Config, converter::converter::{get_custom_converter, Converter}, STATE};
|
use crate::{config::Config, converter::converter::{get_custom_converter, Converter}, STATE};
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use regex::Regex;
|
|
||||||
|
|
||||||
pub struct ConversionBlock {
|
pub struct ConversionBlock {
|
||||||
pub text: String,
|
pub text: String,
|
||||||
|
@ -15,6 +15,7 @@ impl SearchCandidateProvider {
|
|||||||
pub fn create() -> Result<Self> {
|
pub fn create() -> Result<Self> {
|
||||||
let profile_mgr = InputProcessorProfileMgr::new()?;
|
let profile_mgr = InputProcessorProfileMgr::new()?;
|
||||||
let profile = profile_mgr.get_active_profile()?;
|
let profile = profile_mgr.get_active_profile()?;
|
||||||
|
profile_mgr.activate_profile(&profile)?;
|
||||||
|
|
||||||
let thread_mgr = ThreadMgr::new()?;
|
let thread_mgr = ThreadMgr::new()?;
|
||||||
let _client_id = thread_mgr.activate_ex(TF_TMAE_NOACTIVATEKEYBOARDLAYOUT)?;
|
let _client_id = thread_mgr.activate_ex(TF_TMAE_NOACTIVATEKEYBOARDLAYOUT)?;
|
||||||
|
@ -34,6 +34,8 @@ impl TsfConversion {
|
|||||||
println!("{} == {}", text, self.conversion_history.last().unwrap_or(&("".to_string())).clone());
|
println!("{} == {}", text, self.conversion_history.last().unwrap_or(&("".to_string())).clone());
|
||||||
let same_as_last_conversion = text.to_string() == self.conversion_history.last().unwrap_or(&("".to_string())).clone();
|
let same_as_last_conversion = text.to_string() == self.conversion_history.last().unwrap_or(&("".to_string())).clone();
|
||||||
|
|
||||||
|
self.target_text = text.to_string();
|
||||||
|
|
||||||
if !same_as_last_conversion && self.now_reconvertion {
|
if !same_as_last_conversion && self.now_reconvertion {
|
||||||
self.now_reconvertion = false;
|
self.now_reconvertion = false;
|
||||||
self.reconversion_prefix = None;
|
self.reconversion_prefix = None;
|
||||||
|
Reference in New Issue
Block a user