aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@src.gnome.org>2003-12-17 01:29:43 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-12-17 01:29:43 +0800
commit7a407a918297b8c54ee79174aac54bc84de97d29 (patch)
tree2b23c9bb51f5b388861697b0470652ec5a5e1e44 /lib
parent7339c460e72364aad2de893ab3c13549efc01d9b (diff)
downloadgsoc2013-epiphany-7a407a918297b8c54ee79174aac54bc84de97d29.tar
gsoc2013-epiphany-7a407a918297b8c54ee79174aac54bc84de97d29.tar.gz
gsoc2013-epiphany-7a407a918297b8c54ee79174aac54bc84de97d29.tar.bz2
gsoc2013-epiphany-7a407a918297b8c54ee79174aac54bc84de97d29.tar.lz
gsoc2013-epiphany-7a407a918297b8c54ee79174aac54bc84de97d29.tar.xz
gsoc2013-epiphany-7a407a918297b8c54ee79174aac54bc84de97d29.tar.zst
gsoc2013-epiphany-7a407a918297b8c54ee79174aac54bc84de97d29.zip
*** empty log message ***
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.am2
-rw-r--r--lib/ephy-node-db.c27
-rw-r--r--lib/ephy-node-filter.c2
-rw-r--r--lib/ephy-node.c247
-rw-r--r--lib/ephy-node.h4
-rw-r--r--lib/ephy-state.c1
-rw-r--r--lib/ephy-thread-helpers.c35
-rw-r--r--lib/ephy-thread-helpers.h34
-rw-r--r--lib/widgets/ephy-search-entry.c4
-rw-r--r--lib/widgets/ephy-tree-model-node.c2
10 files changed, 0 insertions, 358 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 10e1fa519..8e6ec93b2 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -32,7 +32,6 @@ NOINST_H_FILES = \
ephy-state.h \
ephy-string.h \
ephy-stock-icons.h \
- ephy-thread-helpers.h \
ephy-zoom.h
INST_H_FILES = \
@@ -63,7 +62,6 @@ libephymisc_la_SOURCES = \
ephy-state.c \
ephy-string.c \
ephy-stock-icons.c \
- ephy-thread-helpers.c \
ephy-zoom.c \
$(INST_H_FILES) \
$(NOINST_H_FILES)
diff --git a/lib/ephy-node-db.c b/lib/ephy-node-db.c
index 10276eaba..8c569485a 100644
--- a/lib/ephy-node-db.c
+++ b/lib/ephy-node-db.c
@@ -49,10 +49,8 @@ struct EphyNodeDbPrivate
{
char *name;
- GMutex *id_factory_lock;
long id_factory;
- GStaticRWLock *id_to_node_lock;
GPtrArray *id_to_node;
};
@@ -168,12 +166,8 @@ ephy_node_db_init (EphyNodeDb *db)
/* id to node */
db->priv->id_to_node = g_ptr_array_new ();
- db->priv->id_to_node_lock = g_new0 (GStaticRWLock, 1);
- g_static_rw_lock_init (db->priv->id_to_node_lock);
-
/* id factory */
db->priv->id_factory = RESERVED_IDS;
- db->priv->id_factory_lock = g_mutex_new ();
}
static void
@@ -189,10 +183,6 @@ ephy_node_db_finalize (GObject *object)
g_ptr_array_free (db->priv->id_to_node, FALSE);
- g_static_rw_lock_free (db->priv->id_to_node_lock);
-
- g_mutex_free (db->priv->id_factory_lock);
-
g_free (db->priv->name);
G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -244,12 +234,8 @@ ephy_node_db_get_node_from_id (EphyNodeDb *db, long id)
{
EphyNode *ret = NULL;
- g_static_rw_lock_reader_lock (db->priv->id_to_node_lock);
-
ret = node_from_id_real (db, id);
- g_static_rw_lock_reader_unlock (db->priv->id_to_node_lock);
-
return ret;
}
@@ -258,8 +244,6 @@ _ephy_node_db_new_id (EphyNodeDb *db)
{
long ret;
- g_mutex_lock (db->priv->id_factory_lock);
-
while (node_from_id_real (db, db->priv->id_factory) != NULL)
{
db->priv->id_factory++;
@@ -267,8 +251,6 @@ _ephy_node_db_new_id (EphyNodeDb *db)
ret = db->priv->id_factory;
- g_mutex_unlock (db->priv->id_factory_lock);
-
return ret;
}
@@ -277,29 +259,21 @@ _ephy_node_db_add_id (EphyNodeDb *db,
long id,
EphyNode *node)
{
- g_static_rw_lock_writer_lock (db->priv->id_to_node_lock);
-
/* resize array if needed */
if (id >= db->priv->id_to_node->len)
g_ptr_array_set_size (db->priv->id_to_node, id + 1);
g_ptr_array_index (db->priv->id_to_node, id) = node;
-
- g_static_rw_lock_writer_unlock (db->priv->id_to_node_lock);
}
void
_ephy_node_db_remove_id (EphyNodeDb *db,
long id)
{
- g_static_rw_lock_writer_lock (db->priv->id_to_node_lock);
-
g_ptr_array_index (db->priv->id_to_node, id) = NULL;
/* reset id factory so we use the freed node id */
db->priv->id_factory = RESERVED_IDS;
-
- g_static_rw_lock_writer_unlock (db->priv->id_to_node_lock);
}
gboolean
@@ -446,7 +420,6 @@ ephy_node_db_write_to_xml_valist (EphyNodeDb *db,
if (ret < 0) break;
}
}
- ephy_node_thaw (node);
if (ret < 0) break;
g_slist_free (exceptions);
diff --git a/lib/ephy-node-filter.c b/lib/ephy-node-filter.c
index 8af8d71a2..1625c6ecb 100644
--- a/lib/ephy-node-filter.c
+++ b/lib/ephy-node-filter.c
@@ -356,12 +356,10 @@ ephy_node_filter_expression_evaluate (EphyNodeFilterExpression *exp,
if (prop == exp->args.prop_args.second_arg.node)
{
- ephy_node_thaw (node);
return TRUE;
}
}
- ephy_node_thaw (node);
return FALSE;
}
case EPHY_NODE_FILTER_EXPRESSION_STRING_PROP_CONTAINS:
diff --git a/lib/ephy-node.c b/lib/ephy-node.c
index 35cbe6936..6194cb60f 100644
--- a/lib/ephy-node.c
+++ b/lib/ephy-node.c
@@ -34,7 +34,6 @@
#include "ephy-node.h"
#include "ephy-string.h"
-#include "ephy-thread-helpers.h"
typedef struct
{
@@ -53,8 +52,6 @@ typedef struct
struct EphyNode
{
- GStaticRWLock *lock;
-
int ref_count;
gulong id;
@@ -76,41 +73,6 @@ typedef struct
va_list valist;
} ENESCData;
-/* evillish hacks to temporarily readlock->writelock and v.v. */
-static inline void
-write_lock_to_read_lock (EphyNode *node)
-{
- g_static_mutex_lock (&node->lock->mutex);
- node->lock->read_counter++;
- g_static_mutex_unlock (&node->lock->mutex);
-
- g_static_rw_lock_writer_unlock (node->lock);
-}
-
-static inline void
-read_lock_to_write_lock (EphyNode *node)
-{
- g_static_mutex_lock (&node->lock->mutex);
- node->lock->read_counter--;
- g_static_mutex_unlock (&node->lock->mutex);
-
- g_static_rw_lock_writer_lock (node->lock);
-}
-
-static inline void
-lock_gdk (void)
-{
- if (ephy_thread_helpers_in_main_thread () == FALSE)
- GDK_THREADS_ENTER ();
-}
-
-static inline void
-unlock_gdk (void)
-{
- if (ephy_thread_helpers_in_main_thread () == FALSE)
- GDK_THREADS_LEAVE ();
-}
-
static gboolean
int_equal (gconstpointer a,
gconstpointer b)
@@ -208,9 +170,6 @@ ephy_node_finalize (EphyNode *node)
g_ptr_array_free (node->children, TRUE);
- g_static_rw_lock_free (node->lock);
- g_free (node->lock);
-
g_free (node);
}
@@ -241,22 +200,13 @@ real_remove_child (EphyNode *node,
borked_node = g_ptr_array_index (node->children, i);
- g_static_rw_lock_writer_lock (borked_node->lock);
borked_node_info = g_hash_table_lookup (borked_node->parents,
GINT_TO_POINTER (node->id));
borked_node_info->index--;
-
- g_static_rw_lock_writer_unlock (borked_node->lock);
}
- write_lock_to_read_lock (node);
- write_lock_to_read_lock (child);
-
ephy_node_emit_signal (node, EPHY_NODE_CHILD_REMOVED, child, old_index);
-
- read_lock_to_write_lock (node);
- read_lock_to_write_lock (child);
}
if (remove_from_child) {
@@ -270,11 +220,7 @@ remove_child (long id,
EphyNodeParent *node_info,
EphyNode *node)
{
- g_static_rw_lock_writer_lock (node_info->node->lock);
-
real_remove_child (node_info->node, node, TRUE, FALSE);
-
- g_static_rw_lock_writer_unlock (node_info->node->lock);
}
static void
@@ -302,14 +248,8 @@ ephy_node_dispose (EphyNode *node)
{
guint i;
- write_lock_to_read_lock (node);
-
ephy_node_emit_signal (node, EPHY_NODE_DESTROY);
- read_lock_to_write_lock (node);
-
- lock_gdk ();
-
/* remove from DAG */
g_hash_table_foreach (node->parents,
(GHFunc) remove_child,
@@ -320,22 +260,14 @@ ephy_node_dispose (EphyNode *node)
child = g_ptr_array_index (node->children, i);
- g_static_rw_lock_writer_lock (child->lock);
-
real_remove_child (node, child, FALSE, TRUE);
-
- g_static_rw_lock_writer_unlock (child->lock);
}
- g_static_rw_lock_writer_unlock (node->lock);
-
g_hash_table_foreach (node->signals,
(GHFunc) unref_signal_objects,
node);
_ephy_node_db_remove_id (node->db, node->id);
-
- unlock_gdk ();
}
EphyNode *
@@ -359,9 +291,6 @@ ephy_node_new_with_id (EphyNodeDb *db, gulong reserved_id)
node = g_new0 (EphyNode, 1);
- node->lock = g_new0 (GStaticRWLock, 1);
- g_static_rw_lock_init (node->lock);
-
node->ref_count = 0;
node->id = reserved_id;
@@ -403,12 +332,8 @@ ephy_node_get_id (EphyNode *node)
g_return_val_if_fail (EPHY_IS_NODE (node), -1);
- g_static_rw_lock_reader_lock (node->lock);
-
ret = node->id;
- g_static_rw_lock_reader_unlock (node->lock);
-
return ret;
}
@@ -417,11 +342,7 @@ ephy_node_ref (EphyNode *node)
{
g_return_if_fail (EPHY_IS_NODE (node));
- g_static_rw_lock_writer_lock (node->lock);
-
node->ref_count++;
-
- g_static_rw_lock_writer_unlock (node->lock);
}
void
@@ -429,44 +350,20 @@ ephy_node_unref (EphyNode *node)
{
g_return_if_fail (EPHY_IS_NODE (node));
- g_static_rw_lock_writer_lock (node->lock);
-
node->ref_count--;
if (node->ref_count <= 0) {
ephy_node_dispose (node);
ephy_node_finalize (node);
- } else {
- g_static_rw_lock_writer_unlock (node->lock);
}
}
-void
-ephy_node_freeze (EphyNode *node)
-{
- g_return_if_fail (EPHY_IS_NODE (node));
-
- g_static_rw_lock_reader_lock (node->lock);
-}
-
-void
-ephy_node_thaw (EphyNode *node)
-{
- g_return_if_fail (EPHY_IS_NODE (node));
-
- g_static_rw_lock_reader_unlock (node->lock);
-}
-
static void
child_changed (gulong id,
EphyNodeParent *node_info,
EphyNode *node)
{
- g_static_rw_lock_reader_lock (node_info->node->lock);
-
ephy_node_emit_signal (node_info->node, EPHY_NODE_CHILD_CHANGED, node);
-
- g_static_rw_lock_reader_unlock (node_info->node->lock);
}
static inline void
@@ -500,25 +397,15 @@ ephy_node_set_property (EphyNode *node,
g_return_if_fail (property_id >= 0);
g_return_if_fail (value != NULL);
- lock_gdk ();
-
- g_static_rw_lock_writer_lock (node->lock);
-
new = g_new0 (GValue, 1);
g_value_init (new, G_VALUE_TYPE (value));
g_value_copy (value, new);
real_set_property (node, property_id, new);
- write_lock_to_read_lock (node);
-
g_hash_table_foreach (node->parents,
(GHFunc) child_changed,
node);
-
- g_static_rw_lock_reader_unlock (node->lock);
-
- unlock_gdk ();
}
gboolean
@@ -532,24 +419,18 @@ ephy_node_get_property (EphyNode *node,
g_return_val_if_fail (property_id >= 0, FALSE);
g_return_val_if_fail (value != NULL, FALSE);
- g_static_rw_lock_reader_lock (node->lock);
-
if (property_id >= node->properties->len) {
- g_static_rw_lock_reader_unlock (node->lock);
return FALSE;
}
ret = g_ptr_array_index (node->properties, property_id);
if (ret == NULL) {
- g_static_rw_lock_reader_unlock (node->lock);
return FALSE;
}
g_value_init (value, G_VALUE_TYPE (ret));
g_value_copy (ret, value);
- g_static_rw_lock_reader_unlock (node->lock);
-
return TRUE;
}
@@ -563,23 +444,17 @@ ephy_node_get_property_string (EphyNode *node,
g_return_val_if_fail (EPHY_IS_NODE (node), NULL);
g_return_val_if_fail (property_id >= 0, NULL);
- g_static_rw_lock_reader_lock (node->lock);
-
if (property_id >= node->properties->len) {
- g_static_rw_lock_reader_unlock (node->lock);
return NULL;
}
ret = g_ptr_array_index (node->properties, property_id);
if (ret == NULL) {
- g_static_rw_lock_reader_unlock (node->lock);
return NULL;
}
retval = g_value_get_string (ret);
- g_static_rw_lock_reader_unlock (node->lock);
-
return retval;
}
@@ -593,23 +468,17 @@ ephy_node_get_property_boolean (EphyNode *node,
g_return_val_if_fail (EPHY_IS_NODE (node), FALSE);
g_return_val_if_fail (property_id >= 0, FALSE);
- g_static_rw_lock_reader_lock (node->lock);
-
if (property_id >= node->properties->len) {
- g_static_rw_lock_reader_unlock (node->lock);
return FALSE;
}
ret = g_ptr_array_index (node->properties, property_id);
if (ret == NULL) {
- g_static_rw_lock_reader_unlock (node->lock);
return FALSE;
}
retval = g_value_get_boolean (ret);
- g_static_rw_lock_reader_unlock (node->lock);
-
return retval;
}
@@ -623,23 +492,17 @@ ephy_node_get_property_long (EphyNode *node,
g_return_val_if_fail (EPHY_IS_NODE (node), -1);
g_return_val_if_fail (property_id >= 0, -1);
- g_static_rw_lock_reader_lock (node->lock);
-
if (property_id >= node->properties->len) {
- g_static_rw_lock_reader_unlock (node->lock);
return -1;
}
ret = g_ptr_array_index (node->properties, property_id);
if (ret == NULL) {
- g_static_rw_lock_reader_unlock (node->lock);
return -1;
}
retval = g_value_get_long (ret);
- g_static_rw_lock_reader_unlock (node->lock);
-
return retval;
}
@@ -653,23 +516,17 @@ ephy_node_get_property_int (EphyNode *node,
g_return_val_if_fail (EPHY_IS_NODE (node), -1);
g_return_val_if_fail (property_id >= 0, -1);
- g_static_rw_lock_reader_lock (node->lock);
-
if (property_id >= node->properties->len) {
- g_static_rw_lock_reader_unlock (node->lock);
return -1;
}
ret = g_ptr_array_index (node->properties, property_id);
if (ret == NULL) {
- g_static_rw_lock_reader_unlock (node->lock);
return -1;
}
retval = g_value_get_int (ret);
- g_static_rw_lock_reader_unlock (node->lock);
-
return retval;
}
@@ -683,23 +540,17 @@ ephy_node_get_property_double (EphyNode *node,
g_return_val_if_fail (EPHY_IS_NODE (node), -1);
g_return_val_if_fail (property_id >= 0, -1);
- g_static_rw_lock_reader_lock (node->lock);
-
if (property_id >= node->properties->len) {
- g_static_rw_lock_reader_unlock (node->lock);
return -1;
}
ret = g_ptr_array_index (node->properties, property_id);
if (ret == NULL) {
- g_static_rw_lock_reader_unlock (node->lock);
return -1;
}
retval = g_value_get_double (ret);
- g_static_rw_lock_reader_unlock (node->lock);
-
return retval;
}
@@ -713,23 +564,17 @@ ephy_node_get_property_float (EphyNode *node,
g_return_val_if_fail (EPHY_IS_NODE (node), -1);
g_return_val_if_fail (property_id >= 0, -1);
- g_static_rw_lock_reader_lock (node->lock);
-
if (property_id >= node->properties->len) {
- g_static_rw_lock_reader_unlock (node->lock);
return -1;
}
ret = g_ptr_array_index (node->properties, property_id);
if (ret == NULL) {
- g_static_rw_lock_reader_unlock (node->lock);
return -1;
}
retval = g_value_get_float (ret);
- g_static_rw_lock_reader_unlock (node->lock);
-
return retval;
}
@@ -743,23 +588,17 @@ ephy_node_get_property_node (EphyNode *node,
g_return_val_if_fail (EPHY_IS_NODE (node), NULL);
g_return_val_if_fail (property_id >= 0, NULL);
- g_static_rw_lock_reader_lock (node->lock);
-
if (property_id >= node->properties->len) {
- g_static_rw_lock_reader_unlock (node->lock);
return NULL;
}
ret = g_ptr_array_index (node->properties, property_id);
if (ret == NULL) {
- g_static_rw_lock_reader_unlock (node->lock);
return NULL;
}
retval = g_value_get_pointer (ret);
- g_static_rw_lock_reader_unlock (node->lock);
-
return retval;
}
@@ -784,10 +623,8 @@ write_parent (gulong id,
data->ret = xmlTextWriterStartElement (writer, "parent");
if (data->ret < 0) return;
- g_static_rw_lock_reader_lock (node_info->node->lock);
data->ret = xmlTextWriterWriteFormatAttribute
(writer, "id", "%ld", node_info->node->id);
- g_static_rw_lock_reader_unlock (node_info->node->lock);
if (data->ret < 0) return;
data->ret = xmlTextWriterEndElement (writer); /* parent */
@@ -806,8 +643,6 @@ ephy_node_write_to_xml(EphyNode *node,
g_return_val_if_fail (EPHY_IS_NODE (node), -1);
g_return_val_if_fail (writer != NULL, -1);
- g_static_rw_lock_reader_lock (node->lock);
-
/* start writing the node */
ret = xmlTextWriterStartElement (writer, "node");
if (ret < 0) goto out;
@@ -888,8 +723,6 @@ ephy_node_write_to_xml(EphyNode *node,
if (ret < 0) goto out;
out:
- g_static_rw_lock_reader_unlock (node->lock);
-
return ret >= 0 ? 0 : -1;
}
@@ -915,9 +748,6 @@ real_add_child (EphyNode *node,
node_info);
}
-/* this function assumes it's safe to not lock anything while loading,
- * this is at least true for the case where we're loading the library xml file
- * from the main loop */
EphyNode *
ephy_node_new_from_xml (EphyNodeDb *db, xmlNodePtr xml_node)
{
@@ -1021,43 +851,20 @@ void
ephy_node_add_child (EphyNode *node,
EphyNode *child)
{
- lock_gdk ();
-
g_return_if_fail (EPHY_IS_NODE (node));
- g_static_rw_lock_writer_lock (node->lock);
- g_static_rw_lock_writer_lock (child->lock);
-
real_add_child (node, child);
- write_lock_to_read_lock (node);
- write_lock_to_read_lock (child);
-
ephy_node_emit_signal (node, EPHY_NODE_CHILD_ADDED, child);
-
- g_static_rw_lock_reader_unlock (node->lock);
- g_static_rw_lock_reader_unlock (child->lock);
-
- unlock_gdk ();
}
void
ephy_node_remove_child (EphyNode *node,
EphyNode *child)
{
- lock_gdk ();
-
g_return_if_fail (EPHY_IS_NODE (node));
- g_static_rw_lock_writer_lock (node->lock);
- g_static_rw_lock_writer_lock (child->lock);
-
real_remove_child (node, child, TRUE, TRUE);
-
- g_static_rw_lock_writer_unlock (node->lock);
- g_static_rw_lock_writer_unlock (child->lock);
-
- unlock_gdk ();
}
gboolean
@@ -1068,15 +875,9 @@ ephy_node_has_child (EphyNode *node,
g_return_val_if_fail (EPHY_IS_NODE (node), FALSE);
- g_static_rw_lock_reader_lock (node->lock);
- g_static_rw_lock_reader_lock (child->lock);
-
ret = (g_hash_table_lookup (child->parents,
GINT_TO_POINTER (node->id)) != NULL);
- g_static_rw_lock_reader_unlock (node->lock);
- g_static_rw_lock_reader_unlock (child->lock);
-
return ret;
}
@@ -1108,10 +909,6 @@ ephy_node_sort_children (EphyNode *node,
g_return_if_fail (EPHY_IS_NODE (node));
g_return_if_fail (compare_func != NULL);
- lock_gdk ();
-
- g_static_rw_lock_writer_lock (node->lock);
-
newkids = g_ptr_array_new ();
g_ptr_array_set_size (newkids, node->children->len);
@@ -1141,15 +938,9 @@ ephy_node_sort_children (EphyNode *node,
g_ptr_array_free (node->children, FALSE);
node->children = newkids;
- write_lock_to_read_lock (node);
-
ephy_node_emit_signal (node, EPHY_NODE_CHILDREN_REORDERED, new_order);
g_free (new_order);
-
- g_static_rw_lock_reader_unlock (node->lock);
-
- unlock_gdk ();
}
void
@@ -1162,10 +953,6 @@ ephy_node_reorder_children (EphyNode *node,
g_return_if_fail (EPHY_IS_NODE (node));
g_return_if_fail (new_order != NULL);
- lock_gdk ();
-
- g_static_rw_lock_writer_lock (node->lock);
-
newkids = g_ptr_array_new ();
g_ptr_array_set_size (newkids, node->children->len);
@@ -1185,13 +972,7 @@ ephy_node_reorder_children (EphyNode *node,
g_ptr_array_free (node->children, FALSE);
node->children = newkids;
- write_lock_to_read_lock (node);
-
ephy_node_emit_signal (node, EPHY_NODE_CHILDREN_REORDERED, new_order);
-
- g_static_rw_lock_reader_unlock (node->lock);
-
- unlock_gdk ();
}
GPtrArray *
@@ -1199,8 +980,6 @@ ephy_node_get_children (EphyNode *node)
{
g_return_val_if_fail (EPHY_IS_NODE (node), NULL);
- g_static_rw_lock_reader_lock (node->lock);
-
return node->children;
}
@@ -1211,12 +990,8 @@ ephy_node_get_n_children (EphyNode *node)
g_return_val_if_fail (EPHY_IS_NODE (node), -1);
- g_static_rw_lock_reader_lock (node->lock);
-
ret = node->children->len;
- g_static_rw_lock_reader_unlock (node->lock);
-
return ret;
}
@@ -1229,16 +1004,12 @@ ephy_node_get_nth_child (EphyNode *node,
g_return_val_if_fail (EPHY_IS_NODE (node), NULL);
g_return_val_if_fail (n >= 0, NULL);
- g_static_rw_lock_reader_lock (node->lock);
-
if (n < node->children->len) {
ret = g_ptr_array_index (node->children, n);
} else {
ret = NULL;
}
- g_static_rw_lock_reader_unlock (node->lock);
-
return ret;
}
@@ -1267,14 +1038,8 @@ ephy_node_get_child_index (EphyNode *node,
g_return_val_if_fail (EPHY_IS_NODE (node), -1);
g_return_val_if_fail (EPHY_IS_NODE (child), -1);
- g_static_rw_lock_reader_lock (node->lock);
- g_static_rw_lock_reader_lock (child->lock);
-
ret = ephy_node_real_get_child_index (node, child);
- g_static_rw_lock_reader_unlock (node->lock);
- g_static_rw_lock_reader_unlock (child->lock);
-
return ret;
}
@@ -1288,9 +1053,6 @@ ephy_node_get_next_child (EphyNode *node,
g_return_val_if_fail (EPHY_IS_NODE (node), NULL);
g_return_val_if_fail (EPHY_IS_NODE (child), NULL);
- g_static_rw_lock_reader_lock (node->lock);
- g_static_rw_lock_reader_lock (child->lock);
-
idx = get_child_index_real (node, child);
if ((idx + 1) < node->children->len) {
@@ -1299,9 +1061,6 @@ ephy_node_get_next_child (EphyNode *node,
ret = NULL;
}
- g_static_rw_lock_reader_unlock (node->lock);
- g_static_rw_lock_reader_unlock (child->lock);
-
return ret;
}
@@ -1315,9 +1074,6 @@ ephy_node_get_previous_child (EphyNode *node,
g_return_val_if_fail (EPHY_IS_NODE (node), NULL);
g_return_val_if_fail (EPHY_IS_NODE (child), NULL);
- g_static_rw_lock_reader_lock (node->lock);
- g_static_rw_lock_reader_lock (child->lock);
-
idx = get_child_index_real (node, child);
if ((idx - 1) >= 0) {
@@ -1326,9 +1082,6 @@ ephy_node_get_previous_child (EphyNode *node,
ret = NULL;
}
- g_static_rw_lock_reader_unlock (node->lock);
- g_static_rw_lock_reader_unlock (child->lock);
-
return ret;
}
diff --git a/lib/ephy-node.h b/lib/ephy-node.h
index 50c5ab1bc..0e664bed4 100644
--- a/lib/ephy-node.h
+++ b/lib/ephy-node.h
@@ -62,10 +62,6 @@ long ephy_node_get_id (EphyNode *node);
void ephy_node_ref (EphyNode *node);
void ephy_node_unref (EphyNode *node);
-/* locking */
-void ephy_node_freeze (EphyNode *node);
-void ephy_node_thaw (EphyNode *node);
-
/* signals */
int ephy_node_signal_connect_object (EphyNode *node,
EphyNodeSignalType type,
diff --git a/lib/ephy-state.c b/lib/ephy-state.c
index f106ed565..476b6ab4d 100644
--- a/lib/ephy-state.c
+++ b/lib/ephy-state.c
@@ -91,7 +91,6 @@ find_by_name (const char *name)
result = kid;
}
}
- ephy_node_thaw (states);
return result;
}
diff --git a/lib/ephy-thread-helpers.c b/lib/ephy-thread-helpers.c
deleted file mode 100644
index 720358968..000000000
--- a/lib/ephy-thread-helpers.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2002 Jorn Baayen
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id$
- */
-
-#include "ephy-thread-helpers.h"
-
-static GThread *main_thread = NULL;
-
-void
-ephy_thread_helpers_init (void)
-{
- main_thread = g_thread_self ();
-}
-
-gboolean
-ephy_thread_helpers_in_main_thread (void)
-{
- return (main_thread == g_thread_self ());
-}
diff --git a/lib/ephy-thread-helpers.h b/lib/ephy-thread-helpers.h
deleted file mode 100644
index 2b23156a3..000000000
--- a/lib/ephy-thread-helpers.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2002 Jorn Baayen
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id$
- */
-
-#include <glib/gthread.h>
-
-#ifndef EPHY_THREAD_HELPERS_H
-#define EPHY_THREAD_HELPERS_H
-
-G_BEGIN_DECLS
-
-void ephy_thread_helpers_init (void);
-
-gboolean ephy_thread_helpers_in_main_thread (void);
-
-G_END_DECLS
-
-#endif /* EPHY_THREAD_HELPERS_H */
diff --git a/lib/widgets/ephy-search-entry.c b/lib/widgets/ephy-search-entry.c
index e6fa93a92..afa3d68ca 100644
--- a/lib/widgets/ephy-search-entry.c
+++ b/lib/widgets/ephy-search-entry.c
@@ -100,14 +100,10 @@ ephy_search_entry_class_init (EphySearchEntryClass *klass)
static gboolean
ephy_search_entry_timeout_cb (EphySearchEntry *entry)
{
- gdk_threads_enter ();
-
g_signal_emit (G_OBJECT (entry), ephy_search_entry_signals[SEARCH], 0,
gtk_entry_get_text (GTK_ENTRY (entry)));
entry->priv->timeout = 0;
- gdk_threads_leave ();
-
return FALSE;
}
diff --git a/lib/widgets/ephy-tree-model-node.c b/lib/widgets/ephy-tree-model-node.c
index e8b8b45b8..1af1dd869 100644
--- a/lib/widgets/ephy-tree-model-node.c
+++ b/lib/widgets/ephy-tree-model-node.c
@@ -216,8 +216,6 @@ filter_changed_cb (EphyNodeFilter *filter,
g_ptr_array_index (kids, i),
i);
}
-
- ephy_node_thaw (model->priv->root);
}
static void