ocarina/lib/plist.cpp

33 lines
557 B
C++

/*
* Copyright 2014 (c) Anna Schumaker.
*/
#include <lib/lib.h>
#include <lib/plist.h>
class PlaylistColumns : public Gtk::TreeModelColumnRecord {
public:
Gtk::TreeModelColumn<Glib::ustring> p_name;
PlaylistColumns()
{
add(p_name);
}
};
static PlaylistColumns p_cols;
static Glib::RefPtr<Gtk::ListStore> p_list;
void plist :: init()
{
p_list = lib :: get_object<Gtk::ListStore>("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];
}