aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-05-10 18:57:14 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-05-10 18:57:14 +0800
commit1a9a315b7f892116319bc5b05323f7d98bbccc36 (patch)
treea26512eed9fc7dfb9d5ca76c299d664d26b7a7d2 /embed
parentf86f63bb3a32a1b5ce3a6afcaf3c8c825f4533e9 (diff)
downloadgsoc2013-epiphany-1a9a315b7f892116319bc5b05323f7d98bbccc36.tar
gsoc2013-epiphany-1a9a315b7f892116319bc5b05323f7d98bbccc36.tar.gz
gsoc2013-epiphany-1a9a315b7f892116319bc5b05323f7d98bbccc36.tar.bz2
gsoc2013-epiphany-1a9a315b7f892116319bc5b05323f7d98bbccc36.tar.lz
gsoc2013-epiphany-1a9a315b7f892116319bc5b05323f7d98bbccc36.tar.xz
gsoc2013-epiphany-1a9a315b7f892116319bc5b05323f7d98bbccc36.tar.zst
gsoc2013-epiphany-1a9a315b7f892116319bc5b05323f7d98bbccc36.zip
Implement security page. Remove some useless hidden prefs in the process.
2003-05-10 Marco Pesenti Gritti <marco@it.gnome.org> * data/epiphany.schemas.in: * data/glade/prefs-dialog.glade: * embed/ephy-embed-prefs.h: * embed/mozilla/mozilla-notifiers.cpp: * src/language-editor.h: * src/prefs-dialog.c: Implement security page. Remove some useless hidden prefs in the process.
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-embed-prefs.h14
-rw-r--r--embed/mozilla/mozilla-notifiers.cpp38
2 files changed, 9 insertions, 43 deletions
diff --git a/embed/ephy-embed-prefs.h b/embed/ephy-embed-prefs.h
index 8caa14b07..4582a15a5 100644
--- a/embed/ephy-embed-prefs.h
+++ b/embed/ephy-embed-prefs.h
@@ -17,16 +17,10 @@
#define CONF_RENDERING_VISITED_LINKS "/apps/epiphany/rendering/visited_link_color"
#define CONF_RENDERING_UNVISITED_LINKS "/apps/epiphany/rendering/unvisited_link_color"
#define CONF_RENDERING_UNDERLINE_LINKS "/apps/epiphany/rendering/underline_links"
-#define CONF_FILTERING_ALLOW_POPUPS "/apps/epiphany/filtering/allow_popups"
-#define CONF_FILTERING_IMAGE_LOADING_TYPE "/apps/epiphany/filtering/image_loading_type"
-#define CONF_FILTERING_ANIMATE_TYPE "/apps/epiphany/filtering/animate_type"
-#define CONF_FILTERING_STATUSBAR_REWRITE "/apps/epiphany/filtering/statusbar_rewrite"
-#define CONF_FILTERING_JAVA_ENABLED "/apps/epiphany/filtering/java_enabled"
-#define CONF_FILTERING_JAVASCRIPT_ENABLED "/apps/epiphany/filtering/javascript_enabled"
-#define CONF_PERSISTENT_COOKIES_BEHAVIOR "/apps/epiphany/filtering/cookie_behavior"
-#define CONF_PERSISTENT_COOKIE_WARN "/apps/epiphany/filterin/cookie_warn"
-#define CONF_PERSISTENT_COOKIE_LIFETIME "/apps/epiphany/filtering/cookie_lifetime"
-#define CONF_PERSISTENT_PASSWORDS_SAVE "/apps/epiphany/filtering/passwords_save"
+#define CONF_SECURITY_ALLOW_POPUPS "/apps/epiphany/security/allow_popups"
+#define CONF_SECURITY_JAVA_ENABLED "/apps/epiphany/security/java_enabled"
+#define CONF_SECURITY_JAVASCRIPT_ENABLED "/apps/epiphany/security/javascript_enabled"
+#define CONF_SECURITY_COOKIES_ACCEPT "/apps/epiphany/security/cookie_accept"
#define CONF_LANGUAGE_AUTODETECT_CHARSET "/apps/epiphany/rendering/autodetect_charset"
#define CONF_LANGUAGE_DEFAULT_CHARSET "/apps/epiphany/rendering/default_charset"
#define CONF_RENDERING_DEFAULT_FONT "/apps/epiphany/rendering/default_font"
diff --git a/embed/mozilla/mozilla-notifiers.cpp b/embed/mozilla/mozilla-notifiers.cpp
index 8c7364516..52b4d2560 100644
--- a/embed/mozilla/mozilla-notifiers.cpp
+++ b/embed/mozilla/mozilla-notifiers.cpp
@@ -48,11 +48,6 @@ mozilla_own_fonts_notifier(GConfClient *client,
EphyEmbedSingle *single);
static void
-mozilla_animate_notifier(GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- EphyEmbedSingle *single);
-static void
generic_mozilla_string_notifier(GConfClient *client,
guint cnxn_id,
GConfEntry *entry,
@@ -139,9 +134,8 @@ static const struct
}
conversion_table [] =
{
- { CONF_FILTERING_JAVA_ENABLED, BOOL_PREF, "security.enable_java"},
- { CONF_FILTERING_JAVASCRIPT_ENABLED, BOOL_PREF, "javascript.enabled"},
- { CONF_FILTERING_IMAGE_LOADING_TYPE, INT_PREF, "network.image.imageBehavior"},
+ { CONF_SECURITY_JAVA_ENABLED, BOOL_PREF, "security.enable_java"},
+ { CONF_SECURITY_JAVASCRIPT_ENABLED, BOOL_PREF, "javascript.enabled"},
{ CONF_RENDERING_BG_COLOR, STRING_PREF, "browser.display.background_color"},
{ CONF_RENDERING_TEXT_COLOR, STRING_PREF, "browser.display.foreground_color"},
{ CONF_RENDERING_UNVISITED_LINKS, STRING_PREF, "browser.anchor_color"},
@@ -160,10 +154,7 @@ conversion_table [] =
{ CONF_NETWORK_MEMORY_CACHE, INT_PREF, "browser.cache.memory.capacity"},
{ CONF_NETWORK_DISK_CACHE, INT_PREF, "browser.cache.disk.capacity"},
{ CONF_NETWORK_CACHE_COMPARE, INT_PREF, "browser.cache.check_doc_frequency"},
- { CONF_PERSISTENT_COOKIE_WARN, BOOL_PREF, "network.cookie.warnAboutCookies"},
- { CONF_PERSISTENT_COOKIES_BEHAVIOR, INT_PREF, "network.cookie.cookieBehavior"},
- { CONF_PERSISTENT_COOKIE_LIFETIME, BOOL_PREF, "network.cookie.lifetime.enabled"},
- { CONF_PERSISTENT_PASSWORDS_SAVE, BOOL_PREF, "signon.rememberSignons"},
+ { CONF_SECURITY_COOKIES_ACCEPT, BOOL_PREF, "network.cookie.warnAboutCookies"},
{ CONF_RENDERING_USE_SYSTEM_COLORS, BOOL_PREF, "browser.display.use_system_colors"},
{ NULL, 0, NULL }
};
@@ -177,13 +168,11 @@ custom_notifiers [] =
{
{ CONF_NETWORK_USER_AGENT,
(GConfClientNotifyFunc) mozilla_user_agent_notifier },
- { CONF_FILTERING_ANIMATE_TYPE,
- (GConfClientNotifyFunc) mozilla_animate_notifier },
{ CONF_RENDERING_USE_OWN_COLORS,
(GConfClientNotifyFunc) mozilla_own_colors_notifier },
{ CONF_RENDERING_USE_OWN_FONTS,
(GConfClientNotifyFunc) mozilla_own_fonts_notifier },
- { CONF_FILTERING_ALLOW_POPUPS,
+ { CONF_SECURITY_ALLOW_POPUPS,
(GConfClientNotifyFunc) mozilla_allow_popups_notifier },
{ CONF_LANGUAGE_DEFAULT_CHARSET,
(GConfClientNotifyFunc) mozilla_default_charset_notifier },
@@ -510,29 +499,12 @@ mozilla_own_fonts_notifier(GConfClient *client,
}
static void
-mozilla_animate_notifier(GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- EphyEmbedSingle *single)
-{
- static const gchar *type[] =
- {
- "normal",
- "once",
- "none"
- };
-
- mozilla_prefs_set_string ("image.animation_mode",
- type[gconf_value_get_int(entry->value)]);
-}
-
-static void
mozilla_allow_popups_notifier(GConfClient *client,
guint cnxn_id,
GConfEntry *entry,
EphyEmbedSingle *single)
{
- gboolean new_val = eel_gconf_get_boolean(CONF_FILTERING_ALLOW_POPUPS);
+ gboolean new_val = eel_gconf_get_boolean(CONF_SECURITY_ALLOW_POPUPS);
mozilla_prefs_set_boolean ("dom.disable_open_during_load",
!new_val);
}