mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:07:34 +00:00
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)
This commit is contained in:
parent
05914d2e9a
commit
bafb8b0be6
4 changed files with 61 additions and 9 deletions
|
@ -27,8 +27,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibGUI/Button.h>
|
||||
#include <LibGUI/ComboBox.h>
|
||||
#include <LibGUI/ImageWidget.h>
|
||||
#include <LibGUI/TextBox.h>
|
||||
#include <LibGUI/ItemListModel.h>
|
||||
#include <LibGUI/Window.h>
|
||||
|
||||
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<String> m_path_history;
|
||||
NonnullRefPtr<GUI::ItemListModel<String>> m_path_history_model;
|
||||
|
||||
RefPtr<GUI::ImageWidget> m_icon_image_widget;
|
||||
RefPtr<GUI::Button> m_ok_button;
|
||||
RefPtr<GUI::Button> m_cancel_button;
|
||||
RefPtr<GUI::Button> m_browse_button;
|
||||
RefPtr<GUI::TextBox> m_path_text_box;
|
||||
RefPtr<GUI::ComboBox> m_path_combo_box;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue