From d5a53027e58b6153b86b6c4b832cfd393bcdefb0 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Tue, 27 Jul 2021 21:43:00 +0200 Subject: Rename com.canonical.powerd -> com.lomiri.Repowerd --- src/CMakeLists.txt | 6 ++-- src/brightness.c | 28 +++++++-------- src/com.canonical.powerd.xml | 84 -------------------------------------------- src/com.lomiri.Repowerd.xml | 84 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 101 insertions(+), 101 deletions(-) delete mode 100644 src/com.canonical.powerd.xml create mode 100644 src/com.lomiri.Repowerd.xml diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b253d0a..d6e3c7b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,10 +19,10 @@ set(SERVICE_MANUAL_SOURCES # generated sources include(GdbusCodegen) set(SERVICE_GENERATED_SOURCES) -add_gdbus_codegen_with_namespace(SERVICE_GENERATED_SOURCES dbus-powerd - com.canonical +add_gdbus_codegen_with_namespace(SERVICE_GENERATED_SOURCES dbus-repowerd + com.lomiri Dbus - ${CMAKE_SOURCE_DIR}/src/com.canonical.powerd.xml) + ${CMAKE_SOURCE_DIR}/src/com.lomiri.Repowerd.xml) add_gdbus_codegen_with_namespace(SERVICE_GENERATED_SOURCES dbus-battery org.ayatana.indicator.power Dbus diff --git a/src/brightness.c b/src/brightness.c index eb48515..4b00568 100644 --- a/src/brightness.c +++ b/src/brightness.c @@ -18,7 +18,7 @@ */ #include "brightness.h" -#include "dbus-powerd.h" +#include "dbus-repowerd.h" #include @@ -46,7 +46,7 @@ typedef struct GSettings * settings; - DbusPowerd * powerd_proxy; + DbusRepowerd * powerd_proxy; char * powerd_name_owner; double percentage; @@ -198,7 +198,7 @@ percentage_to_brightness(IndicatorPowerBrightness * self, double percentage) } /** - * DBus Chatter: com.canonical.powerd + * DBus Chatter: com.lomiri.Repowerd * * This is used to get default value, and upper and lower bounds, * of the brightness setting @@ -217,7 +217,7 @@ on_powerd_brightness_params_ready(GObject * oproxy, v = NULL; error = NULL; - if (dbus_powerd_call_get_brightness_params_finish(DBUS_POWERD(oproxy), &v, res, &error)) + if (dbus_repowerd_call_get_brightness_params_finish(DBUS_REPOWERD(oproxy), &v, res, &error)) { IndicatorPowerBrightness * self = INDICATOR_POWER_BRIGHTNESS(gself); priv_t * p = get_priv(self); @@ -235,12 +235,12 @@ on_powerd_brightness_params_ready(GObject * oproxy, p->powerd_max, p->powerd_default_value, (int)p->powerd_ab_supported); - + if (old_ab_supported != p->powerd_ab_supported) g_object_notify_by_pspec(G_OBJECT(self), properties[PROP_AUTO_SUPPORTED]); if (p->settings != NULL) - { + { if (g_settings_get_boolean(p->settings, KEY_NEED_DEFAULT)) { /* user's first session, so init the schema's default @@ -282,7 +282,7 @@ on_powerd_name_owner_changed(GDBusProxy * powerd_proxy, if (owner != NULL) { - dbus_powerd_call_get_brightness_params(DBUS_POWERD(powerd_proxy), + dbus_repowerd_call_get_brightness_params(DBUS_REPOWERD(powerd_proxy), p->cancellable, on_powerd_brightness_params_ready, gself); @@ -294,11 +294,11 @@ on_powerd_name_owner_changed(GDBusProxy * powerd_proxy, } static void -on_powerd_brightness_changed(DbusPowerd * powerd_proxy, +on_powerd_brightness_changed(DbusRepowerd * powerd_proxy, GParamSpec * pspec G_GNUC_UNUSED, gpointer gself) { - set_brightness_local(gself, dbus_powerd_get_brightness(powerd_proxy)); + set_brightness_local(gself, dbus_repowerd_get_brightness(powerd_proxy)); } static void @@ -307,10 +307,10 @@ on_powerd_proxy_ready(GObject * source_object G_GNUC_UNUSED, gpointer gself) { GError * error; - DbusPowerd * powerd_proxy; + DbusRepowerd * powerd_proxy; error = NULL; - powerd_proxy = dbus_powerd_proxy_new_for_bus_finish(res, &error); + powerd_proxy = dbus_repowerd_proxy_new_for_bus_finish(res, &error); if (powerd_proxy != NULL) { @@ -461,10 +461,10 @@ indicator_power_brightness_init(IndicatorPowerBrightness * self) g_settings_schema_unref(schema); } - dbus_powerd_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, + dbus_repowerd_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES, - "com.canonical.powerd", - "/com/canonical/powerd", + "com.lomiri.Repowerd", + "/com/lomiri/Repowerd", p->cancellable, on_powerd_proxy_ready, self); diff --git a/src/com.canonical.powerd.xml b/src/com.canonical.powerd.xml deleted file mode 100644 index b5b4ac4..0000000 --- a/src/com.canonical.powerd.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/com.lomiri.Repowerd.xml b/src/com.lomiri.Repowerd.xml new file mode 100644 index 0000000..377eeab --- /dev/null +++ b/src/com.lomiri.Repowerd.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3