2 #include "common/common.hpp"
3 #include "nlohmann/json_fwd.hpp"
4 #include "pool/pool.hpp"
5 #include "pool/pool_cached.hpp"
6 #include "util/uuid.hpp"
16 PoolCacheWindow(BaseObjectType *cobject,
const Glib::RefPtr<Gtk::Builder> &x,
const std::string &cache_path,
18 static PoolCacheWindow *create(Gtk::Window *p,
const std::string &cache_path,
const std::string &pool_path,
24 void selection_changed();
25 void update_from_pool();
28 std::string cache_path;
29 std::string base_path;
35 Gtk::TreeView *pool_item_view =
nullptr;
36 Gtk::Stack *stack =
nullptr;
37 Gtk::TextView *delta_text_view =
nullptr;
38 Gtk::Button *update_from_pool_button =
nullptr;
39 Gtk::Label *status_label =
nullptr;
41 enum class ItemState { CURRENT, OUT_OF_DATE, MISSING_IN_POOL };
43 class TreeColumns :
public Gtk::TreeModelColumnRecord {
47 Gtk::TreeModelColumnRecord::add(name);
48 Gtk::TreeModelColumnRecord::add(type);
49 Gtk::TreeModelColumnRecord::add(uuid);
50 Gtk::TreeModelColumnRecord::add(state);
51 Gtk::TreeModelColumnRecord::add(delta);
52 Gtk::TreeModelColumnRecord::add(filename_cached);
54 Gtk::TreeModelColumn<Glib::ustring> name;
55 Gtk::TreeModelColumn<std::string> filename_cached;
56 Gtk::TreeModelColumn<ObjectType> type;
57 Gtk::TreeModelColumn<UUID> uuid;
58 Gtk::TreeModelColumn<ItemState> state;
59 Gtk::TreeModelColumn<json> delta;
61 TreeColumns tree_columns;
63 Glib::RefPtr<Gtk::ListStore> item_store;