16class PoolGitBox :
public Gtk::Box {
18 PoolGitBox(BaseObjectType *cobject,
const Glib::RefPtr<Gtk::Builder> &x,
class PoolNotebook &nb,
19 const std::string &repo_path);
20 static PoolGitBox *create(
class PoolNotebook &nb,
const std::string &repo_path);
23 bool refreshed_once =
false;
27 const std::string git_repo_path;
29 Gtk::Button *refresh_button =
nullptr;
30 Gtk::Label *info_label =
nullptr;
31 Gtk::TreeView *diff_treeview =
nullptr;
32 Gtk::TreeView *status_treeview =
nullptr;
33 Gtk::CheckButton *diff_show_deleted_checkbutton =
nullptr;
34 Gtk::CheckButton *diff_show_modified_checkbutton =
nullptr;
35 Gtk::Box *diff_box =
nullptr;
36 Gtk::Button *add_with_deps_button =
nullptr;
38 Gtk::Button *pr_button =
nullptr;
39 Gtk::Button *back_to_master_button =
nullptr;
40 Gtk::Button *back_to_master_delete_button =
nullptr;
42 void make_treeview(Gtk::TreeView *treeview);
44 class TreeColumns :
public Gtk::TreeModelColumnRecord {
48 Gtk::TreeModelColumnRecord::add(name);
49 Gtk::TreeModelColumnRecord::add(type);
50 Gtk::TreeModelColumnRecord::add(uuid);
52 Gtk::TreeModelColumnRecord::add(status);
53 Gtk::TreeModelColumnRecord::add(path);
54 Gtk::TreeModelColumnRecord::add(check_result);
56 Gtk::TreeModelColumn<Glib::ustring> name;
57 Gtk::TreeModelColumn<ObjectType> type;
58 Gtk::TreeModelColumn<UUID> uuid;
60 Gtk::TreeModelColumn<unsigned int> status;
61 Gtk::TreeModelColumn<std::string> path;
62 Gtk::TreeModelColumn<RulesCheckResult> check_result;
64 TreeColumns list_columns;
66 Glib::RefPtr<Gtk::ListStore> diff_store;
67 Glib::RefPtr<Gtk::ListStore> status_store;
69 std::optional<SQLite::Query> q_diff;
70 std::optional<SQLite::Query> q_status;
72 std::optional<SortController> sort_controller_diff;
73 std::optional<SortController> sort_controller_status;
78 enum class View { DIFF, STATUS };
80 void store_from_db(View view,
const std::string &extra_q =
"");
82 static int diff_file_cb_c(
const git_diff_delta *delta,
float progress,
void *pl);
83 static int status_cb_c(
const char *path,
unsigned int status_flags,
void *payload);
84 void status_cb(
const char *path,
unsigned int status_flags);
85 void diff_file_cb(
const git_diff_delta *delta);
87 void handle_add_with_deps();
89 void handle_back_to_master(
bool delete_pr);