From bafb8b0be69c0452b7974aa4616976d572db0f21 Mon Sep 17 00:00:00 2001 From: Nick Vella Date: Mon, 15 Feb 2021 20:49:37 +1100 Subject: Run: Store and present recent Run command history in a ComboBox. We now store the last 25 inputs ran in Run in a simple text file under .config (~/.config/RunHistory.txt) --- Userland/Applications/Run/RunWindow.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Userland/Applications/Run/RunWindow.h') diff --git a/Userland/Applications/Run/RunWindow.h b/Userland/Applications/Run/RunWindow.h index f8cd19ea61..5a99a7731b 100644 --- a/Userland/Applications/Run/RunWindow.h +++ b/Userland/Applications/Run/RunWindow.h @@ -27,8 +27,9 @@ #pragma once #include +#include #include -#include +#include #include class RunWindow final : public GUI::Window { @@ -45,9 +46,16 @@ private: bool run_as_command(const String& run_input); bool run_via_launch(const String& run_input); + String history_file_path(); + void load_history(); + void save_history(); + + Vector m_path_history; + NonnullRefPtr> m_path_history_model; + RefPtr m_icon_image_widget; RefPtr m_ok_button; RefPtr m_cancel_button; RefPtr m_browse_button; - RefPtr m_path_text_box; + RefPtr m_path_combo_box; }; -- cgit v1.2.3