Пример #1
0
static gboolean
feed_list_view_filter_visible_function (GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
{
	gint			count;
	nodePtr			node;

	if (!flv->feedlist_reduced_unread)
		return TRUE;

	gtk_tree_model_get (model, iter, FS_PTR, &node, FS_UNREAD, &count, -1);
	if (!node)
		return FALSE;

	if (IS_FOLDER (node) || IS_NODE_SOURCE (node))
		return FALSE;

	if (IS_VFOLDER (node))
		return TRUE;

	/* Do not hide in any case if the node is selected, otherwise
	   the last unread item of a feed causes the feed to vanish
	   when clicking it */
	if (feedlist_get_selected () == node)
		return TRUE;

	if (count > 0)
		return TRUE;

	return FALSE;
}
Пример #2
0
static void
feed_list_node_load_feedlist (nodePtr node)
{
	GSList		*iter;
	
	iter = node->children;
	while (iter) {
		node = (nodePtr)iter->data;
		feed_list_node_add (node);
		
		if (IS_FOLDER (node) || IS_NODE_SOURCE (node))
			feed_list_node_load_feedlist (node);

		iter = g_slist_next(iter);
	}
}