extern const wchar_t* TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER;
extern const wchar_t* TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER;
extern const wchar_t* TEMP_FILE_PATH_WEB_FILE;
+extern const wchar_t* TEMP_FILE_PATH_CONTACT_IMAGE;
extern const wchar_t* WEB_URL_HTTP;
}
else if (__statusValue == SET_AT_TYPE_CALLER_IMAGE)
{
- int count = 1;
- int index = 0;
String destFilePath;
if (__sourceFilePath.IsEmpty() == false)
{
- __sourceFilePath.Reverse();
- __sourceFilePath.IndexOf(FILE_EXT_SEPARATOR, 0, index);
- __sourceFilePath.Reverse();
- __sourceFilePath.Insert(FILE_NAME_SEPARATOR, __sourceFilePath.GetLength() - index - 1);
- destFilePath.Append(__sourceFilePath);
- destFilePath.Insert(count, destFilePath.GetLength() - index - 1);
- while (File::IsFileExist(destFilePath) == true)
- {
- count++;
- destFilePath.Clear();
- destFilePath.Append(__sourceFilePath);
- destFilePath.Insert(count, destFilePath.GetLength() - index - 1);
- }
- }
- r = pCropBuffer->EncodeToFile(destFilePath, IMG_FORMAT_JPG, true, 100);
- ContentManager::ScanFile(destFilePath);
- Contact* pContact = null;
- AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
- Addressbook* pAddressbook = null;
-
- pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
- if (pAddressbook != null)
- {
- pContact = pAddressbook->GetContactN(__contentId);
- if (pContact != null)
+ destFilePath = App::GetInstance()->GetAppRootPath() + TEMP_FILE_PATH_CONTACT_IMAGE;
+ r = pCropBuffer->EncodeToFile(destFilePath, IMG_FORMAT_JPG, true, 100);
+ Contact* pContact = null;
+ AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+ Addressbook* pAddressbook = null;
+
+ pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+ if (pAddressbook != null)
{
- pContact->SetThumbnail(destFilePath);
- pAddressbook->UpdateContact(*pContact);
- delete pContact;
+ pContact = pAddressbook->GetContactN(__contentId);
+ if (pContact != null)
+ {
+ pContact->SetThumbnail(destFilePath);
+ pAddressbook->UpdateContact(*pContact);
+ delete pContact;
+ }
+ delete pAddressbook;
}
- delete pAddressbook;
}
}
delete pCropBuffer;
String byteCountForInput;
int byteCount = 0;
int inputLength = 0;
- int tempLength = 220;
+ int tempLength = 255;
int textToCheck = 0;
MessageBox messageBox;
Utf8Encoding utf8;
-
-
+ String fileExtension = File::GetFileExtension(__pPresentationModel->GetFilePathAt(__currentIndex));
+ tempLength = tempLength - 1 - fileExtension.GetLength();
FooterItemStatus currentStatus = FOOTER_ITEM_STATUS_NORMAL;
result r = E_SUCCESS;
byteCountForInput = __pNameEditField->GetText();
r = utf8.GetByteCount(byteCountForInput, byteCount);
AppLogDebug("result is %s",GetErrorMessage(r));
- AppLogDebug("Bye count is %d",byteCount);
+ AppLogDebug("Byte count is %d",byteCount);
}
if (__pNameEditField != null)
GetFooter()->SetItemEnabled(0,true);
GetFooter()->Invalidate(true);
}
-
}
}
-
if (currentText.StartsWith(".", 0))
{
String invalidCharacterString;
{
String msg = ResourceManager::GetString(L"IDS_COM_POP_INVALID_CHARACTERS");
CreateMessage(msg);
- currentInput.Replace("/","");
+ currentInput.Replace("/", "");
__pNameEditField->SetText(currentInput);
}
CreateMessage(msg);
currentText = __pNameEditField->GetText();
- for (currentCharacter=0;checkByteCount < tempLength;currentCharacter++)
+ for (currentCharacter=0; checkByteCount < tempLength; currentCharacter++)
{
currentInputCharacter.Clear();
currentInputCharacter = currentText[currentCharacter];
lengthOfFinalString++;
}
- r = __pNameEditField->GetText().SubString(0,lengthOfFinalString,currentInput);
- AppLogDebug("current input is %S",currentInput.GetPointer());
+ r = __pNameEditField->GetText().SubString(0, lengthOfFinalString, currentInput);
+ AppLogDebug("current input is %S", currentInput.GetPointer());
r = __pNameEditField->SetText(currentInput);
__pNameEditField->ShowKeypad();
return;
Invalidate(true);
}
+ if (previousSceneId == IDSCN_IMAGE_CROP && pArgs != null)
+ {
+ String filePath;
+ filePath = *(static_cast<String*>(pArgs->GetAt(0)));
+ delete pArgs;
+ int count = __pPresentationModel->GetFileCount();
+ __pPresentationModel->AddImageCache(filePath);
+ __pGallery->UpdateGallery();
+ __pGallery->SetCurrentItemIndex(count);
+ __pPresentationModel->RequestImage(filePath);
+ ShowPanelDetail(false);
+ }
+
if (__pGallery->GetCurrentItemIndex() < 0)
{
SetFooterItemState(false);
const wchar_t* TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER = L"home.jpg";
const wchar_t* TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER = L"lock.jpg";
const wchar_t* TEMP_FILE_PATH_WEB_FILE = L"data/test_out.jpg";
+const wchar_t* TEMP_FILE_PATH_CONTACT_IMAGE = L"data/contact.jpg";
const wchar_t* WEB_URL_HTTP = L"http://";