5 #include "util/uuid.hpp"
6 #include "common/common.hpp"
7 #include "nlohmann/json.hpp"
21 bool refreshed_once =
false;
26 Gtk::Button *refresh_button =
nullptr;
27 Gtk::Label *info_label =
nullptr;
28 Gtk::TreeView *diff_treeview =
nullptr;
29 Gtk::TreeView *status_treeview =
nullptr;
30 Gtk::CheckButton *diff_show_deleted_checkbutton =
nullptr;
31 Gtk::CheckButton *diff_show_modified_checkbutton =
nullptr;
32 Gtk::Box *diff_box =
nullptr;
34 void make_treeview(Gtk::TreeView *treeview);
36 class TreeColumns :
public Gtk::TreeModelColumnRecord {
40 Gtk::TreeModelColumnRecord::add(name);
41 Gtk::TreeModelColumnRecord::add(type);
42 Gtk::TreeModelColumnRecord::add(uuid);
44 Gtk::TreeModelColumnRecord::add(status);
45 Gtk::TreeModelColumnRecord::add(status_flags);
46 Gtk::TreeModelColumnRecord::add(path);
48 Gtk::TreeModelColumn<Glib::ustring> name;
49 Gtk::TreeModelColumn<ObjectType> type;
50 Gtk::TreeModelColumn<UUID> uuid;
52 Gtk::TreeModelColumn<git_delta_t> status;
53 Gtk::TreeModelColumn<unsigned int> status_flags;
54 Gtk::TreeModelColumn<std::string> path;
56 TreeColumns list_columns;
58 Glib::RefPtr<Gtk::ListStore> diff_store;
59 Glib::RefPtr<Gtk::TreeModelFilter> diff_store_filtered;
61 Glib::RefPtr<Gtk::ListStore> status_store;
63 static int diff_file_cb_c(
const git_diff_delta *delta,
float progress,
void *pl);
64 static int status_cb_c(
const char *path,
unsigned int status_flags,
void *payload);
65 void status_cb(
const char *path,
unsigned int status_flags);
66 void diff_file_cb(
const git_diff_delta *delta);
68 void update_store_from_db_prepare();
69 void update_store_from_db(Glib::RefPtr<Gtk::ListStore> store);