bar can now toggle bluetooth power and discovery

This commit is contained in:
2025-12-22 01:41:01 +01:00
parent 0101ea1ec0
commit 5a429a3b8b
31 changed files with 507 additions and 114 deletions

View File

@@ -1,18 +1,17 @@
#pragma once
#include <gdkmm/memorytexture.h>
#include <gio/gio.h>
#include <giomm/actiongroup.h>
#include <giomm/dbusconnection.h>
#include <giomm/init.h>
#include <giomm/menumodel.h>
#include <glibmm/bytes.h>
#include <glibmm/refptr.h>
#include <sigc++/sigc++.h>
#include <gio/gio.h>
#include <map>
#include <memory>
#include <optional>
#include <sigc++/sigc++.h>
#include <string>
#include <vector>
@@ -49,8 +48,8 @@ class TrayService {
struct MenuNode {
int id = 0;
std::string label;
bool enabled = true;
bool visible = true;
bool enabled = true;
bool visible = true;
bool separator = false;
std::vector<MenuNode> children;
};
@@ -65,7 +64,7 @@ class TrayService {
struct TrackedItem {
Item publicData;
guint signalSubscriptionId = 0;
guint ownerWatchId = 0;
guint ownerWatchId = 0;
Glib::RefPtr<Gio::MenuModel> menuModel;
Glib::RefPtr<Gio::ActionGroup> menuActions;
};
@@ -74,9 +73,9 @@ class TrayService {
Glib::RefPtr<Gio::DBus::NodeInfo> nodeInfo;
Gio::DBus::InterfaceVTable vtable;
guint nameOwnerId = 0;
guint nameOwnerId = 0;
guint registrationId = 0;
bool hostRegistered = false;
bool hostRegistered = false;
std::map<std::string, std::unique_ptr<TrackedItem>> items;