Skip to content

Commit

Permalink
1. уточнение 4248 для нередактируемых контролов.
Browse files Browse the repository at this point in the history
  • Loading branch information
zg0 committed Jan 20, 2015
1 parent aaefa92 commit 042acf1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
6 changes: 5 additions & 1 deletion far/changelog
@@ -1,4 +1,8 @@
svs 20.01.2015 23:19:32 +0300 - build 4249
zg 20.01.2015 23:11:38 +0200 - build 4250

1. уточнение 4248 для нередактируемых контролов.

svs 20.01.2015 23:19:32 +0300 - build 4249

1. SQLite 3.8.8.1

Expand Down
17 changes: 9 additions & 8 deletions far/dialog.cpp
Expand Up @@ -5694,7 +5694,8 @@ intptr_t Dialog::SendMessage(intptr_t Msg,intptr_t Param1,void* Param2)
case DI_CHECKBOX:
case DI_RADIOBUTTON:
case DI_BUTTON:
Len = wcslen(Ptr);
Ptr = CurItem->strData.data();
Len = CurItem->strData.size();

if (Type == DI_BUTTON)
{
Expand All @@ -5720,8 +5721,8 @@ intptr_t Dialog::SendMessage(intptr_t Msg,intptr_t Param1,void* Param2)

if ((ListMenuItem=CurItem->ListPtr->GetItemPtr(-1)) )
{
Len=(int)ListMenuItem->strName.size()+1;
Ptr=ListMenuItem->strName.c_str();
Ptr=ListMenuItem->strName.data();
Len=ListMenuItem->strName.size();
}
InitItemData();
break;
Expand All @@ -5737,7 +5738,7 @@ intptr_t Dialog::SendMessage(intptr_t Msg,intptr_t Param1,void* Param2)
switch (Type)
{
case DI_BUTTON:
Len = wcslen(Ptr) + 1;
Len = CurItem->strData.size();

if (!(CurItem->Flags & DIF_NOBRACKETS))
Len-=4;
Expand All @@ -5752,7 +5753,7 @@ intptr_t Dialog::SendMessage(intptr_t Msg,intptr_t Param1,void* Param2)
case DI_DOUBLEBOX:
case DI_CHECKBOX:
case DI_RADIOBUTTON:
Len = wcslen(Ptr) + 1;
Len = CurItem->strData.size();
break;
case DI_COMBOBOX:
case DI_EDIT:
Expand All @@ -5762,7 +5763,7 @@ intptr_t Dialog::SendMessage(intptr_t Msg,intptr_t Param1,void* Param2)

if (CurItem->ObjPtr)
{
Len = static_cast<DlgEdit*>(CurItem->ObjPtr)->GetLength()+1;
Len = static_cast<DlgEdit*>(CurItem->ObjPtr)->GetLength();
break;
}

Expand All @@ -5773,7 +5774,7 @@ intptr_t Dialog::SendMessage(intptr_t Msg,intptr_t Param1,void* Param2)

if ((ListMenuItem=CurItem->ListPtr->GetItemPtr(-1)) )
{
Len=(int)ListMenuItem->strName.size()+1;
Len=(int)ListMenuItem->strName.size();
}

break;
Expand All @@ -5783,7 +5784,7 @@ intptr_t Dialog::SendMessage(intptr_t Msg,intptr_t Param1,void* Param2)
break;
}

return Len-(!Len?0:1);
return Len;
}
/*****************************************************************/
case DM_SETTEXTPTR:
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
@@ -1 +1 @@
m4_define(BUILD,4249)m4_dnl
m4_define(BUILD,4250)m4_dnl

0 comments on commit 042acf1

Please sign in to comment.