aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-topic-action.c
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 /src/bookmarks/ephy-topic-action.c
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 'src/bookmarks/ephy-topic-action.c')
-rw-r--r--src/bookmarks/ephy-topic-action.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/bookmarks/ephy-topic-action.c b/src/bookmarks/ephy-topic-action.c
index 448e7ffb6..1670c099f 100644
--- a/src/bookmarks/ephy-topic-action.c
+++ b/src/bookmarks/ephy-topic-action.c
@@ -130,7 +130,7 @@ menu_activate_cb (GtkWidget *item, EggAction *action)
EphyNode *node;
const char *location;
- node = EPHY_NODE (g_object_get_data (G_OBJECT (item), "node"));
+ node = g_object_get_data (G_OBJECT (item), "node");
location = ephy_node_get_property_string
(node, EPHY_NODE_BMK_PROP_LOCATION);
g_signal_emit (action, ephy_topic_action_signals[GO_LOCATION],
@@ -159,9 +159,6 @@ sort_bookmarks (gconstpointer a, gconstpointer b)
char *str_b = NULL;
int retval;
- g_return_val_if_fail (EPHY_IS_NODE (node_a), 1);
- g_return_val_if_fail (EPHY_IS_NODE (node_b), -1);
-
str_a = g_utf8_casefold (ephy_node_get_property_string (node_a, EPHY_NODE_BMK_PROP_TITLE),
-1);
str_b = g_utf8_casefold (ephy_node_get_property_string (node_b, EPHY_NODE_BMK_PROP_TITLE),
@@ -264,9 +261,6 @@ sort_topics (gconstpointer a, gconstpointer b)
char *str_b = NULL;
int retval;
- g_return_val_if_fail (EPHY_IS_NODE (node_a), 1);
- g_return_val_if_fail (EPHY_IS_NODE (node_b), -1);
-
priority_a = ephy_node_get_property_int (node_a, EPHY_NODE_KEYWORD_PROP_PRIORITY);
priority_b = ephy_node_get_property_int (node_b, EPHY_NODE_KEYWORD_PROP_PRIORITY);
@@ -366,21 +360,20 @@ static GtkWidget *
build_menu (EphyTopicAction *action)
{
EphyNode *node;
+ EphyBookmarks *bookmarks;
+ bookmarks = ephy_shell_get_bookmarks (ephy_shell);
if (action->priv->topic_id == BOOKMARKS_NODE_ID)
{
- EphyBookmarks *bookmarks;
-
LOG ("Build all bookmarks crap menu")
- bookmarks = ephy_shell_get_bookmarks (ephy_shell);
node = ephy_bookmarks_get_keywords (bookmarks);
return build_topics_menu (action, node);
}
else
{
- node = ephy_node_get_from_id (action->priv->topic_id);
+ node = ephy_bookmarks_get_from_id (bookmarks, action->priv->topic_id);
return build_bookmarks_menu (action, node);
}
}
@@ -546,9 +539,9 @@ ephy_topic_action_init (EphyTopicAction *action)
bookmarks = ephy_shell_get_bookmarks (ephy_shell);
node = ephy_bookmarks_get_keywords (bookmarks);
- g_signal_connect_object (node, "child_changed",
- G_CALLBACK (topic_child_changed_cb),
- action, 0);
+ ephy_node_signal_connect_object (node, EPHY_NODE_CHILD_CHANGED,
+ (EphyNodeCallback) topic_child_changed_cb,
+ G_OBJECT (action));
}
EggAction *
@@ -560,7 +553,7 @@ ephy_topic_action_new (const char *name, guint id)
bookmarks = ephy_shell_get_bookmarks (ephy_shell);
- bmk = ephy_node_get_from_id (id);
+ bmk = ephy_bookmarks_get_from_id (bookmarks, id);
g_return_val_if_fail (bmk != NULL, NULL);
action = EGG_ACTION (g_object_new (EPHY_TYPE_TOPIC_ACTION,