a-la-karte/src/notificationinhibitor.h

24 lines
417 B
C
Raw Normal View History

Add Plasma tray, notification inhibition, session control, and flatpak runner Expand TrayController with daemon health polling every 10 seconds via D-Bus Ping calls to org.kde.GameCenter1, org.kde.ALaKarte.Runner1, and org.kde.ALaKarte.Input1. Add menu actions to toggle console behaviors, notification mirroring, and to restart each daemon via systemctl --user. Add NotificationInhibitor, owned by App, which calls org.freedesktop.Notifications Inhibit/UnInhibit on the session bus whenever the consoleBehaviors config setting changes. The cookie is released on application quit. Add consoleBehaviors and mirrorNotifications properties to Config with KConfig persistence under the [Console] group. Ship org.kde.alakarte.notifyrc defining GameLaunched, GameExited, and LaunchFailed notification events so Plasma attributes them correctly in the notification history. Extend RunnerManagerDaemon::ResolveLaunch with a flatpak runner branch that constructs a flatpak run command, translates environment overrides to --env= arguments, and respects flatpakAppId, flatpakBranch, flatpakArch, and flatpakArgs from the launch spec. Add activate_session, switch_to_vt, and terminate_session actions to the gamecenter KAuth helper and its polkit policy. Each action calls the corresponding method on org.freedesktop.login1 over the system bus. Add CouchSidebar.qml, a horizontal source tab bar shown in couch mode above the library view, exposing the same sourceSelected, settingsRequested, importRequested, and aboutRequested signals as SidebarView. Fix duplicate adaptiveFocusRingWidth property in GameCard.qml.
2026-03-22 15:53:09 +00:00
#pragma once
#include <QObject>
class Config;
class NotificationInhibitor : public QObject
{
Q_OBJECT
public:
explicit NotificationInhibitor(Config *config, QObject *parent = nullptr);
~NotificationInhibitor() override;
private:
void applyInhibition(bool enabled);
void inhibit();
void uninhibit();
Config *m_config = nullptr;
uint m_cookie = 0;
bool m_inhibited = false;
};