Commit 7d5cbdbc authored by Michael Terry's avatar Michael Terry

fix removing multiple include/exclude folders at once

parent 1b5c20e2
...@@ -328,7 +328,7 @@ public class ConfigList : ConfigWidget ...@@ -328,7 +328,7 @@ public class ConfigList : ConfigWidget
return slist_val.dup_strv(); return slist_val.dup_strv();
} }
public void write_to_config(Gtk.TreeModel model, Gtk.TreePath path) public void write_to_config(Gtk.TreeModel model, Gtk.TreePath? path)
{ {
Gtk.TreeIter iter; Gtk.TreeIter iter;
string[] paths = new string[0]; string[] paths = new string[0];
...@@ -350,12 +350,21 @@ public class ConfigList : ConfigWidget ...@@ -350,12 +350,21 @@ public class ConfigList : ConfigWidget
weak Gtk.TreeModel model; weak Gtk.TreeModel model;
List<Gtk.TreePath> paths = sel.get_selected_rows(out model); List<Gtk.TreePath> paths = sel.get_selected_rows(out model);
List<Gtk.TreeIter?> iters = null;
foreach (Gtk.TreePath path in paths) { foreach (Gtk.TreePath path in paths) {
Gtk.TreeIter iter; Gtk.TreeIter iter;
if (model.get_iter(out iter, path)) if (model.get_iter(out iter, path))
iters.prepend(iter);
}
model.row_deleted.disconnect(write_to_config);
foreach (Gtk.TreeIter iter in iters) {
(model as Gtk.ListStore).remove(iter); (model as Gtk.ListStore).remove(iter);
} }
model.row_deleted.connect(write_to_config);
write_to_config(model, null);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment