diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2003-12-18 23:58:01 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-12-18 23:58:01 +0800 |
commit | aba053264da43f60b0628077e79cd52e3d78394a (patch) | |
tree | 5aa84f8f32a792c138a1528c8c15926a80e29062 /embed | |
parent | 9266e975fc38af05bf2a7d1329d7b530ef2c6ba0 (diff) | |
download | gsoc2013-epiphany-aba053264da43f60b0628077e79cd52e3d78394a.tar gsoc2013-epiphany-aba053264da43f60b0628077e79cd52e3d78394a.tar.gz gsoc2013-epiphany-aba053264da43f60b0628077e79cd52e3d78394a.tar.bz2 gsoc2013-epiphany-aba053264da43f60b0628077e79cd52e3d78394a.tar.lz gsoc2013-epiphany-aba053264da43f60b0628077e79cd52e3d78394a.tar.xz gsoc2013-epiphany-aba053264da43f60b0628077e79cd52e3d78394a.tar.zst gsoc2013-epiphany-aba053264da43f60b0628077e79cd52e3d78394a.zip |
Factor out the common encoding is_automatic check.
2003-12-18 Christian Persch <chpe@cvs.gnome.org>
* embed/ephy-encodings.c: (ephy_encoding_info_is_automatic):
* embed/ephy-encodings.h:
* src/ephy-encoding-dialog.c: (sync_embed_cb):
* src/ephy-encoding-menu.c: (update_encoding_menu_cb):
Factor out the common encoding is_automatic check.
Diffstat (limited to 'embed')
-rw-r--r-- | embed/ephy-encodings.c | 9 | ||||
-rw-r--r-- | embed/ephy-encodings.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/embed/ephy-encodings.c b/embed/ephy-encodings.c index c50ba19c2..c66adde85 100644 --- a/embed/ephy-encodings.c +++ b/embed/ephy-encodings.c @@ -457,6 +457,15 @@ ephy_encoding_info_free (EphyEncodingInfo *info) } } +gboolean +ephy_encoding_info_is_automatic (EphyEncodingInfo *info) +{ + g_return_val_if_fail (info != NULL, FALSE); + + return (info->encoding_source < EMBED_ENCODING_PARENT_FORCED) + && (info->forced_encoding == NULL || info->forced_encoding[0] == '\0'); +} + EphyEncodings * ephy_encodings_new (void) { diff --git a/embed/ephy-encodings.h b/embed/ephy-encodings.h index 6832b160c..9a565344a 100644 --- a/embed/ephy-encodings.h +++ b/embed/ephy-encodings.h @@ -146,6 +146,8 @@ GList *ephy_encodings_get_recent (EphyEncodings *encodings); void ephy_encoding_info_free (EphyEncodingInfo *info); +gboolean ephy_encoding_info_is_automatic (EphyEncodingInfo *info); + G_END_DECLS #endif |