diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-11-12 08:40:14 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-11-12 08:16:04 +0000 |
commit | 0f33bc4be7e9dffaa6b68cd758c3c531460c9a2f (patch) | |
tree | 4af026cbc883daf53fb57056fe5d14fbe3c618d2 | |
parent | 511915f11b83c0b0327b9ed393e5bc2ff3b828a0 (diff) | |
download | ayatana-indicator-power-0f33bc4be7e9dffaa6b68cd758c3c531460c9a2f.tar.gz ayatana-indicator-power-0f33bc4be7e9dffaa6b68cd758c3c531460c9a2f.tar.bz2 ayatana-indicator-power-0f33bc4be7e9dffaa6b68cd758c3c531460c9a2f.zip |
Fork from Ubuntu's indicator-power code project.
-rw-r--r-- | .bzr-builddeb/default.conf | 2 | ||||
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rw-r--r-- | data/CMakeLists.txt | 14 | ||||
-rw-r--r-- | data/ayatana-indicator-power.conf.in (renamed from data/indicator-power.conf.in) | 0 | ||||
-rw-r--r-- | data/ayatana-indicator-power.desktop.in (renamed from data/indicator-power.desktop.in) | 0 | ||||
-rw-r--r-- | data/ayatana-indicator-power.upstart.desktop.in (renamed from data/indicator-power.upstart.desktop.in) | 0 | ||||
-rw-r--r-- | data/com.canonical.indicator.power | 24 | ||||
-rw-r--r-- | data/org.ayatana.indicator.power | 24 | ||||
-rw-r--r-- | data/org.ayatana.indicator.power.Battery.xml (renamed from data/com.canonical.indicator.power.Battery.xml) | 2 | ||||
-rw-r--r-- | data/org.ayatana.indicator.power.Testing.xml (renamed from data/com.canonical.indicator.power.Testing.xml) | 2 | ||||
-rw-r--r-- | data/org.ayatana.indicator.power.gschema.xml.in (renamed from data/com.canonical.indicator.power.gschema.xml.in) | 2 | ||||
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | debian/control | 20 | ||||
-rw-r--r-- | debian/copyright | 8 | ||||
-rwxr-xr-x | debian/rules | 10 | ||||
-rw-r--r-- | debian/source/format | 1 | ||||
-rw-r--r-- | debian/source_ayatana-indicator-power.py (renamed from debian/source_indicator-power.py) | 2 | ||||
-rw-r--r-- | po/Makevars | 4 | ||||
-rw-r--r-- | po/POTFILES.in | 2 | ||||
-rw-r--r-- | src/CMakeLists.txt | 19 | ||||
-rw-r--r-- | src/brightness.c | 14 | ||||
-rw-r--r-- | src/dbus-shared.h | 4 | ||||
-rw-r--r-- | src/notifier.c | 10 | ||||
-rw-r--r-- | src/org.ayatana.powerd.xml (renamed from src/com.canonical.powerd.xml) | 2 | ||||
-rw-r--r-- | src/service.c | 18 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 8 | ||||
-rw-r--r-- | tests/manual | 20 | ||||
-rw-r--r-- | tests/test-device.cc | 4 | ||||
-rw-r--r-- | tests/test-notify.cc | 4 |
29 files changed, 117 insertions, 115 deletions
diff --git a/.bzr-builddeb/default.conf b/.bzr-builddeb/default.conf deleted file mode 100644 index 6c96a98..0000000 --- a/.bzr-builddeb/default.conf +++ /dev/null @@ -1,2 +0,0 @@ -[BUILDDEB] -split = True diff --git a/CMakeLists.txt b/CMakeLists.txt index 569100d..07843e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,11 @@ -project(indicator-power C CXX) +project(ayatana-indicator-power C CXX) cmake_minimum_required(VERSION 2.8.9) list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) -set(PROJECT_VERSION "14.10.0") +set(PROJECT_VERSION "0.11.0") set(PACKAGE ${CMAKE_PROJECT_NAME}) -set(GETTEXT_PACKAGE "indicator-power") +set(GETTEXT_PACKAGE "ayatana-indicator-power") add_definitions (-DGETTEXT_PACKAGE="${GETTEXT_PACKAGE}" -DGNOMELOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}") diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 0750128..0d903b9 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -3,7 +3,7 @@ ## include (UseGSettings) -set (SCHEMA_NAME "com.canonical.indicator.power.gschema.xml") +set (SCHEMA_NAME "org.ayatana.indicator.power.gschema.xml") set (SCHEMA_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SCHEMA_NAME}") set (SCHEMA_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME}.in") @@ -80,11 +80,11 @@ install (FILES "${UPSTART_XDG_AUTOSTART_FILE}" ## # where to install -set (UNITY_INDICATOR_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/unity/indicators") -message (STATUS "${UNITY_INDICATOR_DIR} is the Unity Indicator install dir") +set (AYATANA_INDICATOR_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/ayatana/indicators") +message (STATUS "${AYATANA_INDICATOR_DIR} is the Unity Indicator install dir") -set (UNITY_INDICATOR_NAME "com.canonical.indicator.power") -set (UNITY_INDICATOR_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${UNITY_INDICATOR_NAME}") +set (AYATANA_INDICATOR_NAME "org.ayatana.indicator.power") +set (AYATANA_INDICATOR_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${AYATANA_INDICATOR_NAME}") -install (FILES "${UNITY_INDICATOR_FILE}" - DESTINATION "${UNITY_INDICATOR_DIR}") +install (FILES "${AYATANA_INDICATOR_FILE}" + DESTINATION "${AYATANA_INDICATOR_DIR}") diff --git a/data/indicator-power.conf.in b/data/ayatana-indicator-power.conf.in index 665fb35..665fb35 100644 --- a/data/indicator-power.conf.in +++ b/data/ayatana-indicator-power.conf.in diff --git a/data/indicator-power.desktop.in b/data/ayatana-indicator-power.desktop.in index c2fd54c..c2fd54c 100644 --- a/data/indicator-power.desktop.in +++ b/data/ayatana-indicator-power.desktop.in diff --git a/data/indicator-power.upstart.desktop.in b/data/ayatana-indicator-power.upstart.desktop.in index 5f95f8e..5f95f8e 100644 --- a/data/indicator-power.upstart.desktop.in +++ b/data/ayatana-indicator-power.upstart.desktop.in diff --git a/data/com.canonical.indicator.power b/data/com.canonical.indicator.power deleted file mode 100644 index f94ed0f..0000000 --- a/data/com.canonical.indicator.power +++ /dev/null @@ -1,24 +0,0 @@ -[Indicator Service] -Name=indicator-power -ObjectPath=/com/canonical/indicator/power -Position=40 - -[phone] -ObjectPath=/com/canonical/indicator/power/phone -Position=25 - -[desktop] -ObjectPath=/com/canonical/indicator/power/desktop - -[desktop_greeter] -ObjectPath=/com/canonical/indicator/power/desktop_greeter - -[desktop_lockscreen] -ObjectPath=/com/canonical/indicator/power/desktop_greeter - -[phone_greeter] -ObjectPath=/com/canonical/indicator/power/phone -Position=25 - -[ubiquity] -ObjectPath=/com/canonical/indicator/power/desktop_greeter diff --git a/data/org.ayatana.indicator.power b/data/org.ayatana.indicator.power new file mode 100644 index 0000000..1625507 --- /dev/null +++ b/data/org.ayatana.indicator.power @@ -0,0 +1,24 @@ +[Indicator Service] +Name=indicator-power +ObjectPath=/org.ayatana.indicator/power +Position=40 + +[phone] +ObjectPath=/org.ayatana.indicator/power/phone +Position=25 + +[desktop] +ObjectPath=/org.ayatana.indicator/power/desktop + +[desktop_greeter] +ObjectPath=/org.ayatana.indicator/power/desktop_greeter + +[desktop_lockscreen] +ObjectPath=/org.ayatana.indicator/power/desktop_greeter + +[phone_greeter] +ObjectPath=/org.ayatana.indicator/power/phone +Position=25 + +[ubiquity] +ObjectPath=/org.ayatana.indicator/power/desktop_greeter diff --git a/data/com.canonical.indicator.power.Battery.xml b/data/org.ayatana.indicator.power.Battery.xml index eca4524..cfb4b01 100644 --- a/data/com.canonical.indicator.power.Battery.xml +++ b/data/org.ayatana.indicator.power.Battery.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd"> - <interface name="com.canonical.indicator.power.Battery"> + <interface name="org.ayatana.indicator.power.Battery"> <property name="PowerLevel" type="s" access="read"> <doc:doc> diff --git a/data/com.canonical.indicator.power.Testing.xml b/data/org.ayatana.indicator.power.Testing.xml index 72cf6cf..a0d7f50 100644 --- a/data/com.canonical.indicator.power.Testing.xml +++ b/data/org.ayatana.indicator.power.Testing.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd"> - <interface name="com.canonical.indicator.power.Testing"> + <interface name="org.ayatana.indicator.power.Testing"> <property name="MockBatteryEnabled" type="b" access="readwrite"> <doc:doc> diff --git a/data/com.canonical.indicator.power.gschema.xml.in b/data/org.ayatana.indicator.power.gschema.xml.in index 4fd2620..901135b 100644 --- a/data/com.canonical.indicator.power.gschema.xml.in +++ b/data/org.ayatana.indicator.power.gschema.xml.in @@ -4,7 +4,7 @@ <value nick="charge" value="1" /> <value nick="never" value="2" /> </enum> - <schema gettext-domain="@GETTEXT_PACKAGE@" id="com.canonical.indicator.power" path="/com/canonical/indicator/power/"> + <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.ayatana.indicator.power" path="/org.ayatana.indicator/power/"> <key name="show-time" type="b"> <default>false</default> <_summary>Show time in Menu Bar</_summary> diff --git a/debian/changelog b/debian/changelog index 8c84c48..6437c19 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ayatana-indicator-power (0.11.0-0) UNRELEASED; urgency=medium + + * Fork from Ubuntu's indicator-power code project. + + -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Thu, 12 Nov 2015 08:26:14 +0100 + indicator-power (12.10.6+15.10.20151005.1-0ubuntu1) wily; urgency=medium [ CI Train Bot ] diff --git a/debian/control b/debian/control index 20869e3..0e9147e 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,7 @@ -Source: indicator-power +Source: ayatana-indicator-power Section: gnome Priority: optional -Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com> +Maintainer: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Build-Depends: cmake, libnotify-dev (>= 0.7.6), libglib2.0-dev (>= 2.36), @@ -10,22 +10,18 @@ Build-Depends: cmake, python:any, # for packaging debhelper (>= 9), - dh-translations, intltool, # for tests libgtest-dev, python3-dbusmock, dbus-test-runner, libdbustest1-dev, -Standards-Version: 3.9.5 -Homepage: https://launchpad.net/indicator-power -# If you aren't a member of ~indicator-applet-developers but need to upload -# packaging changes, just go ahead. ~indicator-applet-developers will notice -# and sync up the code again. -Vcs-Bzr: https://code.launchpad.net/~indicator-applet-developers/indicator-power/trunk.13.04 -Vcs-Browser: https://bazaar.launchpad.net/~indicator-applet-developers/indicator-power/trunk.13.04/files +Standards-Version: 3.9.6 +Homepage: https://github.com/ArcticaProject/ayatana-indicator-power +Vcs-Git: git://cgit.arctica-project.org/ayatana/ayatana-indicator-power.git +Vcs-Browser: https://cgit.arctica-project.org/ayatana/ayatana-indicator-power.git/ -Package: indicator-power +Package: ayatana-indicator-power Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, @@ -34,6 +30,6 @@ Recommends: unity-control-center | gnome-control-center (>= 3.1) | ubuntu-system indicator-applet (>= 0.2) | indicator-renderer, Suggests: powerd, unity-system-compositor (>= 0.0.4), -Description: Indicator showing power state. +Description: Ayatana Indicator showing power state. This indicator displays current power management information and gives the user a way to access power management preferences. diff --git a/debian/copyright b/debian/copyright index 1f5be70..92265f8 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,9 +1,10 @@ Format: http://dep.debian.net/deps/dep5 -Upstream-Name: indicator-power -Source: http://launchpad.net/indicator-power +Upstream-Name: ayatana-indicator-power +Source: https://github.com/ArcticaProject/ayatana-indicator-power Files: * -Copyright: 2011 Canonical Ltd. +Copyright: 2011, Canonical Ltd. + 2015, Mike Gabriel <mike.gabriel@das-netzwerkteam.de> License: GPL-3 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3, as published @@ -19,6 +20,7 @@ License: GPL-3 Files: debian/* Copyright: 2011 Ken VanDine <ken.vandine@canonical.com> + 2015, Mike Gabriel <mike.gabriel@das-netzwerkteam.de> License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/debian/rules b/debian/rules index 885b94c..48f1c29 100755 --- a/debian/rules +++ b/debian/rules @@ -7,11 +7,11 @@ export DPKG_GENSYMBOLS_CHECK_LEVEL=4 %: - dh $@ --with translations + dh $@ override_dh_install: - find debian/indicator-power -name \*.la -delete - find debian/indicator-power -name \*.a -delete + find debian/ayatana-indicator-power -name \*.la -delete + find debian/ayatana-indicator-power -name \*.a -delete dh_install --fail-missing - mkdir -p debian/indicator-power/usr/share/apport/package-hooks/ - cp debian/source_indicator-power.py debian/indicator-power/usr/share/apport/package-hooks/ + mkdir -p debian/ayatana-indicator-power/usr/share/apport/package-hooks/ + cp debian/source_ayatana-indicator-power.py debian/ayatana-indicator-power/usr/share/apport/package-hooks/ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..9f8e9b6 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +1.0
\ No newline at end of file diff --git a/debian/source_indicator-power.py b/debian/source_ayatana-indicator-power.py index ea0cf0f..3d9b6c6 100644 --- a/debian/source_indicator-power.py +++ b/debian/source_ayatana-indicator-power.py @@ -1,4 +1,4 @@ -'''apport package hook for indicator-power +'''apport package hook for ayatana-indicator-power (c) 2011 Canonical Ltd. Author: Ken VanDine <ken.vandine@ubuntu.com> diff --git a/po/Makevars b/po/Makevars index 383662d..924c007 100644 --- a/po/Makevars +++ b/po/Makevars @@ -18,7 +18,7 @@ XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=g_dngettext:2,3 # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. -COPYRIGHT_HOLDER = Canonical Ltd. +COPYRIGHT_HOLDER = Arctica Project # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: @@ -34,7 +34,7 @@ COPYRIGHT_HOLDER = Canonical Ltd. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. -MSGID_BUGS_ADDRESS = +MSGID_BUGS_ADDRESS = https://github.com/ArcticaProject/ayatana-indicator-power/issues # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. diff --git a/po/POTFILES.in b/po/POTFILES.in index 2a67fdc..3d4d782 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,4 +1,4 @@ -data/com.canonical.indicator.power.gschema.xml.in +data/org.ayatana.indicator.power.gschema.xml.in src/device.c src/notifier.c src/service.c diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8748484..9e537c8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,7 @@ -set (SERVICE_LIB "indicatorpowerservice") -set (SERVICE_EXEC "indicator-power-service") +set (SERVICE_LIB "ayatanaindicatorpowerservice") +set (SERVICE_EXEC "aytana-indicator-power-service") -add_definitions(-DG_LOG_DOMAIN="Indicator-Power") +add_definitions(-DG_LOG_DOMAIN="Ayatana-Indicator-Power") # handwritten sources set(SERVICE_MANUAL_SOURCES @@ -18,17 +18,17 @@ set(SERVICE_MANUAL_SOURCES include(GdbusCodegen) set(SERVICE_GENERATED_SOURCES) add_gdbus_codegen_with_namespace(SERVICE_GENERATED_SOURCES dbus-powerd - com.canonical + org.ayatana Dbus - ${CMAKE_SOURCE_DIR}/src/com.canonical.powerd.xml) + ${CMAKE_SOURCE_DIR}/src/org.ayatana.powerd.xml) add_gdbus_codegen_with_namespace(SERVICE_GENERATED_SOURCES dbus-battery - com.canonical.indicator.power + org.ayatana.indicator.power Dbus - ${CMAKE_SOURCE_DIR}/data/com.canonical.indicator.power.Battery.xml) + ${CMAKE_SOURCE_DIR}/data/org.ayatana.indicator.power.Battery.xml) add_gdbus_codegen_with_namespace(SERVICE_GENERATED_SOURCES dbus-testing - com.canonical.indicator.power + org.ayatana.indicator.power Dbus - ${CMAKE_SOURCE_DIR}/data/com.canonical.indicator.power.Testing.xml) + ${CMAKE_SOURCE_DIR}/data/org.ayatana.indicator.power.Testing.xml) # add the bin dir to our include path so the code can find the generated header files include_directories(${CMAKE_CURRENT_BINARY_DIR}) @@ -53,4 +53,3 @@ add_executable (${SERVICE_EXEC} main.c) set_source_files_properties(${SERVICE_SOURCES} main.c PROPERTIES COMPILE_FLAGS "${C_WARNING_ARGS} -g -std=c99") target_link_libraries (${SERVICE_EXEC} ${SERVICE_LIB} ${SERVICE_DEPS_LIBRARIES} ${GCOV_LIBS}) install (TARGETS ${SERVICE_EXEC} RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}) - diff --git a/src/brightness.c b/src/brightness.c index eb48515..1f36aca 100644 --- a/src/brightness.c +++ b/src/brightness.c @@ -198,7 +198,7 @@ percentage_to_brightness(IndicatorPowerBrightness * self, double percentage) } /** - * DBus Chatter: com.canonical.powerd + * DBus Chatter: org.ayatana.powerd * * This is used to get default value, and upper and lower bounds, * of the brightness setting @@ -339,7 +339,7 @@ on_powerd_proxy_ready(GObject * source_object G_GNUC_UNUSED, } /** - * DBus Chatter: com.canonical.Unity.Screen + * DBus Chatter: org.ayatana.Unity.Screen * * Used to set the backlight brightness via setUserBrightness */ @@ -374,9 +374,9 @@ set_uscreen_user_brightness(IndicatorPowerBrightness * self, priv_t * p = get_priv(self); g_dbus_connection_call(p->system_bus, - "com.canonical.Unity.Screen", - "/com/canonical/Unity/Screen", - "com.canonical.Unity.Screen", + "org.ayatana.Unity.Screen", + "/org.ayatana.Unity/Screen", + "org.ayatana.Unity.Screen", "setUserBrightness", g_variant_new("(i)", value), NULL, /* no return args */ @@ -463,8 +463,8 @@ indicator_power_brightness_init(IndicatorPowerBrightness * self) dbus_powerd_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES, - "com.canonical.powerd", - "/com/canonical/powerd", + "org.ayatana.powerd", + "/org.ayatana.powerd", p->cancellable, on_powerd_proxy_ready, self); diff --git a/src/dbus-shared.h b/src/dbus-shared.h index bf54034..c87befd 100644 --- a/src/dbus-shared.h +++ b/src/dbus-shared.h @@ -21,8 +21,8 @@ #ifndef DBUS_SHARED_H #define DBUS_SHARED_H -#define BUS_NAME "com.canonical.indicator.power" -#define BUS_PATH "/com/canonical/indicator/power" +#define BUS_NAME "org.ayatana.indicator.power" +#define BUS_PATH "/org/ayatana/indicator/power" #endif /* DBUS_SHARED_H */ diff --git a/src/notifier.c b/src/notifier.c index 4888610..5608662 100644 --- a/src/notifier.c +++ b/src/notifier.c @@ -73,7 +73,7 @@ typedef struct NotifyNotification * notify_notification; GDBusConnection * bus; - DbusBattery * dbus_battery; /* com.canonical.indicator.power.Battery skeleton */ + DbusBattery * dbus_battery; /* org.ayatana.indicator.power.Battery skeleton */ gboolean caps_queried; gboolean actions_supported; @@ -244,10 +244,10 @@ notification_show(IndicatorPowerNotifier * self) if (are_actions_supported(self)) { - notify_notification_set_hint(nn, "x-canonical-snap-decisions", g_variant_new_string("true")); - notify_notification_set_hint(nn, "x-canonical-non-shaped-icon", g_variant_new_string("true")); - notify_notification_set_hint(nn, "x-canonical-private-affirmative-tint", g_variant_new_string("true")); - notify_notification_set_hint(nn, "x-canonical-snap-decisions-timeout", g_variant_new_int32(INT32_MAX)); + notify_notification_set_hint(nn, "x-ayatana-snap-decisions", g_variant_new_string("true")); + notify_notification_set_hint(nn, "x-ayatana-non-shaped-icon", g_variant_new_string("true")); + notify_notification_set_hint(nn, "x-ayatana-private-affirmative-tint", g_variant_new_string("true")); + notify_notification_set_hint(nn, "x-ayatana-snap-decisions-timeout", g_variant_new_int32(INT32_MAX)); notify_notification_set_timeout(nn, NOTIFY_EXPIRES_NEVER); notify_notification_add_action(nn, "dismiss", _("OK"), on_dismiss_clicked, NULL, NULL); notify_notification_add_action(nn, "settings", _("Battery settings"), on_battery_settings_clicked, NULL, NULL); diff --git a/src/com.canonical.powerd.xml b/src/org.ayatana.powerd.xml index b5b4ac4..1d18ca9 100644 --- a/src/com.canonical.powerd.xml +++ b/src/org.ayatana.powerd.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <node name="/"> - <interface name="com.canonical.powerd"> + <interface name="org.ayatana.powerd"> <!-- Properties --> <property name="brightness" type="i" access="readwrite"> diff --git a/src/service.c b/src/service.c index cd0f24e..6bd5959 100644 --- a/src/service.c +++ b/src/service.c @@ -29,8 +29,8 @@ #include "notifier.h" #include "service.h" -#define BUS_NAME "com.canonical.indicator.power" -#define BUS_PATH "/com/canonical/indicator/power" +#define BUS_NAME "org.ayatana.indicator.power" +#define BUS_PATH "/org/ayatana/indicator/power" #define SETTINGS_SHOW_TIME_S "show-time" #define SETTINGS_ICON_POLICY_S "icon-policy" @@ -478,7 +478,7 @@ append_device_to_menu (GMenu * menu, const IndicatorPowerDevice * device, int pr item = g_menu_item_new (label, NULL); g_free (label); - g_menu_item_set_attribute (item, "x-canonical-type", "s", "com.canonical.indicator.basic"); + g_menu_item_set_attribute (item, "x-ayatana-type", "s", "org.ayatana.indicator.basic"); if ((icon = indicator_power_device_get_gicon (device))) { @@ -531,7 +531,7 @@ create_phone_devices_section (IndicatorPowerService * self G_GNUC_UNUSED) menu = g_menu_new (); item = g_menu_item_new (_("Charge level"), "indicator.battery-level"); - g_menu_item_set_attribute (item, "x-canonical-type", "s", "com.canonical.indicator.progress"); + g_menu_item_set_attribute (item, "x-ayatana-type", "s", "org.ayatana.indicator.progress"); g_menu_append_item (menu, item); g_object_unref (item); @@ -552,7 +552,7 @@ create_brightness_menu_item(void) GMenuItem * item; item = g_menu_item_new(NULL, "indicator.brightness"); - g_menu_item_set_attribute(item, "x-canonical-type", "s", "com.canonical.unity.slider"); + g_menu_item_set_attribute(item, "x-ayatana-type", "s", "org.ayatana.unity.slider"); g_menu_item_set_attribute(item, "min-value", "d", 0.0); g_menu_item_set_attribute(item, "max-value", "d", 1.0); @@ -633,7 +633,7 @@ create_phone_settings_section(IndicatorPowerService * self) if (ab_supported) { item = g_menu_item_new(_("Adjust brightness automatically"), "indicator.auto-brightness"); - g_menu_item_set_attribute(item, "x-canonical-type", "s", "com.canonical.indicator.switch"); + g_menu_item_set_attribute(item, "x-ayatana-type", "s", "org.ayatana.indicator.switch"); g_menu_append_item(section, item); g_object_unref(item); } @@ -741,8 +741,8 @@ create_menu (IndicatorPowerService * self, int profile) /* add submenu to the header */ header = g_menu_item_new (NULL, "indicator._header"); - g_menu_item_set_attribute (header, "x-canonical-type", - "s", "com.canonical.indicator.root"); + g_menu_item_set_attribute (header, "x-ayatana-type", + "s", "org.ayatana.indicator.root"); g_menu_item_set_submenu (header, G_MENU_MODEL (submenu)); g_object_unref (submenu); @@ -1176,7 +1176,7 @@ indicator_power_service_init (IndicatorPowerService * self) p->cancellable = g_cancellable_new (); - p->settings = g_settings_new ("com.canonical.indicator.power"); + p->settings = g_settings_new ("org.ayatana.indicator.power"); p->notifier = indicator_power_notifier_new (); diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 02ecb1b..0d3d54a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -20,7 +20,7 @@ set_directory_properties (PROPERTIES set_source_files_properties (gschemas.compiled GENERATED) # GSettings: -# compile the indicator-power schema into a gschemas.compiled file in this directory, +# compile the ayatana-indicator-power schema into a gschemas.compiled file in this directory, # and help the tests to find that file by setting -DSCHEMA_DIR set (SCHEMA_DIR ${CMAKE_CURRENT_BINARY_DIR}) add_definitions(-DSCHEMA_DIR="${SCHEMA_DIR}") @@ -28,7 +28,7 @@ execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compil OUTPUT_VARIABLE COMPILE_SCHEMA_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE) add_custom_command (OUTPUT gschemas.compiled - DEPENDS ${CMAKE_BINARY_DIR}/data/com.canonical.indicator.power.gschema.xml + DEPENDS ${CMAKE_BINARY_DIR}/data/org.ayatana.indicator.power.gschema.xml COMMAND cp -f ${CMAKE_BINARY_DIR}/data/*gschema.xml ${SCHEMA_DIR} COMMAND ${COMPILE_SCHEMA_EXECUTABLE} ${SCHEMA_DIR}) @@ -44,8 +44,8 @@ function(add_test_by_name name) set (TEST_NAME ${name}) add_executable (${TEST_NAME} ${TEST_NAME}.cc gschemas.compiled) add_test (${TEST_NAME} ${TEST_NAME}) - add_dependencies (${TEST_NAME} libindicatorpowerservice) - target_link_libraries (${TEST_NAME} indicatorpowerservice gtest ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBS}) + add_dependencies (${TEST_NAME} libayatanaindicatorpowerservice) + target_link_libraries (${TEST_NAME} ayatanaindicatorpowerservice gtest ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBS}) endfunction() add_test_by_name(test-notify) add_test(NAME dear-reader-the-next-test-takes-80-seconds COMMAND true) diff --git a/tests/manual b/tests/manual index 8a305ac..91d005d 100644 --- a/tests/manual +++ b/tests/manual @@ -3,32 +3,32 @@ Notes on Battery Testing Mock battery propreties are available for testing purposes. -The testing properties are DBus properties published on busname "com.canonical.indicator.power", object path "/com/canonical/indicator/power/Testing", and interface "com.canonical.indicator.power.Testing". The four properties are "MockBatteryEnabled" (boolean, default false), "MockBatteryLevel" (uint32 [0-100], default 50), "MockBatteryState" (string, default 'discharging'), "MockBatteryMinutesLeft" (minutes remaining to charge/discharge, uint32, default 30). +The testing properties are DBus properties published on busname "org.ayatana.indicator.power", object path "/org/ayatana/indicator/power/Testing", and interface "org.ayatana.indicator.power.Testing". The four properties are "MockBatteryEnabled" (boolean, default false), "MockBatteryLevel" (uint32 [0-100], default 50), "MockBatteryState" (string, default 'discharging'), "MockBatteryMinutesLeft" (minutes remaining to charge/discharge, uint32, default 30). Example use: Show the testing properties: -$ gdbus call --session --dest "com.canonical.indicator.power" \ - --object-path /com/canonical/indicator/power/Testing \ +$ gdbus call --session --dest "org.ayatana.indicator.power" \ + --object-path /org/ayatana/indicator/power/Testing \ --method org.freedesktop.DBus.Properties.GetAll \ - com.canonical.indicator.power.Testing + org.ayatana.indicator.power.Testing Enable the mock battery: -$ gdbus call --session --dest "com.canonical.indicator.power" \ - --object-path /com/canonical/indicator/power/Testing \ +$ gdbus call --session --dest "org.ayatana.indicator.power" \ + --object-path /org/ayatana/indicator/power/Testing \ --method org.freedesktop.DBus.Properties.Set \ - com.canonical.indicator.power.Testing \ + org.ayatana.indicator.power.Testing \ MockBatteryEnabled \ "<true>" Set the mock battery's charge to 10% -$ gdbus call --session --dest "com.canonical.indicator.power" \ - --object-path /com/canonical/indicator/power/Testing \ +$ gdbus call --session --dest "org.ayatana.indicator.power" \ + --object-path /org/ayatana/indicator/power/Testing \ --method org.freedesktop.DBus.Properties.Set \ - com.canonical.indicator.power.Testing \ + org.ayatana.indicator.power.Testing \ MockBatteryLevel \ "<uint32 10>" diff --git a/tests/test-device.cc b/tests/test-device.cc index e929f89..5ee9f1e 100644 --- a/tests/test-device.cc +++ b/tests/test-device.cc @@ -48,7 +48,7 @@ class DeviceTest : public ::testing::Test virtual void SetUp() { const GLogLevelFlags flags = GLogLevelFlags(G_LOG_LEVEL_CRITICAL|G_LOG_LEVEL_WARNING); - log_handler_id = g_log_set_handler ("Indicator-Power", flags, log_count_func, this); + log_handler_id = g_log_set_handler ("Ayatana-Indicator-Power", flags, log_count_func, this); log_count_ipower_expected = 0; log_count_ipower_actual = 0; } @@ -56,7 +56,7 @@ class DeviceTest : public ::testing::Test virtual void TearDown() { ASSERT_EQ (log_count_ipower_expected, log_count_ipower_actual); - g_log_remove_handler ("Indicator-Power", log_handler_id); + g_log_remove_handler ("Ayatana-Indicator-Power", log_handler_id); } protected: diff --git a/tests/test-notify.cc b/tests/test-notify.cc index d056f3f..acab34f 100644 --- a/tests/test-notify.cc +++ b/tests/test-notify.cc @@ -61,7 +61,7 @@ protected: static constexpr int NOTIFICATION_CLOSED_API {3}; static constexpr int NOTIFICATION_CLOSED_UNDEFINED {4}; - static constexpr char const * APP_NAME {"indicator-power-service"}; + static constexpr char const * APP_NAME {"ayatana-indicator-power-service"}; static constexpr char const * METHOD_CLOSE {"CloseNotification"}; static constexpr char const * METHOD_NOTIFY {"Notify"}; @@ -69,7 +69,7 @@ protected: static constexpr char const * METHOD_GET_INFO {"GetServerInformation"}; static constexpr char const * SIGNAL_CLOSED {"NotificationClosed"}; - static constexpr char const * HINT_TIMEOUT {"x-canonical-snap-decisions-timeout"}; + static constexpr char const * HINT_TIMEOUT {"x-ayatana-snap-decisions-timeout"}; protected: |