diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-03-25 20:26:40 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-03-25 20:26:40 +0530 |
| commit | 1284f8cf39e8ba44e837d4dac0bace89cb7a0c26 (patch) | |
| tree | 58ff313869ca62b335a8412289e3bbec1c104f47 /src/InputMediator.cpp | |
| parent | 4cbaaae7c55e71d2d4db591029394812077eb844 (diff) | |
| download | null-browser-1284f8cf39e8ba44e837d4dac0bace89cb7a0c26.tar.gz null-browser-1284f8cf39e8ba44e837d4dac0bace89cb7a0c26.zip | |
Refactor webview index with id + add web.tabs.close
Diffstat (limited to '')
| -rw-r--r-- | src/InputMediator.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/InputMediator.cpp b/src/InputMediator.cpp index 1d86a2a..2a36665 100644 --- a/src/InputMediator.cpp +++ b/src/InputMediator.cpp @@ -15,16 +15,17 @@ InputMediator::InputMediator(WebViewStack *webview_stack, keymap_evaluator(keymap_evaluator) { connect(lua_runtime, &LuaRuntime::url_opened, webview_stack, &WebViewStack::open_url); - connect(lua_runtime, &LuaRuntime::keymap_add_requested, this, + connect(lua_runtime, &LuaRuntime::keymap_added, this, &InputMediator::add_keymap); connect(lua_runtime, &LuaRuntime::history_back_requested, webview_stack, &WebViewStack::webview_history_back); connect(lua_runtime, &LuaRuntime::history_forward_requested, webview_stack, &WebViewStack::webview_history_forward); + connect(lua_runtime, &LuaRuntime::webview_closed, webview_stack, + &WebViewStack::close); - lua_runtime->set_current_tab_id_fetcher([this]() { - return this->webview_stack->current_webview_index(); - }); + lua_runtime->set_current_tab_id_fetcher( + [this]() { return this->webview_stack->current_webview_id(); }); } void InputMediator::add_keymap(const QString &mode_string, |
