separate children proxy components

This commit is contained in:
yggverse 2025-07-26 04:26:20 +03:00
parent 02f6419b92
commit b15e4a5fc1
11 changed files with 310 additions and 193 deletions

View file

@ -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(),

View file

@ -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())));