Compare commits
2 Commits
bda12e0112
...
b21c31ad97
Author | SHA1 | Date |
---|---|---|
|
b21c31ad97 | |
|
c43dd3a4db |
|
@ -24,11 +24,18 @@ static void render_filter(Filter* filter, std::string* title, bool* request_remo
|
|||
ImGui::AlignTextToFramePadding();
|
||||
ImGui::Text("Title:%s%s", title->empty() ? "" : " ", title->c_str());
|
||||
ImGui::SameLine();
|
||||
|
||||
bool popup_just_opened = false;
|
||||
if (ImGui::Button("Edit")) {
|
||||
ImGui::OpenPopup("change_filter_title");
|
||||
popup_just_opened = true;
|
||||
}
|
||||
if (ImGui::BeginPopup("change_filter_title")) {
|
||||
ImGui::InputText("##title", title);
|
||||
ImGui::SetKeyboardFocusHere();
|
||||
bool enter_pressed = ImGui::InputText("##title", title, ImGuiInputTextFlags_EnterReturnsTrue);
|
||||
if (enter_pressed || (!popup_just_opened && !ImGui::IsItemActive())) {
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
|
@ -223,7 +230,8 @@ static void try_write_config(const Config& config) {
|
|||
void filters_fragment(Config& active_config, Filters& __restrict active_filters, Filters& __restrict inactive_filters,
|
||||
const std::vector<LogcatEntry>& logcat_entries, std::vector<size_t>& filtered_logcat_entry_offsets,
|
||||
bool* p_open) {
|
||||
ImGui::TextUnformatted("You can use regex for strings by prepending \"regex:\"");
|
||||
ImGui::TextWrapped("You can use regex for strings by prepending \"regex:\". "
|
||||
"While editing titles, press Enter to use the new title or press Escape to keep the old one");
|
||||
|
||||
for (Filters::iterator it = inactive_filters.begin(); it != inactive_filters.end();) {
|
||||
bool removal_requested = false;
|
||||
|
|
|
@ -302,6 +302,7 @@ bool LogcatThread::_handle_start_request() {
|
|||
}
|
||||
};
|
||||
|
||||
// TODO what if *this->_logcat_command was mutated during copying?
|
||||
std::string logcat_command = *this->_logcat_command;
|
||||
if (logcat_command.empty()) {
|
||||
logcat_command = default_logcat_command;
|
||||
|
|
|
@ -100,6 +100,8 @@ void main_window(bool latest_log_entries_read, ImFont* monospace_font, LogcatThr
|
|||
}
|
||||
|
||||
if (ImGui::Button("Start", !logcat_running)) {
|
||||
logcat_entries.clear();
|
||||
filtered_logcat_entry_offsets.clear();
|
||||
logcat_thread.logcat_process_request.store(LogcatProcessRequest::Start);
|
||||
}
|
||||
ImGui::SameLine();
|
||||
|
@ -108,6 +110,8 @@ void main_window(bool latest_log_entries_read, ImFont* monospace_font, LogcatThr
|
|||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Restart", logcat_running)) {
|
||||
logcat_entries.clear();
|
||||
filtered_logcat_entry_offsets.clear();
|
||||
logcat_thread.logcat_process_request.store(LogcatProcessRequest::Start);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue