elm_entry_single_line_set(m_entry, EINA_TRUE);
elm_entry_scrollable_set(m_entry, EINA_TRUE);
elm_entry_input_panel_layout_set(m_entry, ELM_INPUT_PANEL_LAYOUT_URL);
- elm_entry_input_panel_return_key_type_set(m_entry,ELM_INPUT_PANEL_RETURN_KEY_TYPE_GO);
+ elm_entry_input_panel_return_key_type_set(m_entry, ELM_INPUT_PANEL_RETURN_KEY_TYPE_GO);
elm_entry_text_style_user_push(m_entry, "DEFAULT='font=Tizen:style=Light font_size=42'");
m_rightIcon = elm_button_add(m_entry_layout);
URIEntry* self = reinterpret_cast<URIEntry*>(data);
std::string entry(elm_entry_markup_to_utf8(elm_entry_entry_get(self->m_entry)));
self->showCancelIcon();
- if(entry.find(" ") != std::string::npos)
+ if (entry.find(" ") != std::string::npos)
return;
self->uriEntryEditingChangedByUser(std::make_shared<std::string>(entry));
}
} else {
self->m_entryContextMenuOpen = false;
}
- if(self->m_first_click) {
+ if (self->m_first_click) {
elm_entry_entry_set(self->m_entry, elm_entry_utf8_to_markup(self->m_URI.c_str()));
elm_entry_select_all(self->m_entry);
self->m_first_click = false;
boost::regex aboutRegex(R"(^about:[^\s]*$)");
boost::regex fileRegex(R"(^file:///[^\s]*$)");
boost::regex myfilesappRegex(R"(^file:///opt/usr/media/[^\s]*$)");
+ boost::regex myfilesappetcRegex(R"(^file:///opt/usr/media/../[^\s]*$)");
if (!url.empty()) {
if (boost::regex_match(url, urlRegex) ||
- boost::regex_match(url, myfilesappRegex) ||
+ boost::regex_match(url, aboutRegex) ||
boost::regex_match(url, chromeRegex) ||
- boost::regex_match(url, aboutRegex))
+ (boost::regex_match(url, myfilesappRegex) &&
+ !boost::regex_match(url, myfilesappetcRegex))) {
return url;
- else if (boost::regex_match(std::string("http://") + url, urlRegex) &&
+ } else if (boost::regex_match(std::string("http://") + url, urlRegex) &&
(!boost::regex_match(url, fileRegex)) &&
- url.find(".") != std::string::npos)
+ url.find(".") != std::string::npos) {
return std::string("http://") + url;
- else {
+ } else {
auto sig = createSearchQuery(url);
if (!sig) {
BROWSER_LOGD("[%s:%d] signal error!", __PRETTY_FUNCTION__, __LINE__);
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
m_rightIconType = RightIconType::CANCEL;
bool isEntryEmpty = elm_entry_is_empty(m_entry);
- if(!isEntryEmpty)
+ if (!isEntryEmpty)
showRightIcon("toolbar_input_ic_cancel.png");
else
hideRightIcon();
void URIEntry::hideLeftIcon()
{
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- elm_object_signal_emit(m_entry_layout,"hide,left,icon", "ui");
+ elm_object_signal_emit(m_entry_layout, "hide,left,icon", "ui");
}
void URIEntry::showSecureIcon(bool show, bool secure)