Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
savoirfairelinux
jami-client-gnome
Commits
32f0efcd
Unverified
Commit
32f0efcd
authored
Apr 30, 2019
by
Sébastien Blin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mainwindow: use activeCalls() api from LRC
Change-Id: I4f0e572ef9a0d1a8b381fd7fa37d0b7378e91d24
parent
7e29ea17
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
src/ringmainwindow.cpp
src/ringmainwindow.cpp
+3
-6
No files found.
src/ringmainwindow.cpp
View file @
32f0efcd
...
...
@@ -333,7 +333,6 @@ public:
bool
show_settings
=
false
;
bool
is_fullscreen
=
false
;
bool
has_cleared_all_history
=
false
;
uint32_t
activeCalls
=
0
;
guint
inhibitionCookie
=
0
;
int
smartviewPageNum
=
0
;
...
...
@@ -1923,7 +1922,7 @@ CppImpl::slotCallStatusChanged(const std::string& callId)
void
CppImpl
::
slotCallStarted
(
const
std
::
string
&
callId
)
{
if
(
activeCalls
==
0
)
{
if
(
!
lrc
::
api
::
Lrc
::
activeCalls
().
empty
()
)
{
GtkApplication
*
app
=
gtk_window_get_application
(
GTK_WINDOW
(
self
));
if
(
app
)
{
inhibitionCookie
=
gtk_application_inhibit
(
...
...
@@ -1933,14 +1932,12 @@ CppImpl::slotCallStarted(const std::string& callId)
g_debug
(
"Inhibition was activated."
);
}
}
activeCalls
++
;
}
void
CppImpl
::
slotCallEnded
(
const
std
::
string
&
callId
)
{
activeCalls
--
;
if
(
activeCalls
==
0
)
{
if
(
lrc
::
api
::
Lrc
::
activeCalls
().
empty
())
{
GtkApplication
*
app
=
gtk_window_get_application
(
GTK_WINDOW
(
self
));
if
(
app
)
{
gtk_application_uninhibit
(
app
,
inhibitionCookie
);
...
...
@@ -2247,7 +2244,7 @@ ring_main_window_can_close(RingMainWindow* self)
{
g_return_val_if_fail
(
IS_RING_MAIN_WINDOW
(
self
),
true
);
auto
*
priv
=
RING_MAIN_WINDOW_GET_PRIVATE
(
RING_MAIN_WINDOW
(
self
));
if
(
priv
->
cpp
&&
(
priv
->
cpp
->
activeCalls
>
0
))
{
if
(
priv
->
cpp
&&
!
lrc
::
api
::
Lrc
::
activeCalls
().
empty
(
))
{
auto
*
close_dialog
=
gtk_message_dialog_new
(
GTK_WINDOW
(
self
),
GTK_DIALOG_DESTROY_WITH_PARENT
,
GTK_MESSAGE_QUESTION
,
GTK_BUTTONS_OK_CANCEL
,
_
(
"A call is currently ongoing. Do you want to close the window and stop all current calls?"
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment