From 39dde288fe7ab67f37de5fe0f86c71b9dc395e7e Mon Sep 17 00:00:00 2001 From: Zachary Hall Date: Tue, 16 Apr 2024 09:39:05 -0700 Subject: [PATCH] Fix compiler errors. --- backends/ui/gtk/main.cpp | 11 ++++++----- dbus.cpp | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/backends/ui/gtk/main.cpp b/backends/ui/gtk/main.cpp index d433aca..14f186f 100644 --- a/backends/ui/gtk/main.cpp +++ b/backends/ui/gtk/main.cpp @@ -3,6 +3,7 @@ #include #include #include +using namespace Looper::Log; std::string GtkBackend::get_id() { return "gtk"; } @@ -24,19 +25,19 @@ void g_log_handler(const gchar *domain, GLogLevelFlags flags, const gchar *messa LogStream *stream; switch (level) { case GLogLevelFlags::G_LOG_LEVEL_ERROR: { - stream = new LogStream({domain}, {ERROR}); + stream = new LogStream({domain}, {&ERROR}); } break; case GLogLevelFlags::G_LOG_LEVEL_CRITICAL: { stream = new LogStream({"CRITICAL", domain}, {stderr}); } break; case GLogLevelFlags::G_LOG_LEVEL_WARNING: { - stream = new LogStream({domain}, {WARNING}); + stream = new LogStream({domain}, {&WARNING}); } break; case GLogLevelFlags::G_LOG_LEVEL_INFO: { - stream = new LogStream({domain}, {INFO}); + stream = new LogStream({domain}, {&INFO}); } break; case GLogLevelFlags::G_LOG_LEVEL_DEBUG: { - stream = new LogStream({domain}, {DEBUG}); + stream = new LogStream({domain}, {&DEBUG}); } break; default: { stream = new LogStream({domain}, {stderr}); @@ -51,7 +52,7 @@ int GtkBackend::run(std::vector realArgs, int argc, char **argv) { return ret; } g_log_set_default_handler(g_log_handler, nullptr); - g_log_writer + //g_log_writer Glib::set_application_name("Looper"); auto app = Gtk::Application::create("com.complecwaft.Looper.GTK", Gio::Application::Flags::NON_UNIQUE); char *gtk_frontend_css = (char*)malloc(gtk_frontend_css_size + 1); diff --git a/dbus.cpp b/dbus.cpp index 1eefa5d..357846d 100644 --- a/dbus.cpp +++ b/dbus.cpp @@ -89,7 +89,7 @@ std::vector MprisAPI::GetTracksMetadata(const std::vector &T for (auto stream : streams) { std::map meta; meta["mpris:trackid"] = std::format("{}{}", streamPrefix, i); - meta["xesam:title"] = stream; + meta["xesam:title"] = stream.name; i++; } }