/* * First clears the effectlist_store, then appends all effects from the effectlist. */ void LivePathEffectEditor::effect_list_reload(SPLPEItem *lpeitem) { effectlist_store->clear(); PathEffectList effectlist = sp_lpe_item_get_effect_list(lpeitem); PathEffectList::iterator it; for( it = effectlist.begin() ; it!=effectlist.end(); it++ ) { if ( !(*it)->lpeobject ) { continue; } if ((*it)->lpeobject->get_lpe()) { Gtk::TreeModel::Row row = *(effectlist_store->append()); row[columns.col_name] = (*it)->lpeobject->get_lpe()->getName(); row[columns.lperef] = *it; row[columns.col_visible] = (*it)->lpeobject->get_lpe()->isVisible(); } else { Gtk::TreeModel::Row row = *(effectlist_store->append()); row[columns.col_name] = _("Unknown effect"); row[columns.lperef] = *it; row[columns.col_visible] = false; } } }
static gchar * sp_path_description(SPItem * item) { int count = SP_PATH(item)->nodesInPath(); if (SP_IS_LPE_ITEM(item) && sp_lpe_item_has_path_effect(SP_LPE_ITEM(item))) { Glib::ustring s; PathEffectList effect_list = sp_lpe_item_get_effect_list(SP_LPE_ITEM(item)); for (PathEffectList::iterator it = effect_list.begin(); it != effect_list.end(); ++it) { LivePathEffectObject *lpeobj = (*it)->lpeobject; if (!lpeobj || !lpeobj->get_lpe()) break; if (s.empty()) s = lpeobj->get_lpe()->getName(); else s = s + ", " + lpeobj->get_lpe()->getName(); } return g_strdup_printf(ngettext("<b>Path</b> (%i node, path effect: %s)", "<b>Path</b> (%i nodes, path effect: %s)",count), count, s.c_str()); } else { return g_strdup_printf(ngettext("<b>Path</b> (%i node)", "<b>Path</b> (%i nodes)",count), count); } }