Generate path configuration file
All checks were successful
Build / build (push) Successful in 18s

This commit is contained in:
2024-06-18 11:19:44 +02:00
parent 7b5fe4b9d1
commit 9dc8fb2640
6 changed files with 16 additions and 13 deletions

View File

@ -120,6 +120,9 @@ static void slack_get_property(Glib::VariantBase& result, const Glib::RefPtr<Gio
namespace dlackware::timedate
{
constexpr const std::int32_t usec_per_sec = 1000000ULL;
constexpr const std::int32_t nsec_per_usec = 1000ULL;
timedate1::timedate1()
: interface_vtable{ &slack_method_call, &slack_get_property }
{
@ -134,11 +137,11 @@ namespace dlackware::timedate
void timedate1::on_bus_acquired(const Glib::RefPtr<Gio::DBus::Connection>& connection, const Glib::ustring& name)
{
Glib::RefPtr<Gio::DBus::NodeInfo> introspection_data;
try
{
auto introspection_xml = Glib::file_get_contents(dlackware::timedate::introspection_xml);
auto introspection_xml = Glib::file_get_contents(
(std::filesystem::path(DATADIR_INTERFACES) / dlackware::timedate::bus_name).concat(".xml")
);
introspection_data = Gio::DBus::NodeInfo::create_for_xml(introspection_xml);
}
catch (Glib::Error& slack_err)
@ -194,7 +197,7 @@ namespace dlackware::timedate
{
return nullptr;
}
return Glib::ustring{ zone_copied_from.get() + strlen(zoneinfo_database) + 1 };
return Glib::ustring{ zone_copied_from.get() + zoneinfo_database.size() + 1 };
}
void set_timezone(const Glib::ustring& zone, bool)