Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-client-windows
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-client-windows
Commits
c54e2278
Commit
c54e2278
authored
Oct 1, 2015
by
Edric Milaret
Browse files
Options
Downloads
Patches
Plain Diff
chat: fix history not being displayed
Issue: #79704 Change-Id: I8336277ec8932b74782b92e2ed14db7e0319f9d1
parent
791f000c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
callwidget.cpp
+2
-1
2 additions, 1 deletion
callwidget.cpp
instantmessagingwidget.cpp
+22
-14
22 additions, 14 deletions
instantmessagingwidget.cpp
with
24 additions
and
15 deletions
callwidget.cpp
+
2
−
1
View file @
c54e2278
...
@@ -311,6 +311,7 @@ CallWidget::callStateChanged(Call* call, Call::State previousState)
...
@@ -311,6 +311,7 @@ CallWidget::callStateChanged(Call* call, Call::State previousState)
||
call
->
state
()
==
Call
::
State
::
FAILURE
||
call
->
state
()
==
Call
::
State
::
FAILURE
||
call
->
state
()
==
Call
::
State
::
ABORTED
)
{
||
call
->
state
()
==
Call
::
State
::
ABORTED
)
{
setActualCall
(
nullptr
);
setActualCall
(
nullptr
);
ui
->
instantMessagingWidget
->
setMediaText
(
nullptr
);
ui
->
videoWidget
->
hide
();
ui
->
videoWidget
->
hide
();
displaySpinner
(
false
);
displaySpinner
(
false
);
auto
onHoldCall
=
callModel_
->
getActiveCalls
().
first
();
auto
onHoldCall
=
callModel_
->
getActiveCalls
().
first
();
...
@@ -321,6 +322,7 @@ CallWidget::callStateChanged(Call* call, Call::State previousState)
...
@@ -321,6 +322,7 @@ CallWidget::callStateChanged(Call* call, Call::State previousState)
}
else
if
(
call
->
state
()
==
Call
::
State
::
CURRENT
)
{
}
else
if
(
call
->
state
()
==
Call
::
State
::
CURRENT
)
{
displaySpinner
(
false
);
displaySpinner
(
false
);
ui
->
videoWidget
->
show
();
ui
->
videoWidget
->
show
();
ui
->
instantMessagingWidget
->
setMediaText
(
actualCall_
);
}
}
ui
->
callStateLabel
->
setText
(
QString
(
tr
(
"Call State: %1"
,
"%1 is the state of the call"
))
ui
->
callStateLabel
->
setText
(
QString
(
tr
(
"Call State: %1"
,
"%1 is the state of the call"
))
.
arg
(
call
->
toHumanStateName
()));
.
arg
(
call
->
toHumanStateName
()));
...
@@ -394,7 +396,6 @@ void
...
@@ -394,7 +396,6 @@ void
CallWidget
::
setActualCall
(
Call
*
value
)
CallWidget
::
setActualCall
(
Call
*
value
)
{
{
actualCall_
=
value
;
actualCall_
=
value
;
ui
->
instantMessagingWidget
->
setMediaText
(
actualCall_
);
}
}
void
void
...
...
This diff is collapsed.
Click to expand it.
instantmessagingwidget.cpp
+
22
−
14
View file @
c54e2278
...
@@ -75,7 +75,19 @@ InstantMessagingWidget::setMediaText(Call *call)
...
@@ -75,7 +75,19 @@ InstantMessagingWidget::setMediaText(Call *call)
if
(
call
!=
nullptr
)
{
if
(
call
!=
nullptr
)
{
connect
(
call
,
SIGNAL
(
mediaAdded
(
Media
::
Media
*
)),
connect
(
call
,
SIGNAL
(
mediaAdded
(
Media
::
Media
*
)),
this
,
SLOT
(
mediaAdd
(
Media
::
Media
*
)));
this
,
SLOT
(
mediaAdd
(
Media
::
Media
*
)));
Media
::
Text
*
textMedia
=
call
->
addOutgoingMedia
<
Media
::
Text
>
();
Media
::
Text
*
textMedia
=
nullptr
;
if
(
call
->
hasMedia
(
Media
::
Media
::
Type
::
TEXT
,
Media
::
Media
::
Direction
::
OUT
))
{
textMedia
=
call
->
firstMedia
<
Media
::
Text
>
(
Media
::
Media
::
Direction
::
OUT
);
}
else
{
textMedia
=
call
->
addOutgoingMedia
<
Media
::
Text
>
();
}
if
(
textMedia
)
{
connect
(
ui
->
messageOutput
->
model
(),
SIGNAL
(
rowsInserted
(
const
QModelIndex
&
,
int
,
int
)),
ui
->
messageOutput
,
SLOT
(
scrollToBottom
()));
ui
->
messageOutput
->
setModel
(
textMedia
->
recording
()
->
instantMessagingModel
());
connect
(
ui
->
messageInput
,
&
QLineEdit
::
returnPressed
,
[
=
]()
connect
(
ui
->
messageInput
,
&
QLineEdit
::
returnPressed
,
[
=
]()
{
{
QMap
<
QString
,
QString
>
messages
;
QMap
<
QString
,
QString
>
messages
;
...
@@ -83,6 +95,7 @@ InstantMessagingWidget::setMediaText(Call *call)
...
@@ -83,6 +95,7 @@ InstantMessagingWidget::setMediaText(Call *call)
textMedia
->
send
(
messages
);
textMedia
->
send
(
messages
);
ui
->
messageInput
->
clear
();
ui
->
messageInput
->
clear
();
});
});
}
}
else
{
}
else
{
ui
->
messageOutput
->
disconnect
();
ui
->
messageOutput
->
disconnect
();
ui
->
messageInput
->
disconnect
();
ui
->
messageInput
->
disconnect
();
...
@@ -99,12 +112,6 @@ InstantMessagingWidget::mediaAdd(Media::Media *media)
...
@@ -99,12 +112,6 @@ InstantMessagingWidget::mediaAdd(Media::Media *media)
break
;
break
;
case
Media
::
Media
::
Type
::
TEXT
:
case
Media
::
Media
::
Type
::
TEXT
:
if
(
media
->
direction
()
==
Media
::
Text
::
Direction
::
IN
)
{
if
(
media
->
direction
()
==
Media
::
Text
::
Direction
::
IN
)
{
ui
->
messageOutput
->
setModel
(
static_cast
<
Media
::
Text
*>
(
media
)
->
recording
()
->
instantMessagingModel
());
connect
(
ui
->
messageOutput
->
model
(),
SIGNAL
(
rowsInserted
(
const
QModelIndex
&
,
int
,
int
)),
ui
->
messageOutput
,
SLOT
(
scrollToBottom
()));
connect
(
static_cast
<
Media
::
Text
*>
(
media
),
connect
(
static_cast
<
Media
::
Text
*>
(
media
),
SIGNAL
(
messageReceived
(
QMap
<
QString
,
QString
>
)),
SIGNAL
(
messageReceived
(
QMap
<
QString
,
QString
>
)),
this
,
this
,
...
@@ -158,4 +165,5 @@ InstantMessagingWidget::onMsgReceived(const QMap<QString,QString>& message)
...
@@ -158,4 +165,5 @@ InstantMessagingWidget::onMsgReceived(const QMap<QString,QString>& message)
GlobalSystemTray
::
instance
().
showMessage
(
"Ring: Message Received"
,
message
[
"text/plain"
]);
GlobalSystemTray
::
instance
().
showMessage
(
"Ring: Message Received"
,
message
[
"text/plain"
]);
QApplication
::
alert
(
this
,
5000
);
QApplication
::
alert
(
this
,
5000
);
}
}
this
->
show
();
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment