Comment 8 for bug 826441

Revision history for this message
Cris Dywan (kalikiana) wrote :

I like the proposed midori_settings_add/remove_style_rule. Maybe also midori_settings_replace?

I'm thinking, and that's what I brought up in IRC, passing a string identifier such as "adblock" or "addons" might be nice, so that you don't have to keep around the ID. And you could still construct an ID with an incremental counter. Some ideas here:

midori_settings_add_style_rule (settings, gchar* rule_id, gchar* style) ← could double as 'replace'
midori_settings_remove_style_rule (settings, gchar* rule_id)
midori_settings_remove_all_style_rules (settings, gchar* rule_id) matches "adblock-1" and "adblock-2" if you pass "adblock"

But I'm not decided at all. All the APIs I can come up with feel slightly icky in one way or another.