Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fingerterm
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mer-core
fingerterm
Commits
ec43d366
Commit
ec43d366
authored
Mar 16, 2015
by
mvogt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fingerterm] Use libnemonotifications rather than MNotification
MNotification is no longer maintained.
parent
d1463903
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
16 deletions
+26
-16
fingerterm.pro
fingerterm.pro
+3
-0
main.cpp
main.cpp
+2
-0
rpm/fingerterm.spec
rpm/fingerterm.spec
+1
-0
util.cpp
util.cpp
+20
-16
No files found.
fingerterm.pro
View file @
ec43d366
QT
=
core
gui
qml
quick
dbus
feedback
CONFIG
+=
link_pkgconfig
PKGCONFIG
+=
nemonotifications
-
qt5
contains
(
MEEGO_EDITION
,
harmattan
)
:
{
CONFIG
+=
meegotouch
}
...
...
main.cpp
View file @
ec43d366
...
...
@@ -51,6 +51,8 @@ int main(int argc, char *argv[])
QSettings
*
settings
=
new
QSettings
(
QDir
::
homePath
()
+
"/.config/FingerTerm/settings.ini"
,
QSettings
::
IniFormat
);
defaultSettings
(
settings
);
QCoreApplication
::
setApplicationName
(
"Fingerterm"
);
// fork the child process before creating QGuiApplication
int
socketM
;
int
pid
=
forkpty
(
&
socketM
,
NULL
,
NULL
,
NULL
);
...
...
rpm/fingerterm.spec
View file @
ec43d366
...
...
@@ -12,6 +12,7 @@ BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(Qt0Feedback)
BuildRequires: pkgconfig(nemonotifications-qt5) >= 1.0.4
Requires: qt5-qtdeclarative-import-xmllistmodel
Requires: qt5-qtdeclarative-import-window2
Requires: qt-components-qt5
...
...
util.cpp
View file @
ec43d366
...
...
@@ -34,6 +34,10 @@
#include <QFeedbackEffect>
#ifdef MEEGO_EDITION_HARMATTAN
#include <notification.h>
#endif
Util
::
Util
(
QSettings
*
settings
,
QObject
*
parent
)
:
QObject
(
parent
),
iAllowGestures
(
false
),
...
...
@@ -228,30 +232,30 @@ void Util::bellAlert()
if
(
settingsValue
(
"general/backgroundBellNotify"
).
toBool
()
&&
!
iWindow
->
hasFocus
())
{
MRemoteAction
act
(
MComponentData
::
instance
()
->
serviceName
(),
"/org/maemo/m"
,
"com.nokia.MApplicationIf"
,
"launch"
);
MNotification
notif
(
MNotification
::
ImReceivedEvent
,
"FingerTerm"
,
"Terminal alert was received"
);
notif
.
setImage
(
"/usr/share/icons/hicolor/80x80/apps/fingerterm.png"
);
notif
.
setAction
(
act
);
Notification
notif
;
notif
.
setAppIcon
(
"icon-l-terminal"
);
notif
.
setUrgency
(
Notification
::
Normal
);
notif
.
setExpireTimeout
(
0
);
notif
.
setPreviewSummary
(
QCoreApplication
::
applicationName
());
// TODO: should be translated
notif
.
setPreviewBody
(
"Terminal alert was received"
);
notif
.
setRemoteAction
(
Notification
::
remoteAction
(
"default"
,
""
,
MComponentData
::
instance
()
->
serviceName
(),
"/org/maemo/m"
,
"com.nokia.MApplicationIf"
,
"launch"
));
notif
.
publish
();
}
else
if
(
settingsValue
(
"general/visualBell"
).
toBool
()
)
{
}
else
#endif //MEEGO_EDITION_HARMATTAN
if
(
settingsValue
(
"general/visualBell"
).
toBool
()
)
{
emit
visualBell
();
}
#else
if
(
settingsValue
(
"general/visualBell"
).
toBool
()
)
emit
visualBell
();
#endif
}
void
Util
::
clearNotifications
()
{
#ifdef MEEGO_EDITION_HARMATTAN
QList
<
MNotification
*>
notifs
=
MNotification
::
notifications
();
foreach
(
MNotification
*
n
,
notifs
)
{
if
(
n
->
remove
()
)
delete
n
;
foreach
(
QObject
*
obj
,
Notification
::
notifications
()
)
{
if
(
Notification
*
notif
=
qobject_cast
<
Notification
*>
(
obj
)
)
{
notif
->
close
();
}
delete
obj
;
}
#endif //MEEGO_EDITION_HARMATTAN
}
...
...
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