summaryrefslogtreecommitdiff
path: root/embed/ephy-history.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@src.gnome.org>2003-12-16 17:29:43 +0000
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-12-16 17:29:43 +0000
commit7a407a918297b8c54ee79174aac54bc84de97d29 (patch)
tree2b23c9bb51f5b388861697b0470652ec5a5e1e44 /embed/ephy-history.c
parent7339c460e72364aad2de893ab3c13549efc01d9b (diff)
downloadepiphany-7a407a918297b8c54ee79174aac54bc84de97d29.tar.gz
*** empty log message ***
Diffstat (limited to 'embed/ephy-history.c')
-rw-r--r--embed/ephy-history.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/embed/ephy-history.c b/embed/ephy-history.c
index 666e6b4e6..8aae3eaf0 100644
--- a/embed/ephy-history.c
+++ b/embed/ephy-history.c
@@ -52,9 +52,7 @@ struct EphyHistoryPrivate
EphyNode *pages;
EphyNode *last_page;
GHashTable *hosts_hash;
- GStaticRWLock *hosts_hash_lock;
GHashTable *pages_hash;
- GStaticRWLock *pages_hash_lock;
int autosave_timeout;
guint update_hosts_idle;
gboolean dirty;
@@ -160,7 +158,6 @@ remove_obsolete_pages (EphyHistory *eb)
g_date_set_time (&current_date, time (NULL));
children = ephy_node_get_children (eb->priv->pages);
- ephy_node_thaw (eb->priv->pages);
for (i = 0; i < children->len; i++)
{
EphyNode *kid;
@@ -211,13 +208,9 @@ hosts_added_cb (EphyNode *node,
{
eb->priv->dirty = TRUE;
- g_static_rw_lock_writer_lock (eb->priv->hosts_hash_lock);
-
g_hash_table_insert (eb->priv->hosts_hash,
(char *) ephy_node_get_property_string (child, EPHY_NODE_PAGE_PROP_LOCATION),
child);
-
- g_static_rw_lock_writer_unlock (eb->priv->hosts_hash_lock);
}
static void
@@ -228,12 +221,8 @@ hosts_removed_cb (EphyNode *node,
{
eb->priv->dirty = TRUE;
- g_static_rw_lock_writer_lock (eb->priv->hosts_hash_lock);
-
g_hash_table_remove (eb->priv->hosts_hash,
ephy_node_get_property_string (child, EPHY_NODE_PAGE_PROP_LOCATION));
-
- g_static_rw_lock_writer_unlock (eb->priv->hosts_hash_lock);
}
static void
@@ -251,13 +240,9 @@ pages_added_cb (EphyNode *node,
{
eb->priv->dirty = TRUE;
- g_static_rw_lock_writer_lock (eb->priv->pages_hash_lock);
-
g_hash_table_insert (eb->priv->pages_hash,
(char *) ephy_node_get_property_string (child, EPHY_NODE_PAGE_PROP_LOCATION),
child);
-
- g_static_rw_lock_writer_unlock (eb->priv->pages_hash_lock);
}
static void
@@ -268,12 +253,8 @@ pages_removed_cb (EphyNode *node,
{
eb->priv->dirty = TRUE;
- g_static_rw_lock_writer_lock (eb->priv->pages_hash_lock);
-
g_hash_table_remove (eb->priv->pages_hash,
ephy_node_get_property_string (child, EPHY_NODE_PAGE_PROP_LOCATION));
-
- g_static_rw_lock_writer_unlock (eb->priv->pages_hash_lock);
}
static void
@@ -318,7 +299,6 @@ update_host_on_child_remove (EphyNode *node)
new_host_last_visit = last_visit;
}
}
- ephy_node_thaw (node);
if (host_last_visit != new_host_last_visit)
{
@@ -358,7 +338,6 @@ update_hosts (EphyHistory *eh)
}
}
}
- ephy_node_thaw (eh->priv->hosts);
g_list_foreach (empty, (GFunc)ephy_node_unref, NULL);
g_list_free (empty);
@@ -412,13 +391,8 @@ ephy_history_init (EphyHistory *eb)
eb->priv->pages_hash = g_hash_table_new (g_str_hash,
g_str_equal);
- eb->priv->pages_hash_lock = g_new0 (GStaticRWLock, 1);
- g_static_rw_lock_init (eb->priv->pages_hash_lock);
-
eb->priv->hosts_hash = g_hash_table_new (g_str_hash,
g_str_equal);
- eb->priv->hosts_hash_lock = g_new0 (GStaticRWLock, 1);
- g_static_rw_lock_init (eb->priv->hosts_hash_lock);
/* Pages */
eb->priv->pages = ephy_node_new_with_id (db, PAGES_NODE_ID);
@@ -505,9 +479,7 @@ ephy_history_finalize (GObject *object)
g_object_unref (eb->priv->db);
g_hash_table_destroy (eb->priv->pages_hash);
- g_static_rw_lock_free (eb->priv->pages_hash_lock);
g_hash_table_destroy (eb->priv->hosts_hash);
- g_static_rw_lock_free (eb->priv->hosts_hash_lock);
g_source_remove (eb->priv->autosave_timeout);
@@ -626,15 +598,12 @@ ephy_history_get_host (EphyHistory *eh, const char *url)
g_return_val_if_fail (host_locations != NULL, NULL);
- g_static_rw_lock_reader_lock (eh->priv->hosts_hash_lock);
-
for (l = host_locations; l != NULL; l = l->next)
{
host = g_hash_table_lookup (eh->priv->hosts_hash,
(char *)l->data);
if (host) break;
}
- g_static_rw_lock_reader_unlock (eh->priv->hosts_hash_lock);
if (!host)
{
@@ -792,9 +761,7 @@ ephy_history_get_page (EphyHistory *eb,
{
EphyNode *node;
- g_static_rw_lock_reader_lock (eb->priv->pages_hash_lock);
node = g_hash_table_lookup (eb->priv->pages_hash, url);
- g_static_rw_lock_reader_unlock (eb->priv->pages_hash_lock);
return node;
}