Skip to content
Snippets Groups Projects
Commit 57914fac authored by Alexandre Lision's avatar Alexandre Lision Committed by gerrit2
Browse files

conference: hangup single participant

from smartlist user can select to hang up with one participant of
a conference and stay in communication with others

Tuleap: #447
Change-Id: I4fc8f75ff0f8f2c3032d270855b52dc943698486
parent 5c0803f4
No related branches found
No related tags found
No related merge requests found
...@@ -64,6 +64,7 @@ NSInteger const DISPLAYNAME_TAG = 200; ...@@ -64,6 +64,7 @@ NSInteger const DISPLAYNAME_TAG = 200;
NSInteger const DETAILS_TAG = 300; NSInteger const DETAILS_TAG = 300;
NSInteger const CALL_BUTTON_TAG = 400; NSInteger const CALL_BUTTON_TAG = 400;
NSInteger const TXT_BUTTON_TAG = 500; NSInteger const TXT_BUTTON_TAG = 500;
NSInteger const CANCEL_BUTTON_TAG = 600;
- (void)awakeFromNib - (void)awakeFromNib
{ {
...@@ -227,6 +228,9 @@ NSInteger const TXT_BUTTON_TAG = 500; ...@@ -227,6 +228,9 @@ NSInteger const TXT_BUTTON_TAG = 500;
} else { } else {
result = [outlineView makeViewWithIdentifier:@"CallCell" owner:outlineView]; result = [outlineView makeViewWithIdentifier:@"CallCell" owner:outlineView];
NSMutableArray* controls = [NSMutableArray arrayWithObject:[result viewWithTag:CANCEL_BUTTON_TAG]];
[((ContextualTableCellView*) result) setContextualsControls:controls];
[((ContextualTableCellView*) result) setActiveState:NO];
NSTextField* details = [result viewWithTag:DETAILS_TAG]; NSTextField* details = [result viewWithTag:DETAILS_TAG];
[details setStringValue:qIdx.data((int)Call::Role::HumanStateName).toString().toNSString()]; [details setStringValue:qIdx.data((int)Call::Role::HumanStateName).toString().toNSString()];
...@@ -259,14 +263,19 @@ NSInteger const TXT_BUTTON_TAG = 500; ...@@ -259,14 +263,19 @@ NSInteger const TXT_BUTTON_TAG = 500;
- (IBAction)hangUpClickedAtRow:(id)sender { - (IBAction)hangUpClickedAtRow:(id)sender {
NSInteger row = [smartView rowForView:sender]; NSInteger row = [smartView rowForView:sender];
[smartView selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO]; id callNode = [smartView itemAtRow:row];
CallModel::instance().getCall(CallModel::instance().selectionModel()->currentIndex()) << Call::Action::REFUSE; auto callIdx = [treeController toQIdx:((NSTreeNode*)callNode)];
if (callIdx.isValid()) {
auto call = RecentModel::instance().getActiveCall(RecentModel::instance().peopleProxy()->mapToSource(callIdx));
call << Call::Action::REFUSE;
}
} }
- (CGFloat)outlineView:(NSOutlineView *)outlineView heightOfRowByItem:(id)item - (CGFloat)outlineView:(NSOutlineView *)outlineView heightOfRowByItem:(id)item
{ {
QModelIndex qIdx = [treeController toQIdx:((NSTreeNode*)item)]; QModelIndex qIdx = [treeController toQIdx:((NSTreeNode*)item)];
return (((NSTreeNode*)item).indexPath.length == 1) ? 60.0 : 45.0; return (((NSTreeNode*)item).indexPath.length == 1) ? 60.0 : 50.0;
} }
- (IBAction)placeCallFromSearchField:(id)sender - (IBAction)placeCallFromSearchField:(id)sender
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment