mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
separate children proxy components
This commit is contained in:
parent
02f6419b92
commit
b15e4a5fc1
11 changed files with 310 additions and 193 deletions
|
|
@ -60,10 +60,10 @@ impl Proxy for adw::PreferencesDialog {
|
|||
d.connect_closed({
|
||||
let profile = profile.clone();
|
||||
move |_| {
|
||||
profile.proxy.clear();
|
||||
profile.proxy.rule.clear();
|
||||
for rule in rules.take() {
|
||||
if rule.validate() {
|
||||
profile.proxy.add_rule(
|
||||
profile.proxy.rule.add(
|
||||
rule.id,
|
||||
rule.is_enabled(),
|
||||
rule.priority(),
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ pub struct Rules {
|
|||
|
||||
impl Rules {
|
||||
pub fn build(profile: &Rc<Profile>) -> Self {
|
||||
let config = profile.proxy.rules();
|
||||
let config = profile.proxy.rule.all();
|
||||
|
||||
let rules: Rc<RefCell<HashMap<GString, Rule>>> =
|
||||
Rc::new(RefCell::new(HashMap::with_capacity(config.len())));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue