}
__pAddressbarUrlField->Invalidate(false);
- __pAddressbarUrlField->SetCursorPosition(0);
+ __pAddressbarUrlField->SetCursorPosition(__pAddressbarUrlField->GetTextLength());
}
}
SetShowState(false);
if(__pListener != null)
{
- __pListener->OnAddressBarKeypadClosed(*this,false);
+ __pListener->OnAddressBarKeypadClosed(*this,true);
}
}
__isCancelledClicked = false;
}
pItem->AddElement(Rectangle(x_Margin_Icon, y_Margin_Icon, width_Icon, height_Icon), IDA_FORMAT_ICON, *pBitmap, null);
pItem->AddElement(Rectangle(x_Margin_Title, 0, width_Title, itemHeight - height_Url), IDA_FORMAT_SITE, pBookMark->GetBookmarkTitle(),44,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,true);
- if(__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
- pItem->AddElement(Rectangle(x_Margin_Url, y_Margin_Url, width_Url, height_Url), IDA_FORMAT_URL, pBookMark->GetUrl(),textSize,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,true);
- else
+// if(__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
+// pItem->AddElement(Rectangle(x_Margin_Url, y_Margin_Url, width_Url, height_Url), IDA_FORMAT_URL, pBookMark->GetUrl(),textSize,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,true);
+// else
pItem->AddElement(Rectangle(x_Margin_Url, y_Margin_Url, width_Url, height_Url), IDA_FORMAT_URL, pBookMark->GetUrl(),textSize,CUSTOM_COLOR_GREY,CUSTOM_COLOR_GREY,CUSTOM_COLOR_GREY,true);
if (pBitmap != null)
}
if ( __pSearchBar != null && keypadAction == KEYPAD_ACTION_SEARCH)
{
- if (__pSearchBar->GetText().GetLength() == 0)
- {
- return;
- }
+// if (__pSearchBar->GetText().GetLength() == 0)
+// {
+// return;
+// }
if (__pSearchBar != null)
{
__pBookmarkList->RemoveAll(false);
delete __pBookmarkList;
}
+ if (__pSearchListView)
+ {
+ delete __pSearchListView;
+ __pSearchListView = null;
+ }
}
bool
r = pItem->AddElement(Rectangle(104, 10, GetClientAreaBounds().width - 108 - 32 - bookmarkBtnWidth - 32, 60), IDA_FORMAT_TITLE, pHistory->GetHistoryTitle(), 44,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,true);
TryCatch(!IsFailed(r), "CreateItem failed with %s",GetErrorMessage(r));
- if(__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
- r = pItem->AddElement(Rectangle(104, 70, GetClientAreaBounds().width - 108 - 32 - bookmarkBtnWidth - 32, 48), IDA_FORMAT_URL, pHistory->GetHistoryUrl(),32,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,true);
- else
+// if(__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
+// r = pItem->AddElement(Rectangle(104, 70, GetClientAreaBounds().width - 108 - 32 - bookmarkBtnWidth - 32, 48), IDA_FORMAT_URL, pHistory->GetHistoryUrl(),32,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,true);
+// else
r = pItem->AddElement(Rectangle(104, 70, GetClientAreaBounds().width - 108 - 32 - bookmarkBtnWidth - 32, 48), IDA_FORMAT_URL, pHistory->GetHistoryUrl(),32,CUSTOM_COLOR_GREY,CUSTOM_COLOR_GREY,CUSTOM_COLOR_GREY,true);
TryCatch(!IsFailed(r), "CreateItem failed with %s",GetErrorMessage(r));
if ( pBookmarkBitmap != null)
__pImageMenu = null;
}
- p.y = p.y + __pAddressbar->GetHeight();
+ if(__pAddressbar->GetShowState() == true)
+ p.y = p.y + __pAddressbar->GetHeight();
// if (p.y < 100)
// {
// direction = CONTEXT_MENU_ANCHOR_DIRECTION_DOWNWARD;
String idElement = __pHitElementResult->GetAttributeValue(L"id");
String nameElement = __pHitElementResult->GetAttributeValue(L"name");
AppLog("MainForm::IDA_PASTE_TEXT_CLICKED id is %ls",idElement.GetPointer());
-// String script = L"function insertAtCursor(myField, myValue) { if (document.selection) { myField.focus(); sel = document.selection.createRange(); sel.text = myValue; } else if (myField.selectionStart || myField.selectionStart == '0'){ var startPos = myField.selectionStart; var endPos = myField.selectionEnd; myField.value = myField.value.substring(0, startPos)+ myValue + myField.value.substring(endPos, myField.value.length); } else { myField.value += myValue; } } ";
- String script = L"function insertAtCursor(myField, myValue) { if (document.selection) { document.getElementById(myField).focus(); sel = document.selection.createRange(); sel.text = myValue; } else if (document.getElementById(myField).selectionStart || document.getElementById(myField).selectionStart == '0'){ var startPos = document.getElementById(myField).selectionStart; var endPos = document.getElementById(myField).selectionEnd; document.getElementById(myField).value = document.getElementById(myField).value.substring(0, startPos)+ myValue + document.getElementById(myField).value.substring(endPos, document.getElementById(myField).value.length); } else { document.getElementById(myField).value += myValue; } } ";//by hyunn.lee
+ String script;
if(idElement.GetLength() != 0)
{
+ script = L"function insertAtCursor(myField, myValue) { if (document.selection) { document.getElementById(myField).focus(); sel = document.selection.createRange(); sel.text = myValue; } else if (document.getElementById(myField).selectionStart || document.getElementById(myField).selectionStart == '0'){ var startPos = document.getElementById(myField).selectionStart; var endPos = document.getElementById(myField).selectionEnd; document.getElementById(myField).value = document.getElementById(myField).value.substring(0, startPos)+ myValue + document.getElementById(myField).value.substring(endPos, document.getElementById(myField).value.length); } else { document.getElementById(myField).value += myValue; } } ";
script.Append("insertAtCursor('");
script.Append(idElement);
script.Append("',");
}
else if (nameElement.GetLength() != 0)
{
+ script = L"function insertAtCursor(myField, myValue) { if (document.selection) { document.getElementByName(myField)[0].focus(); sel = document.selection.createRange(); sel.text = myValue; } else if (myField.selectionStart || myField.selectionStart == '0'){ var startPos = myField.selectionStart; var endPos = myField.selectionEnd; myField.value = myField.value.substring(0, startPos)+ myValue + myField.value.substring(endPos, myField.value.length); } else { document.getElementByName(myField)[0].value += myValue; } } ";
script.Append("insertAtCursor(document.getElementsByName('");
script.Append(nameElement);
script.Append("')[0],");
if(__pAddressbar)
__pAddressbar->SetShowState(false);
if(__pFooterPanel)
+ {
__pFooterPanel->SetShowState(true);
+
+ __pFooterPanel->Invalidate(false);
+ }
// if(__pWebViewer)
// __pWebViewer->SetFocus();
+// if(__pMoreButton)
+// __pMoreButton->SetFocus();
if(__pFooterUrlField)
{
__pFooterUrlField->SetFocusable(true);
if (__pWebViewer != null)
{
AppLog("MainForm::OnWebPageBlockSelected web not null");
- __pHitElementResult = __pWebViewer->GetElementByPointN(endPoint);
+ __pHitElementResult = __pWebViewer->GetElementByPointN(startPoint);
+ if(GetLastResult() == E_INVALID_ARG)
+ {
+ __pHitElementResult = __pWebViewer->GetElementByPointN(endPoint);
+ }
}
if (__pHitElementResult == null)