diff options
author | Björn Lindqvist <bjourne@gmail.com> | 2006-12-17 11:06:15 +0800 |
---|---|---|
committer | Björn Lindqvist <bjornl@src.gnome.org> | 2006-12-17 11:06:15 +0800 |
commit | 73f71bde0e7e256ac5636e7d0f4693aa83e67a56 (patch) | |
tree | ef89ba03eafbd73a71984fe210b7d12b295b9592 /embed/ephy-encodings.c | |
parent | 66ccfb8ffa2b566a31151da92ba5aa0881153d15 (diff) | |
download | gsoc2013-epiphany-73f71bde0e7e256ac5636e7d0f4693aa83e67a56.tar.gz gsoc2013-epiphany-73f71bde0e7e256ac5636e7d0f4693aa83e67a56.tar.zst gsoc2013-epiphany-73f71bde0e7e256ac5636e7d0f4693aa83e67a56.zip |
embed/ephy-encodings.c embed/ephy-favicon-cache.c embed/ephy-history.c
2006-12-17 Björn Lindqvist <bjourne@gmail.com>
* embed/ephy-encodings.c
* embed/ephy-favicon-cache.c
* embed/ephy-history.c
* embed/mozilla/GlobalHistory.cpp
* lib/ephy-state.c
* lib/widgets/ephy-node-view.c
* src/ephy-tab.c
* src/bookmarks/ephy-bookmarks.c
Refactor lots of code by using the function
ephy_node_set_property_XXX() instead of
ephy_node_set_property(). Also, add emacs mode headers to touched
files. Bug #381546.
Diffstat (limited to 'embed/ephy-encodings.c')
-rw-r--r-- | embed/ephy-encodings.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/embed/ephy-encodings.c b/embed/ephy-encodings.c index d253959be..0d95c9dad 100644 --- a/embed/ephy-encodings.c +++ b/embed/ephy-encodings.c @@ -1,3 +1,4 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* * Copyright © 2003 Marco Pesenti Gritti * Copyright © 2003 Christian Persch @@ -291,10 +292,8 @@ add_encoding (EphyEncodings *encodings, node = ephy_node_new (encodings->priv->db); - g_value_init (&value, G_TYPE_STRING); - g_value_set_string (&value, title); - ephy_node_set_property (node, EPHY_NODE_ENCODING_PROP_TITLE, &value); - g_value_unset (&value); + ephy_node_set_property_string (node, EPHY_NODE_ENCODING_PROP_TITLE, + title); elided = elide_underscores (title); normalised = g_utf8_normalize (elided, -1, G_NORMALIZE_DEFAULT); @@ -311,20 +310,16 @@ add_encoding (EphyEncodings *encodings, ephy_node_set_property (node, EPHY_NODE_ENCODING_PROP_TITLE_ELIDED, &value); g_value_unset (&value); - g_value_init (&value, G_TYPE_STRING); - g_value_set_string (&value, code); - ephy_node_set_property (node, EPHY_NODE_ENCODING_PROP_ENCODING, &value); - g_value_unset (&value); + ephy_node_set_property_string (node, EPHY_NODE_ENCODING_PROP_ENCODING, + code); - g_value_init (&value, G_TYPE_INT); - g_value_set_int (&value, groups); - ephy_node_set_property (node, EPHY_NODE_ENCODING_PROP_LANGUAGE_GROUPS, &value); - g_value_unset (&value); - - g_value_init (&value, G_TYPE_BOOLEAN); - g_value_set_boolean (&value, is_autodetector); - ephy_node_set_property (node, EPHY_NODE_ENCODING_PROP_IS_AUTODETECTOR, &value); - g_value_unset (&value); + ephy_node_set_property_int (node, + EPHY_NODE_ENCODING_PROP_LANGUAGE_GROUPS, + groups); + + ephy_node_set_property_boolean (node, + EPHY_NODE_ENCODING_PROP_IS_AUTODETECTOR, + is_autodetector); /* now insert the node in our structure */ ephy_node_add_child (encodings->priv->root, node); |