MCPcopy Create free account
hub / github.com/XorTroll/Goldleaf / input_DefaultKey

Method input_DefaultKey

Goldleaf/source/ui/ui_WebBrowserLayout.cpp:82–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80 }
81
82 void WebBrowserLayout::input_DefaultKey() {
83 const auto url = ShowKeyboard(cfg::Strings.GetString(38), "https://");
84 if(!url.empty()) {
85 LaunchWebAppletImpl(url);
86
87 const auto option = g_MainApplication->DisplayDialog(cfg::Strings.GetString(379), cfg::Strings.GetString(380), { cfg::Strings.GetString(111), cfg::Strings.GetString(112) }, true);
88 if(option == 0) {
89 const auto name = ShowKeyboard(cfg::Strings.GetString(381));
90 if(!name.empty()) {
91 const cfg::json::WebBookmark bmk = { name, url };
92 g_Settings.json_settings.web.value().bookmarks.value().push_back(bmk);
93 g_Settings.Save();
94 this->Refresh();
95 g_MainApplication->ShowNotification(cfg::Strings.GetString(382));
96 }
97 }
98 }
99 }
100
101 void WebBrowserLayout::bookmark_DefaultKey(cfg::json::WebBookmark &bmk) {
102 const auto option_1 = g_MainApplication->DisplayDialog(cfg::Strings.GetString(383), cfg::Strings.GetString(384), { cfg::Strings.GetString(385), cfg::Strings.GetString(386), cfg::Strings.GetString(245), cfg::Strings.GetString(18) }, true);

Callers

nothing calls this directly

Calls 6

RefreshMethod · 0.95
ShowKeyboardFunction · 0.85
LaunchWebAppletImplFunction · 0.85
DisplayDialogMethod · 0.80
SaveMethod · 0.80
ShowNotificationMethod · 0.80

Tested by

no test coverage detected