Evas_Object* check = elm_check_add(parent);
elm_object_style_set(check, kStyleDefault);
elm_object_style_set(check, "multiline");
- evas_object_size_hint_align_set(check, 0.1, 0.0);
+ evas_object_size_hint_align_set(check, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_check_state_set(check, EINA_TRUE);
return check;
}
evas_object_show(label);
}
+void Popup::SetUrl(const std::string& url) {
+ Evas_Object* label = elm_label_add(box_);
+ elm_object_style_set(label, kStyleLabel);
+ elm_label_line_wrap_set(label, ELM_WRAP_MIXED);
+ elm_object_text_set(label, url.c_str());
+ evas_object_color_set(label, 0, 0, 0, 255);
+ evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_box_pack_end(box_, label);
+ evas_object_show(label);
+}
+
void Popup::SetResultHandler(std::function<void
(Popup* popup, void* user_data)> handler, void* user_data) {
handler_ = handler;
// etc.
void SetTitle(const std::string& str_id);
void SetBody(const std::string& str_id);
+ void SetUrl(const std::string& url);
void SetResultHandler(std::function
<void(Popup* popup, void* user_data)> handler, void* user_data);
}
void WebApplication::OnCertificateAllowRequest(
- WebView*, const std::string& /*url*/, const std::string& pem,
+ WebView*, const std::string& url, const std::string& pem,
std::function<void(bool allow)> result_handler) {
auto db = common::AppDB::GetInstance();
std::string reminder =
popup->SetButtonType(Popup::ButtonType::AllowDenyButton);
popup->SetTitle(popup_string::kPopupTitleCert);
popup->SetBody(popup_string::kPopupBodyCert);
+ popup->SetUrl(url);
popup->SetCheckBox(popup_string::kPopupCheckRememberPreference);
popup->SetResultHandler(
[db, result_handler, pem](Popup* popup, void* /*user_data*/) {