aboutsummaryrefslogtreecommitdiffstats
path: root/lib/widgets
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-05-20 01:25:12 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-05-20 01:25:12 +0800
commitcc8f3060b3c57453f2128a573391add2a0bb47d4 (patch)
treea2f1965dfbadb7e8d0de464575abdf02ba6c3641 /lib/widgets
parentf9f7a48a13d9e876cb641af773a2eb88a4a0aaf6 (diff)
downloadgsoc2013-epiphany-cc8f3060b3c57453f2128a573391add2a0bb47d4.tar
gsoc2013-epiphany-cc8f3060b3c57453f2128a573391add2a0bb47d4.tar.gz
gsoc2013-epiphany-cc8f3060b3c57453f2128a573391add2a0bb47d4.tar.bz2
gsoc2013-epiphany-cc8f3060b3c57453f2128a573391add2a0bb47d4.tar.lz
gsoc2013-epiphany-cc8f3060b3c57453f2128a573391add2a0bb47d4.tar.xz
gsoc2013-epiphany-cc8f3060b3c57453f2128a573391add2a0bb47d4.tar.zst
gsoc2013-epiphany-cc8f3060b3c57453f2128a573391add2a0bb47d4.zip
2003-05-19 Marco Pesenti Gritti <marco@it.gnome.org>
* lib/Makefile.am: * lib/ephy-dnd.c: (ephy_dnd_node_list_extract_nodes): * lib/ephy-node.c: (write_lock_to_read_lock), (read_lock_to_write_lock), (lock_gdk), (unlock_gdk), (callback), (ephy_node_emit_signal), (ephy_node_finalize), (real_remove_child), (remove_child), (signal_object_weak_notify), (unref_signal_objects), (ephy_node_dispose), (ephy_node_new), (ephy_node_new_with_id), (ephy_node_get_id), (ephy_node_ref), (ephy_node_unref), (ephy_node_freeze), (ephy_node_thaw), (child_changed), (real_set_property), (ephy_node_set_property), (ephy_node_get_property), (ephy_node_get_property_string), (ephy_node_get_property_boolean), (ephy_node_get_property_long), (ephy_node_get_property_int), (ephy_node_get_property_double), (ephy_node_get_property_float), (ephy_node_get_property_node), (save_parent), (ephy_node_save_to_xml), (real_add_child), (ephy_node_new_from_xml), (ephy_node_add_child), (ephy_node_remove_child), (ephy_node_has_child), (ephy_node_real_get_child_index), (ephy_node_sort_children), (ephy_node_reorder_children), (ephy_node_get_children), (ephy_node_get_n_children), (ephy_node_get_nth_child), (get_child_index_real), (ephy_node_get_child_index), (ephy_node_get_next_child), (ephy_node_get_previous_child), (ephy_node_signal_connect_object), (ephy_node_signal_disconnect): * lib/ephy-node.h: * lib/ephy-state.c: (ephy_states_load), (ensure_states), (ephy_state_add_window), (ephy_state_add_paned), (ephy_state_save): * lib/widgets/ephy-node-view.c: (ephy_node_view_class_init), (ephy_node_view_selection_changed_cb), (ephy_node_view_set_property), (ephy_node_view_get_property), (ephy_node_view_remove): * lib/widgets/ephy-tree-model-node.c: (ephy_tree_model_node_class_init), (ephy_tree_model_node_set_property), (ephy_tree_model_node_get_property), (ephy_tree_model_node_get_value), (ephy_tree_model_node_get_path), (ephy_tree_model_node_iter_next), (ephy_tree_model_node_node_from_iter): * src/bookmarks/ephy-bookmark-action.c: (ephy_bookmark_action_init), (ephy_bookmark_action_new): * src/bookmarks/ephy-bookmark-properties.c: (ephy_bookmark_properties_class_init), (ephy_bookmark_properties_set_property): * src/bookmarks/ephy-bookmarks-editor.c: (cmd_show_in_bookmarks_bar), (cmd_open_bookmarks_in_tabs), (cmd_open_bookmarks_in_browser), (cmd_delete), (cmd_bookmark_properties), (cmd_copy), (ephy_bookmarks_editor_node_activated_cb), (ephy_bookmarks_editor_update_menu),
Diffstat (limited to 'lib/widgets')
-rw-r--r--lib/widgets/ephy-node-view.c31
-rw-r--r--lib/widgets/ephy-tree-model-node.c63
2 files changed, 43 insertions, 51 deletions
diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c
index b1c4e003b..f42ef9955 100644
--- a/lib/widgets/ephy-node-view.c
+++ b/lib/widgets/ephy-node-view.c
@@ -132,11 +132,10 @@ ephy_node_view_class_init (EphyNodeViewClass *klass)
g_object_class_install_property (object_class,
PROP_ROOT,
- g_param_spec_object ("root",
- "Root node",
- "Root node",
- EPHY_TYPE_NODE,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ g_param_spec_pointer ("root",
+ "Root node",
+ "Root node",
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (object_class,
PROP_FILTER,
g_param_spec_object ("filter",
@@ -151,30 +150,30 @@ ephy_node_view_class_init (EphyNodeViewClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (EphyNodeViewClass, node_activated),
NULL, NULL,
- g_cclosure_marshal_VOID__OBJECT,
+ g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE,
1,
- EPHY_TYPE_NODE);
+ G_TYPE_POINTER);
ephy_node_view_signals[NODE_SELECTED] =
g_signal_new ("node_selected",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (EphyNodeViewClass, node_selected),
NULL, NULL,
- g_cclosure_marshal_VOID__OBJECT,
+ g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE,
1,
- EPHY_TYPE_NODE);
+ G_TYPE_POINTER);
ephy_node_view_signals[NODE_DROPPED] =
g_signal_new ("node_dropped",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (EphyNodeViewClass, node_dropped),
NULL, NULL,
- ephy_marshal_VOID__OBJECT_POINTER,
+ ephy_marshal_VOID__POINTER_POINTER,
G_TYPE_NONE,
2,
- EPHY_TYPE_NODE,
+ G_TYPE_POINTER,
G_TYPE_POINTER);
ephy_node_view_signals[SHOW_POPUP] =
g_signal_new ("show_popup",
@@ -388,7 +387,7 @@ ephy_node_view_selection_changed_cb (GtkTreeSelection *selection,
list = ephy_node_view_get_selection (view);
if (list)
{
- node = EPHY_NODE (list->data);
+ node = list->data;
}
g_list_free (list);
@@ -482,7 +481,7 @@ ephy_node_view_set_property (GObject *object,
switch (prop_id)
{
case PROP_ROOT:
- view->priv->root = g_value_get_object (value);
+ view->priv->root = g_value_get_pointer (value);
break;
case PROP_FILTER:
view->priv->filter = g_value_get_object (value);
@@ -513,7 +512,7 @@ ephy_node_view_get_property (GObject *object,
switch (prop_id)
{
case PROP_ROOT:
- g_value_set_object (value, view->priv->root);
+ g_value_set_pointer (value, view->priv->root);
break;
case PROP_FILTER:
g_value_set_object (value, view->priv->filter);
@@ -914,7 +913,7 @@ ephy_node_view_remove (EphyNodeView *view)
list = ephy_node_view_get_selection (view);
g_return_if_fail (list != NULL);
- node = EPHY_NODE ((g_list_last (list))->data);
+ node = g_list_last (list)->data;
ephy_tree_model_node_iter_from_node (EPHY_TREE_MODEL_NODE (view->priv->nodemodel),
node, &iter);
egg_tree_model_filter_convert_child_iter_to_iter (EGG_TREE_MODEL_FILTER (view->priv->filtermodel),
@@ -941,7 +940,7 @@ ephy_node_view_remove (EphyNodeView *view)
for (; list != NULL; list = list->next)
{
- ephy_node_unref (EPHY_NODE (list->data));
+ ephy_node_unref (list->data);
}
g_list_free (list);
diff --git a/lib/widgets/ephy-tree-model-node.c b/lib/widgets/ephy-tree-model-node.c
index ebeb17fd3..73c654712 100644
--- a/lib/widgets/ephy-tree-model-node.c
+++ b/lib/widgets/ephy-tree-model-node.c
@@ -164,10 +164,9 @@ ephy_tree_model_node_class_init (EphyTreeModelNodeClass *klass)
g_object_class_install_property (object_class,
PROP_ROOT,
- g_param_spec_object ("root",
+ g_param_spec_pointer ("root",
"Root node",
"Root node",
- EPHY_TYPE_NODE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (object_class,
PROP_FILTER,
@@ -248,33 +247,28 @@ ephy_tree_model_node_set_property (GObject *object,
switch (prop_id)
{
case PROP_ROOT:
- model->priv->root = g_value_get_object (value);
-
- g_signal_connect_object (G_OBJECT (model->priv->root),
- "child_added",
- G_CALLBACK (root_child_added_cb),
- G_OBJECT (model),
- 0);
- g_signal_connect_object (G_OBJECT (model->priv->root),
- "child_removed",
- G_CALLBACK (root_child_removed_cb),
- G_OBJECT (model),
- 0);
- g_signal_connect_object (G_OBJECT (model->priv->root),
- "child_changed",
- G_CALLBACK (root_child_changed_cb),
- G_OBJECT (model),
- 0);
- g_signal_connect_object (G_OBJECT (model->priv->root),
- "children_reordered",
- G_CALLBACK (root_children_reordered_cb),
- G_OBJECT (model),
- 0);
- g_signal_connect_object (G_OBJECT (model->priv->root),
- "destroyed",
- G_CALLBACK (root_destroyed_cb),
- G_OBJECT (model),
- 0);
+ model->priv->root = g_value_get_pointer (value);
+
+ ephy_node_signal_connect_object (model->priv->root,
+ EPHY_NODE_CHILD_ADDED,
+ (EphyNodeCallback) root_child_added_cb,
+ G_OBJECT (model));
+ ephy_node_signal_connect_object (model->priv->root,
+ EPHY_NODE_CHILD_REMOVED,
+ (EphyNodeCallback) root_child_removed_cb,
+ G_OBJECT (model));
+ ephy_node_signal_connect_object (model->priv->root,
+ EPHY_NODE_CHILD_CHANGED,
+ (EphyNodeCallback) root_child_changed_cb,
+ G_OBJECT (model));
+ ephy_node_signal_connect_object (model->priv->root,
+ EPHY_NODE_CHILDREN_REORDERED,
+ (EphyNodeCallback) root_children_reordered_cb,
+ G_OBJECT (model));
+ ephy_node_signal_connect_object (model->priv->root,
+ EPHY_NODE_DESTROYED,
+ (EphyNodeCallback) root_destroyed_cb,
+ G_OBJECT (model));
break;
case PROP_FILTER:
@@ -306,7 +300,7 @@ ephy_tree_model_node_get_property (GObject *object,
switch (prop_id)
{
case PROP_ROOT:
- g_value_set_object (value, model->priv->root);
+ g_value_set_pointer (value, model->priv->root);
break;
case PROP_FILTER:
g_value_set_object (value, model->priv->filter);
@@ -411,12 +405,11 @@ ephy_tree_model_node_get_value (GtkTreeModel *tree_model,
g_return_if_fail (EPHY_IS_TREE_MODEL_NODE (tree_model));
g_return_if_fail (iter != NULL);
g_return_if_fail (iter->stamp == model->stamp);
- g_return_if_fail (EPHY_IS_NODE (iter->user_data));
if (model->priv->root == NULL)
return;
- node = EPHY_NODE (iter->user_data);
+ node = iter->user_data;
if (column == EPHY_TREE_MODEL_NODE_COL_VISIBLE)
{
@@ -530,7 +523,7 @@ ephy_tree_model_node_get_path (GtkTreeModel *tree_model,
if (model->priv->root == NULL)
return NULL;
- node = EPHY_NODE (iter->user_data);
+ node = iter->user_data;
if (node == model->priv->root)
return gtk_tree_path_new ();
@@ -552,7 +545,7 @@ ephy_tree_model_node_iter_next (GtkTreeModel *tree_model,
if (model->priv->root == NULL)
return FALSE;
- node = EPHY_NODE (iter->user_data);
+ node = iter->user_data;
if (node == model->priv->root)
return FALSE;
@@ -648,7 +641,7 @@ EphyNode *
ephy_tree_model_node_node_from_iter (EphyTreeModelNode *model,
GtkTreeIter *iter)
{
- return EPHY_NODE (iter->user_data);
+ return iter->user_data;
}
void