diff options
author | Ted Gould <ted@gould.cx> | 2014-09-08 22:58:48 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2014-09-08 22:58:48 -0500 |
commit | 334e3b3130cbde5a96e6da5323d40418db80f8ef (patch) | |
tree | 299d5e2a5cdaab892fe7c92b9405f721635124e3 /data | |
parent | cc51d0fc02f2980cc08fcd6cfc929ea61ff9d93a (diff) | |
parent | 059246d136ed8c24c5e78e6a966bf2dfc945fe4e (diff) | |
download | ayatana-indicator-power-334e3b3130cbde5a96e6da5323d40418db80f8ef.tar.gz ayatana-indicator-power-334e3b3130cbde5a96e6da5323d40418db80f8ef.tar.bz2 ayatana-indicator-power-334e3b3130cbde5a96e6da5323d40418db80f8ef.zip |
Merge trunk
Diffstat (limited to 'data')
-rw-r--r-- | data/CMakeLists.txt | 90 | ||||
-rw-r--r-- | data/Makefile.am | 60 | ||||
-rw-r--r-- | data/com.canonical.indicator.power | 6 | ||||
-rw-r--r-- | data/com.canonical.indicator.power.Battery.xml | 23 | ||||
-rw-r--r-- | data/indicator-power.upstart.desktop.in (renamed from data/upstart/indicator-power.desktop.in) | 3 | ||||
-rw-r--r-- | data/upstart/Makefile.am | 17 |
6 files changed, 121 insertions, 78 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt new file mode 100644 index 0000000..0750128 --- /dev/null +++ b/data/CMakeLists.txt @@ -0,0 +1,90 @@ +## +## GSettings schema +## + +include (UseGSettings) +set (SCHEMA_NAME "com.canonical.indicator.power.gschema.xml") +set (SCHEMA_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SCHEMA_NAME}") +set (SCHEMA_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME}.in") + +# generate the .xml file using intltool +set (ENV{LC_ALL} "C") +execute_process (COMMAND intltool-merge -quiet --xml-style --utf8 --no-translations "${SCHEMA_FILE_IN}" "${SCHEMA_FILE}") + +# let UseGSettings do the rest +add_schema (${SCHEMA_FILE}) + +## +## Upstart Job File +## + +# where to install +set (UPSTART_JOB_DIR "${CMAKE_INSTALL_FULL_DATADIR}/upstart/sessions") +message (STATUS "${UPSTART_JOB_DIR} is the Upstart Job File install dir") + +set (UPSTART_JOB_NAME "${CMAKE_PROJECT_NAME}.conf") +set (UPSTART_JOB_FILE "${CMAKE_CURRENT_BINARY_DIR}/${UPSTART_JOB_NAME}") +set (UPSTART_JOB_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${UPSTART_JOB_NAME}.in") + +# build it +set (pkglibexecdir "${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}") +configure_file ("${UPSTART_JOB_FILE_IN}" "${UPSTART_JOB_FILE}") + +# install it +install (FILES "${UPSTART_JOB_FILE}" + DESTINATION "${UPSTART_JOB_DIR}") + +## +## XDG Autostart File +## + +# where to install +set (XDG_AUTOSTART_DIR "/etc/xdg/autostart") +message (STATUS "${XDG_AUTOSTART_DIR} is the DBus Service File install dir") + +set (XDG_AUTOSTART_NAME "${CMAKE_PROJECT_NAME}.desktop") +set (XDG_AUTOSTART_FILE "${CMAKE_CURRENT_BINARY_DIR}/${XDG_AUTOSTART_NAME}") +set (XDG_AUTOSTART_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${XDG_AUTOSTART_NAME}.in") + +# build it +set (pkglibexecdir "${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}") +configure_file ("${XDG_AUTOSTART_FILE_IN}" "${XDG_AUTOSTART_FILE}") + +# install it +install (FILES "${XDG_AUTOSTART_FILE}" + DESTINATION "${XDG_AUTOSTART_DIR}") + +## +## Upstart XDG Autostart Override +## + +# where to install +set (UPSTART_XDG_AUTOSTART_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/upstart/xdg/autostart") +message (STATUS "${UPSTART_XDG_AUTOSTART_DIR} is the Upstart XDG autostart override dir") + +set (UPSTART_XDG_AUTOSTART_NAME "${CMAKE_PROJECT_NAME}.upstart.desktop") +set (UPSTART_XDG_AUTOSTART_FILE "${CMAKE_CURRENT_BINARY_DIR}/${UPSTART_XDG_AUTOSTART_NAME}") +set (UPSTART_XDG_AUTOSTART_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${UPSTART_XDG_AUTOSTART_NAME}.in") + +# build it +set (pkglibexecdir "${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}") +configure_file ("${UPSTART_XDG_AUTOSTART_FILE_IN}" "${UPSTART_XDG_AUTOSTART_FILE}") + +# install it +install (FILES "${UPSTART_XDG_AUTOSTART_FILE}" + DESTINATION "${UPSTART_XDG_AUTOSTART_DIR}" + RENAME "${XDG_AUTOSTART_NAME}") + +## +## Unity Indicator 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 (UNITY_INDICATOR_NAME "com.canonical.indicator.power") +set (UNITY_INDICATOR_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${UNITY_INDICATOR_NAME}") + +install (FILES "${UNITY_INDICATOR_FILE}" + DESTINATION "${UNITY_INDICATOR_DIR}") diff --git a/data/Makefile.am b/data/Makefile.am deleted file mode 100644 index 6ecd4c5..0000000 --- a/data/Makefile.am +++ /dev/null @@ -1,60 +0,0 @@ -BUILT_SOURCES= -CLEANFILES= -EXTRA_DIST= - -SUBDIRS = upstart - -# -# the indicator bus file -# - -indicatorsdir = $(prefix)/share/unity/indicators -dist_indicators_DATA = com.canonical.indicator.power - -# -# the upstart job file -# - -upstart_jobsdir = $(datadir)/upstart/sessions -upstart_jobs_DATA = indicator-power.conf -upstart_jobs_in = $(upstart_jobs_DATA:.conf=.conf.in) -$(upstart_jobs_DATA): $(upstart_jobs_in) - $(AM_V_GEN) $(SED) -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@ -BUILT_SOURCES += $(upstart_jobs_DATA) -CLEANFILES += $(upstart_jobs_DATA) -EXTRA_DIST += $(upstart_jobs_in) - -# -# the xdg autostart job file -# - -xdg_autostartdir = /etc/xdg/autostart -xdg_autostart_DATA = indicator-power.desktop -xdg_autostart_in = $(xdg_autostart_DATA:.desktop=.desktop.in) -$(xdg_autostart_DATA): $(xdg_autostart_in) - $(AM_V_GEN) $(SED) -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@ -BUILT_SOURCES += $(xdg_autostart_DATA) -CLEANFILES += $(xdg_autostart_DATA) -EXTRA_DIST += $(xdg_autostart_in) - -# -# the gettings -# - -gsettings_in_file = com.canonical.indicator.power.gschema.xml.in -gsettings_SCHEMAS = $(gsettings_in_file:.xml.in=.xml) -CLEANFILES += $(gsettings_SCHEMAS) - -@INTLTOOL_XML_NOMERGE_RULE@ - -@GSETTINGS_RULES@ - -dist_noinst_DATA = \ - com.canonical.indicator.power.gschema.xml \ - $(gsettings_in_file) - -CLEANFILES += \ - $(gsettings_SCHEMAS) - -MAINTAINERCLEANFILES = \ - $(gsettings_SCHEMAS:.xml=.valid) diff --git a/data/com.canonical.indicator.power b/data/com.canonical.indicator.power index 65fd646..12e158a 100644 --- a/data/com.canonical.indicator.power +++ b/data/com.canonical.indicator.power @@ -12,5 +12,11 @@ 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/desktop_greeter + +[ubiquity] +ObjectPath=/com/canonical/indicator/power/desktop_greeter diff --git a/data/com.canonical.indicator.power.Battery.xml b/data/com.canonical.indicator.power.Battery.xml new file mode 100644 index 0000000..eca4524 --- /dev/null +++ b/data/com.canonical.indicator.power.Battery.xml @@ -0,0 +1,23 @@ +<?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"> + + <property name="PowerLevel" type="s" access="read"> + <doc:doc> + <doc:description> + <doc:para>The battery's power level. Possible values: 'ok', 'low', 'very_low', 'critical'</doc:para> + </doc:description> + </doc:doc> + </property> + + <property name="IsWarning" type="b" access="read"> + <doc:doc> + <doc:description> + <doc:para>Whether or not indicator-power-service is warning the user about low battery power.</doc:para> + </doc:description> + </doc:doc> + </property> + + </interface> +</node> diff --git a/data/upstart/indicator-power.desktop.in b/data/indicator-power.upstart.desktop.in index 08ce2fa..5f95f8e 100644 --- a/data/upstart/indicator-power.desktop.in +++ b/data/indicator-power.upstart.desktop.in @@ -2,8 +2,9 @@ Type=Application Name=Indicator Power Exec=@pkglibexecdir@/indicator-power-service -OnlyShowIn=Unity; +OnlyShowIn=Unity;GNOME; NoDisplay=true StartupNotify=false Terminal=false +AutostartCondition=GNOME3 unless-session gnome Hidden=true diff --git a/data/upstart/Makefile.am b/data/upstart/Makefile.am deleted file mode 100644 index 1259a88..0000000 --- a/data/upstart/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -BUILT_SOURCES= -CLEANFILES= -EXTRA_DIST= - -# -# the upstart xdg autostart override -# - -xdg_autostartdir = $(datadir)/upstart/xdg/autostart -xdg_autostart_DATA = indicator-power.desktop -xdg_autostart_in = $(xdg_autostart_DATA:.desktop=.desktop.in) -$(xdg_autostart_DATA): $(xdg_autostart_in) - $(AM_V_GEN) $(SED) -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@ -BUILT_SOURCES += $(xdg_autostart_DATA) -CLEANFILES += $(xdg_autostart_DATA) -EXTRA_DIST += $(xdg_autostart_in) - |