/* called when unselecting the item or unloading the item list */ static void itemlist_check_for_deferred_action (void) { itemPtr item; if(itemlist->priv->selectedId) { gulong id = itemlist->priv->selectedId; itemlist_set_selected(NULL); /* check for removals caused by itemlist filter rule */ if(itemlist->priv->deferredFilter) { itemlist->priv->deferredFilter = FALSE; item = item_load(id); itemview_remove_item(item); ui_node_update(item->nodeId); } /* check for removals caused by vfolder rules */ if(itemlist->priv->deferredRemove) { itemlist->priv->deferredRemove = FALSE; item = item_load(id); itemlist_remove_item(item); } } }
void on_remove_item_activate (GtkMenuItem *menuitem, gpointer user_data) { itemPtr item; item = itemlist_get_selected (); if (item) { itemlist_remove_item (item); } else { liferea_shell_set_important_status_bar (_("No item has been selected")); } }