/* * Copyright 2014 (c) Anna Schumaker. */ #include #include #include class PlaylistColumns : public Gtk::TreeModelColumnRecord { public: Gtk::TreeModelColumn p_name; PlaylistColumns() { add(p_name); } }; static PlaylistColumns p_cols; static Glib::RefPtr p_list; void plist :: init() { p_list = lib :: get_object("plist_list"); } Glib::ustring plist :: get_path(const Gtk::TreePath &path) { Gtk::TreeModel::Row row = *(p_list->get_iter(path)); return row[p_cols.p_name]; } void plist :: select_path(const Gtk::TreePath &path) { playlist :: select(get_path(path)); } void plist :: del_path_ids(const Gtk::TreePath &path, std::vector &ids) { std::string name = plist :: get_path(path); for (unsigned int i = 0; i < ids.size(); i++) playlist :: del(tags :: get_track(ids[i]), name); }