feat: add startupwmclass prop export
log: as title
This commit is contained in:
parent
5b99e9e4b9
commit
230636f2e1
@ -117,6 +117,14 @@
|
|||||||
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QStringMap"/>
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QStringMap"/>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
|
<property name="StartupWMClass" type="s" access="read">
|
||||||
|
<annotation
|
||||||
|
name="org.freedesktop.DBus.Description"
|
||||||
|
value="The meaning of this property's type is same as which in StartupWMClass."
|
||||||
|
/>
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QStringMap"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
<method name="Launch">
|
<method name="Launch">
|
||||||
<arg type="s" name="action" direction="in" />
|
<arg type="s" name="action" direction="in" />
|
||||||
<arg type="as" name="fields" direction="in" />
|
<arg type="as" name="fields" direction="in" />
|
||||||
|
@ -559,6 +559,12 @@ bool ApplicationService::terminal() const noexcept
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString ApplicationService::startupWMClass() const noexcept
|
||||||
|
{
|
||||||
|
auto value = findEntryValue(DesktopFileEntryKey, "StartupWMClass", EntryValueType::String);
|
||||||
|
return value.isNull() ? QString{} : value.toString();
|
||||||
|
}
|
||||||
|
|
||||||
qint64 ApplicationService::installedTime() const noexcept
|
qint64 ApplicationService::installedTime() const noexcept
|
||||||
{
|
{
|
||||||
return m_installedTime;
|
return m_installedTime;
|
||||||
@ -894,6 +900,7 @@ void ApplicationService::resetEntry(DesktopEntry *newEntry) noexcept
|
|||||||
emit terminalChanged();
|
emit terminalChanged();
|
||||||
emit environChanged();
|
emit environChanged();
|
||||||
emit launchedTimesChanged();
|
emit launchedTimesChanged();
|
||||||
|
emit startupWMClassChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<QStringList> ApplicationService::unescapeExecArgs(const QString &str) noexcept
|
std::optional<QStringList> ApplicationService::unescapeExecArgs(const QString &str) noexcept
|
||||||
|
@ -74,6 +74,9 @@ public:
|
|||||||
Q_PROPERTY(bool Terminal READ terminal NOTIFY terminalChanged)
|
Q_PROPERTY(bool Terminal READ terminal NOTIFY terminalChanged)
|
||||||
[[nodiscard]] bool terminal() const noexcept;
|
[[nodiscard]] bool terminal() const noexcept;
|
||||||
|
|
||||||
|
Q_PROPERTY(QString StartupWMClass READ startupWMClass NOTIFY startupWMClassChanged)
|
||||||
|
[[nodiscard]] QString startupWMClass() const noexcept;
|
||||||
|
|
||||||
// FIXME:
|
// FIXME:
|
||||||
// This property should implement with fuse guarded
|
// This property should implement with fuse guarded
|
||||||
// $XDG_CONFIG_HOME/autostart/. Current implementation has some problems,
|
// $XDG_CONFIG_HOME/autostart/. Current implementation has some problems,
|
||||||
@ -163,6 +166,7 @@ Q_SIGNALS:
|
|||||||
void terminalChanged();
|
void terminalChanged();
|
||||||
void environChanged();
|
void environChanged();
|
||||||
void launchedTimesChanged();
|
void launchedTimesChanged();
|
||||||
|
void startupWMClassChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class ApplicationManager1Service;
|
friend class ApplicationManager1Service;
|
||||||
|
Loading…
Reference in New Issue
Block a user