fix timer

This commit is contained in:
2026-02-10 13:30:25 +01:00
parent d1b81c4d3e
commit 55a76be186
10 changed files with 38 additions and 28 deletions

View File

@@ -3,6 +3,7 @@
#include <memory>
#include "bar/bar.hpp"
#include "connection/dbus/bluetooth.hpp"
#include "connection/dbus/notification.hpp"
#include "connection/dbus/tray.hpp"
#include "services/hyprland.hpp"
@@ -29,6 +30,7 @@ class App {
std::shared_ptr<NotificationService> notificationService = NotificationService::getInstance();
std::shared_ptr<NotificationController> notificationController = NotificationController::getInstance();
std::shared_ptr<BluetoothController> bluetoothController = BluetoothController::getInstance();
std::shared_ptr<MprisController> mprisController = MprisController::getInstance();
std::shared_ptr<HyprlandService> hyprlandService = HyprlandService::getInstance();

View File

@@ -122,4 +122,7 @@ class BluetoothController : public DbusConnection {
// HID Authorization handler
void authorizeHIDDevice(const std::string &object_path);
Glib::RefPtr<Gio::DBus::NodeInfo> m_node_info;
std::shared_ptr<Gio::DBus::InterfaceVTable> m_interface_vtable;
};

View File

@@ -37,11 +37,11 @@ struct NotifyMessage {
std::string body;
std::vector<std::string> actions;
NotificationUrgency urgency = NORMAL;
int32_t expire_timeout;
int32_t expire_timeout = -1;
// Callback to invoke when an action is triggered
std::function<void(const std::string &action_id)> on_action;
// Guard to prevent multiple action invocations across mirrors
std::shared_ptr<bool> actionInvoked;
std::shared_ptr<bool> actionInvoked = std::make_shared<bool>(false);
// image data (if any) from dbus
std::optional<Glib::RefPtr<Gdk::Pixbuf>> imageData;

View File

@@ -9,6 +9,7 @@
#include "gtkmm/mediafile.h"
#include "gtkmm/mediastream.h"
#include "sigc++/signal.h"
class TimerService {
struct TimerData {
uint64_t duration;

View File

@@ -5,7 +5,6 @@
#include <sys/types.h>
#include "components/timer.hpp"
#include "services/timerService.hpp"
#include "gtkmm/box.h"