Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
c392047c
Commit
c392047c
authored
May 16, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(src/app/App): display Assistant if it's the first time app launch
parent
c811ece5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
App.cpp
linphone-desktop/src/app/App.cpp
+17
-6
No files found.
linphone-desktop/src/app/App.cpp
View file @
c392047c
...
...
@@ -144,7 +144,7 @@ void App::initContentApp () {
qInfo
()
<<
QStringLiteral
(
"Received message from other application: `%1`."
).
arg
(
QString
(
message
));
if
(
message
==
"show"
)
App
::
smartShowWindow
(
getMainWindow
());
smartShowWindow
(
getMainWindow
());
}
);
}
...
...
@@ -391,7 +391,7 @@ void App::setTrayIcon () {
QAction
*
restoreAction
=
new
QAction
(
"Restore"
,
root
);
root
->
connect
(
restoreAction
,
&
QAction
::
triggered
,
root
,
[
root
]
{
App
::
smartShowWindow
(
root
);
smartShowWindow
(
root
);
});
// trayIcon: Left click actions.
...
...
@@ -402,7 +402,7 @@ void App::setTrayIcon () {
)
{
if
(
reason
==
QSystemTrayIcon
::
Trigger
)
{
if
(
root
->
visibility
()
==
QWindow
::
Hidden
)
App
::
smartShowWindow
(
root
);
smartShowWindow
(
root
);
else
root
->
hide
();
}
...
...
@@ -456,6 +456,8 @@ void App::openAppAfterInit () {
qInfo
()
<<
QStringLiteral
(
"Open linphone app."
);
QQuickWindow
*
mainWindow
=
getMainWindow
();
#ifndef __APPLE__
// Enable TrayIconSystem.
if
(
!
QSystemTrayIcon
::
isSystemTrayAvailable
())
...
...
@@ -463,11 +465,20 @@ void App::openAppAfterInit () {
else
setTrayIcon
();
if
(
!
mParser
.
isSet
(
"iconified"
))
App
::
smartShowWindow
(
getMainWindow
());
smartShowWindow
(
mainWindow
);
#else
App
::
smartShowWindow
(
getMainWindow
());
if
(
!
mParser
.
isSet
(
"iconified"
))
smartShowWindow
(
mainWindow
);
#endif // ifndef __APPLE__
// Display Assistant if it's the first time app launch.
{
shared_ptr
<
linphone
::
Config
>
config
=
CoreManager
::
getInstance
()
->
getCore
()
->
getConfig
();
if
(
config
->
getInt
(
SettingsModel
::
UI_SECTION
,
"force_assistant_at_startup"
,
1
))
{
QMetaObject
::
invokeMethod
(
mainWindow
,
"setView"
,
Q_ARG
(
QVariant
,
"Assistant"
),
Q_ARG
(
QVariant
,
""
));
config
->
setInt
(
SettingsModel
::
UI_SECTION
,
"force_assistant_at_startup"
,
0
);
}
}
}
// -----------------------------------------------------------------------------
...
...
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