diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2017-07-29 18:31:48 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2017-07-29 18:31:48 +0200 |
| commit | 1d6b4708c0093256ee67cc4c8ba1982719243b6d (patch) | |
| tree | 1544c5c70d07ab8dfad209b501f84c581fc42e37 /src/monitor-gui.cc | |
| parent | 8d58ffb022649fd8a28d2f74845fc8ca5c934029 (diff) | |
Handle FILE argument in monitor-gui
Diffstat (limited to 'src/monitor-gui.cc')
| -rw-r--r-- | src/monitor-gui.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/monitor-gui.cc b/src/monitor-gui.cc index 4abdd21..3419025 100644 --- a/src/monitor-gui.cc +++ b/src/monitor-gui.cc @@ -927,6 +927,16 @@ public: menu_->enable_item(ACTION_COPY_TEXT, false); } + void open(GuiMain*, std::string const& file) override { + if (abort_if_modified()) return; + file_ = file; + if (!load(file_, packages_.get())) { + file_.clear(); + } + modified_ = false; + update_title(); + } + // GuiTextWindow::Listener bool about_to_close(GuiTextWindow* wnd) override { assert(proxy_logwnd_.get() == wnd); @@ -1066,7 +1076,10 @@ private: file_filter_); if (file_.empty()) return; - load(file_, packages_.get()); + if (!load(file_, packages_.get())) { + file_.clear(); + } + modified_ = false; update_title(); } |
