fix bar crashing on monitor add/remove

This commit is contained in:
2026-02-09 13:49:52 +01:00
parent a90d1c2f6c
commit e1217305a5
30 changed files with 1186 additions and 247 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include <memory>
#include <sigc++/connection.h>
#include <sys/types.h>
#include "components/timer.hpp"
#include "services/timerService.hpp"
@@ -9,6 +10,7 @@
class TimerWidget : public Gtk::Box {
public:
TimerWidget();
~TimerWidget();
void addTimer(const std::string &duration, uint64_t timerId);
void removeTimer(uint64_t timerId);
void activateTimer(uint64_t timerId);
@@ -19,4 +21,8 @@ class TimerWidget : public Gtk::Box {
std::string rawDigits;
std::map<uint64_t, std::unique_ptr<Timer>> activeTimers;
sigc::connection timerSetConnection;
sigc::connection timerCancelledConnection;
sigc::connection timerExpiredConnection;
sigc::connection tickConnection;
};