diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2003-10-21 05:22:48 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-10-21 05:22:48 +0800 |
commit | 7213f20cbdc596daa9485446f4650eb1d294736d (patch) | |
tree | 6fe8845506171bb3894e7568e903c9c86f6289ba /embed/ephy-encodings.c | |
parent | 58dde9fa0c4d501a0d32de681f79b308e7603c64 (diff) | |
download | gsoc2013-epiphany-7213f20cbdc596daa9485446f4650eb1d294736d.tar.gz gsoc2013-epiphany-7213f20cbdc596daa9485446f4650eb1d294736d.tar.zst gsoc2013-epiphany-7213f20cbdc596daa9485446f4650eb1d294736d.zip |
Encoding menu improvements, Episode V: MPT strikes back.
2003-10-20 Christian Persch <chpe@cvs.gnome.org>
Encoding menu improvements, Episode V:
MPT strikes back.
* data/glade/epiphany.glade:
* embed/ephy-encodings.c: (ephy_encodings_finalize),
(ephy_encodings_init):
* embed/ephy-encodings.h:
* src/ephy-encoding-dialog.c: (encoding_is_automatic),
(sync_embed_cb), (activate_choice),
(ephy_encoding_dialog_response_cb), (view_node_selected_cb),
(view_node_activated_cb), (ephy_encoding_dialog_init):
Replace the 2-pane view with a single list, and restore
the automatic and manual radio buttons.
Diffstat (limited to 'embed/ephy-encodings.c')
-rw-r--r-- | embed/ephy-encodings.c | 68 |
1 files changed, 1 insertions, 67 deletions
diff --git a/embed/ephy-encodings.c b/embed/ephy-encodings.c index 1105207df..51e2d3a52 100644 --- a/embed/ephy-encodings.c +++ b/embed/ephy-encodings.c @@ -41,7 +41,6 @@ struct EphyEncodingsPrivate EphyNode *root; EphyNode *encodings; EphyNode *detectors; - EphyNode *categories; GHashTable *hash; GSList *recent; }; @@ -151,30 +150,11 @@ encoding_entries [] = }; static const guint n_encoding_entries = G_N_ELEMENTS (encoding_entries); -/* make sure this covers all LG_* groups ! */ -/* FIXME: those categories are pretty bad :( */ -static const struct -{ - char *title; - EphyLanguageGroup groups; -} -geo_entries [] = -{ - { N_("Universal"), LG_UNICODE }, - { N_("Eastern Asia"), LG_CHINESE_SIMP | LG_CHINESE_TRAD | LG_JAPANESE | LG_KOREAN | LG_VIETNAMESE | LG_THAI }, - { N_("Western Asia"), LG_CAUCASIAN | LG_TURKISH | LG_INDIAN }, - { N_("Eastern European"), LG_BALTIC | LG_CYRILLIC | LG_UKRAINIAN | LG_C_EUROPEAN }, - { N_("Western European"), LG_WESTERN | LG_GREEK | LG_NORDIC | LG_SE_EUROPEAN }, - { N_("Middle Eastern"), LG_ARABIC | LG_PERSIAN | LG_HEBREW } -}; -static const guint n_geo_entries = G_N_ELEMENTS (geo_entries); - enum { ALL_NODE_ID = 2, ENCODINGS_NODE_ID = 3, - DETECTORS_NODE_ID = 5, - CATEGORIES_NODE_ID = 7 + DETECTORS_NODE_ID = 5 }; #define RECENT_KEY "/apps/epiphany/general/recent_encodings" @@ -222,7 +202,6 @@ ephy_encodings_finalize (GObject *object) ephy_node_unref (encodings->priv->encodings); ephy_node_unref (encodings->priv->detectors); - ephy_node_unref (encodings->priv->categories); ephy_node_unref (encodings->priv->root); g_slist_foreach (encodings->priv->recent, (GFunc) g_free, NULL); @@ -315,14 +294,6 @@ ephy_encodings_get_all (EphyEncodings *encodings) return encodings->priv->encodings; } -EphyNode * -ephy_encodings_get_categories (EphyEncodings *encodings) -{ - g_return_val_if_fail (EPHY_IS_ENCODINGS (encodings), NULL); - - return encodings->priv->categories; -} - void ephy_encodings_add_recent (EphyEncodings *encodings, const char *code) @@ -399,12 +370,10 @@ ephy_encodings_init (EphyEncodings *encodings) encodings->priv->root = ephy_node_new_with_id (db, ALL_NODE_ID); encodings->priv->encodings = ephy_node_new_with_id (db, ENCODINGS_NODE_ID); encodings->priv->detectors = ephy_node_new_with_id (db, DETECTORS_NODE_ID); - encodings->priv->categories = ephy_node_new_with_id (db, CATEGORIES_NODE_ID); ephy_node_ref (encodings->priv->root); ephy_node_ref (encodings->priv->encodings); ephy_node_ref (encodings->priv->detectors); - ephy_node_ref (encodings->priv->categories); /* now fill the db */ for (i = 0; i < n_encoding_entries; i++) @@ -462,41 +431,6 @@ ephy_encodings_init (EphyEncodings *encodings) g_value_unset (&value); } - /* setup list of categories for 2-pane view in ephy-encoding-dialog */ - for (i=0; i < n_geo_entries; i++) - { - EphyNode *node; - GValue value = { 0, }; - GList *list, *l; - - node = ephy_node_new (db); - ephy_node_add_child (encodings->priv->categories, node); - - g_value_init (&value, G_TYPE_STRING); - g_value_set_string (&value, _(geo_entries[i].title)); - ephy_node_set_property (node, EPHY_NODE_ENCODING_PROP_TITLE, &value); - g_value_unset (&value); - - g_value_init (&value, G_TYPE_STRING); - g_value_take_string (&value, g_utf8_collate_key (_(geo_entries[i].title), -1)); - ephy_node_set_property (node, EPHY_NODE_ENCODING_PROP_COLLATION_KEY, &value); - g_value_unset (&value); - - g_value_init (&value, G_TYPE_INT); - g_value_set_int (&value, encoding_entries[i].groups); - ephy_node_set_property (node, EPHY_NODE_ENCODING_PROP_LANGUAGE_GROUPS, &value); - g_value_unset (&value); - - /* add the encodings to the category */ - list = ephy_encodings_get_encodings (encodings, geo_entries[i].groups); - for (l = list; l != NULL; l = l->next) - { - ephy_node_add_child (node, (EphyNode *) l->data); - } - g_list_free (list); - - } - /* get the list of recently used encodings */ list = eel_gconf_get_string_list (RECENT_KEY); |