Fix for 42792
[apps/osp/Call.git] / src / CallOptionPopup.cpp
index 250c73a..b42ff9f 100644 (file)
@@ -93,7 +93,7 @@ CallOptionPopup::Initialize(void)
        TryReturn(r == E_SUCCESS, r, "CallOptionPopup::AddControl() failed");
 
        ListView* pListView = new (std::nothrow) ListView();
-       pListView->Construct(Rectangle(0, 0, W_POPUP, listHeight), true, SCROLL_STYLE_FADE_OUT);
+       pListView->Construct(Rectangle(0, 0, W_POPUP + HORIZONTAL_PADDING, listHeight), true, SCROLL_STYLE_FADE_OUT);
        pListView->AddListViewItemEventListener(*this);
        pListView->SetItemProvider(*this);
        r = AddControl(pListView);
@@ -234,6 +234,29 @@ CallOptionPopup::OnListViewItemStateChanged(ListView& listView, int index,
                int elementId, ListItemStatus status)
 {
        Popup::SetShowState(false);
+       if(elementId == -1)
+       {
+               elementId = ANSERWING_OPTION_HOLD_SINGLE_CALL;
+               if (__pOptionsList->GetCount() == 2)
+               {
+                       if(index == 1)
+                       {
+                               elementId = ANSERWING_OPTION_END_SINGLE_CALL;
+                       }
+               }
+               else
+               {
+                       elementId = ANSERWING_OPTION_REPLACE_ACTIVE_CALL;
+                       if(index == 1)
+                       {
+                               elementId = ANSERWING_OPTION_REPLACE_HELD_CALL;
+                       }
+                       else if(index == 2)
+                       {
+                               elementId = ANSERWING_OPTION_END_ALL_CALLS;
+                       }
+               }
+       }
        __popupListener.OnItemSelected(elementId);
        return;
 }