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.
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' settings_ remove_ style_rule (settings, gchar* rule_id) settings_ remove_ all_style_ rules (settings, gchar* rule_id) matches "adblock-1" and "adblock-2" if you pass "adblock"
midori_
midori_
But I'm not decided at all. All the APIs I can come up with feel slightly icky in one way or another.