5 #include "util/uuid.hpp" 6 #include "common/common.hpp" 7 #include "nlohmann/json.hpp" 19 void merge_item(ObjectType ty,
const UUID &uu);
20 void merge_3d_model(
const std::string &filename);
21 void handle_refresh_prs();
22 bool prs_refreshed_once =
false;
27 class ListColumns :
public Gtk::TreeModelColumnRecord {
31 Gtk::TreeModelColumnRecord::add(name);
32 Gtk::TreeModelColumnRecord::add(type);
33 Gtk::TreeModelColumnRecord::add(uuid);
34 Gtk::TreeModelColumnRecord::add(filename);
36 Gtk::TreeModelColumn<Glib::ustring> name;
37 Gtk::TreeModelColumn<ObjectType> type;
38 Gtk::TreeModelColumn<UUID> uuid;
39 Gtk::TreeModelColumn<std::string> filename;
41 ListColumns list_columns;
43 Glib::RefPtr<Gtk::ListStore> item_store;
44 Gtk::TreeView *merge_items_view =
nullptr;
45 Gtk::Label *merge_items_placeholder_label =
nullptr;
46 Gtk::Label *pr_body_placeholder_label =
nullptr;
47 Gtk::Button *upgrade_button =
nullptr;
48 Gtk::Button *create_pr_button =
nullptr;
49 Gtk::Button *refresh_prs_button =
nullptr;
50 Gtk::Revealer *upgrade_revealer =
nullptr;
51 Gtk::Label *upgrade_label =
nullptr;
52 Gtk::Spinner *upgrade_spinner =
nullptr;
53 Gtk::Label *gh_repo_link_label =
nullptr;
54 Gtk::Label *gh_signed_in_label =
nullptr;
55 Gtk::Button *merge_items_clear_button =
nullptr;
56 Gtk::Button *merge_items_remove_button =
nullptr;
57 Gtk::Entry *pr_title_entry =
nullptr;
58 Gtk::TextView *pr_body_textview =
nullptr;
59 Gtk::ListBox *pull_requests_listbox =
nullptr;
61 void handle_remote_upgrade();
62 void handle_create_pr();
63 void update_body_placeholder_label();
66 void remote_upgrade_thread();
67 void create_pr_thread();
68 void refresh_prs_thread();
69 void checkout_master(git_repository *repo);
71 Glib::Dispatcher git_thread_dispatcher;
73 enum class GitThreadMode { UPGRADE, PULL_REQUEST, REFRESH_PRS };
74 GitThreadMode git_thread_mode = GitThreadMode::UPGRADE;
75 bool git_thread_busy =
false;
76 std::string git_thread_status;
77 bool git_thread_error =
false;
79 std::mutex git_thread_mutex;
84 std::set<std::pair<ObjectType, UUID>> items_merge;
85 std::set<std::string> models_merge;
86 void update_items_merge();
87 std::set<std::pair<ObjectType, UUID>> get_referenced(ObjectType ty,
const UUID &uu);
88 bool exists_in_pool(
class Pool &pool, ObjectType ty,
const UUID &uu);
92 std::string gh_username;
93 std::string gh_password;
a class to store JSON values
Definition: json.hpp:161
Definition: pool_notebook.hpp:18
Definition: pool_remote_box.hpp:14
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
Stores objects (Unit, Entity, Symbol, Part, etc.) from the pool.
Definition: pool.hpp:19
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61