Add dbus notifications xml

This commit is contained in:
lupoDharkael
2017-12-03 15:48:45 +01:00
parent a7f1c96db9
commit 41290f0212
2 changed files with 32 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.Notifications">
<method name="GetServerInformation">
<arg name="return_name" type="s" direction="out"/>
<arg name="return_vendor" type="s" direction="out"/>
<arg name="return_version" type="s" direction="out"/>
<arg name="return_spec_version" type="s" direction="out"/>
</method>
<method name="GetCapabilities">
<arg name="return_caps" type="as" direction="out"/>
</method>
<method name="CloseNotification">
<arg name="id" type="u" direction="in"/>
</method>
<method name="Notify">
<arg name="app_name" type="s" direction="in"/>
<arg name="id" type="u" direction="in"/>
<arg name="icon" type="s" direction="in"/>
<arg name="summary" type="s" direction="in"/>
<arg name="body" type="s" direction="in"/>
<arg name="actions" type="as" direction="in"/>
<arg name="hints" type="a{sv}" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In6" value="QVariantMap"/>
<arg name="timeout" type="i" direction="in"/>
<arg name="return_id" type="u" direction="out"/>
</method>
</interface>
</node>

View File

@@ -35,6 +35,8 @@ AppLauncherWidget::AppLauncherWidget(const QPixmap &p, QWidget *parent):
setAttribute(Qt::WA_DeleteOnClose);
m_keepOpen = ConfigHandler().keepOpenAppLauncherValue();
// In case of wanting to know the default app for a mime:
// xdg-mime query default image/png
QString dir = "/usr/share/applications/";
QString dirLocal = "~/.local/share/applications/";
QDir appsDirLocal(dirLocal);