diff options
author | Benjamin Otte <otte@gnome.org> | 2008-07-22 14:51:42 +0200 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2008-07-22 14:51:42 +0200 |
commit | 2145273ffe79a86b0230c3585e86fee4f831c892 (patch) | |
tree | 15d773a240f2b033ad26df69f333a27e20542f3d | |
parent | 5c5f5b93eb117af7c1ea85175f8cffd773409d59 (diff) |
don't throw an error when saving autoplay values either
-rw-r--r-- | src/swfmoz_config.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/swfmoz_config.c b/src/swfmoz_config.c index 024bc4f..649b656 100644 --- a/src/swfmoz_config.c +++ b/src/swfmoz_config.c @@ -115,7 +115,7 @@ swfmoz_config_read_autoplay (SwfmozConfig *config, const char *host, gboolean swfmoz_config_should_autoplay (SwfmozConfig *config, const SwfdecURL *url) { - const gchar *host; + const char *host; gboolean autoplay = FALSE; g_return_val_if_fail (SWFMOZ_IS_CONFIG (config), FALSE); @@ -134,9 +134,15 @@ void swfmoz_config_set_autoplay (SwfmozConfig *config, const SwfdecURL *url, gboolean autoplay) { + const char *host; + g_return_if_fail (SWFMOZ_IS_CONFIG (config)); - g_key_file_set_boolean (config->keyfile, swfdec_url_get_host (url), + host = swfdec_url_get_host (url); + if (host == NULL) + host = swfdec_url_get_protocol (url); + + g_key_file_set_boolean (config->keyfile, host, "autoplay", autoplay); swfmoz_config_save_file (config); |