aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-topics-palette.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bookmarks/ephy-topics-palette.c')
-rw-r--r--src/bookmarks/ephy-topics-palette.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/bookmarks/ephy-topics-palette.c b/src/bookmarks/ephy-topics-palette.c
index 91618699d..db1897656 100644
--- a/src/bookmarks/ephy-topics-palette.c
+++ b/src/bookmarks/ephy-topics-palette.c
@@ -255,18 +255,11 @@ update_list (EphyTopicsPalette *palette)
(gtk_tree_view_get_selection (GTK_TREE_VIEW (palette)));
}
-static gboolean
-update_list_idle (EphyTopicsPalette *palette)
-{
- update_list (palette);
- return FALSE;
-}
-
static void
tree_changed_cb (EphyBookmarks *bookmarks,
EphyTopicsPalette *palette)
{
- g_idle_add ((GSourceFunc) update_list_idle, palette);
+ update_list (palette);
}
static void
@@ -274,7 +267,7 @@ node_added_cb (EphyNode *parent,
EphyNode *child,
EphyTopicsPalette *palette)
{
- g_idle_add ((GSourceFunc) update_list_idle, palette);
+ update_list (palette);
}
static void
@@ -283,7 +276,7 @@ node_changed_cb (EphyNode *parent,
guint property_id,
EphyTopicsPalette *palette)
{
- g_idle_add ((GSourceFunc) update_list_idle, palette);
+ update_list (palette);
}
static void
@@ -292,7 +285,7 @@ node_removed_cb (EphyNode *parent,
guint index,
EphyTopicsPalette *palette)
{
- g_idle_add ((GSourceFunc) update_list_idle, palette);
+ update_list (palette);
}
static void
@@ -324,7 +317,7 @@ ephy_topics_palette_set_property (GObject *object,
break;
case PROP_MODE:
palette->priv->mode = g_value_get_int (value);
- update_list_idle (palette);
+ update_list (palette);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -366,6 +359,9 @@ toggled (GtkCellRendererToggle *cell_renderer,
gtk_tree_model_get (model, &iter, COLUMN_NODE, &topic, -1);
+ /* Need to protect against toggling separators. */
+ if (topic == NULL) return;
+
if (ephy_node_has_child (topic, palette->priv->bookmark))
{
ephy_bookmarks_unset_keyword (palette->priv->bookmarks,