aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-toolbars-model.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ephy-toolbars-model.c')
-rwxr-xr-xsrc/ephy-toolbars-model.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/ephy-toolbars-model.c b/src/ephy-toolbars-model.c
index 475de34f7..ca2109c90 100755
--- a/src/ephy-toolbars-model.c
+++ b/src/ephy-toolbars-model.c
@@ -355,3 +355,43 @@ ephy_toolbars_model_has_bookmark (EphyToolbarsModel *model,
return (position != -1);
}
+
+void
+ephy_toolbars_model_set_flag (EphyToolbarsModel *model,
+ EggTbModelFlags flags)
+{
+ EggToolbarsModel *t = EGG_TOOLBARS_MODEL (model);
+ int i, n_toolbars;
+
+ n_toolbars = egg_toolbars_model_n_toolbars
+ (EGG_TOOLBARS_MODEL (model));
+
+ for (i = 0; i < n_toolbars; i++)
+ {
+ EggTbModelFlags old_flags;
+
+ old_flags = egg_toolbars_model_get_flags (t, i);
+
+ egg_toolbars_model_set_flags (t, old_flags | flags, i);
+ }
+}
+
+void
+ephy_toolbars_model_unset_flag (EphyToolbarsModel *model,
+ EggTbModelFlags flags)
+{
+ EggToolbarsModel *t = EGG_TOOLBARS_MODEL (model);
+ int i, n_toolbars;
+
+ n_toolbars = egg_toolbars_model_n_toolbars
+ (EGG_TOOLBARS_MODEL (model));
+
+ for (i = 0; i < n_toolbars; i++)
+ {
+ EggTbModelFlags old_flags;
+
+ old_flags = egg_toolbars_model_get_flags (t, i);
+
+ egg_toolbars_model_set_flags (t, old_flags ^ flags, i);
+ }
+}