aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2013-10-31 11:40:41 -0700
committerTed Gould <ted@gould.cx>2013-10-31 11:40:41 -0700
commiteb47d698341bc8f1b46433c48fc280d5a4906ad3 (patch)
tree04e18a96bcad6c22f5079a517c5c8927d1ac49cd /data
parenta4a5562fd93fdd6d9cb4b9cde98126fdca3ea21d (diff)
parent0439dc69bfd71c42d01b7d11cb586ef056503b28 (diff)
downloadayatana-indicator-datetime-eb47d698341bc8f1b46433c48fc280d5a4906ad3.tar.gz
ayatana-indicator-datetime-eb47d698341bc8f1b46433c48fc280d5a4906ad3.tar.bz2
ayatana-indicator-datetime-eb47d698341bc8f1b46433c48fc280d5a4906ad3.zip
Merge trunk
Diffstat (limited to 'data')
-rw-r--r--data/CMakeLists.txt86
-rw-r--r--data/Makefile.am58
-rw-r--r--data/com.canonical.indicator.datetime.gschema.xml9
-rw-r--r--data/datetime-dialog.ui45
-rw-r--r--data/indicator-datetime.conf.in2
-rw-r--r--data/indicator-datetime.desktop.in2
6 files changed, 139 insertions, 63 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
new file mode 100644
index 0000000..1bd74d6
--- /dev/null
+++ b/data/CMakeLists.txt
@@ -0,0 +1,86 @@
+##
+## GSettings schema
+##
+
+include (UseGSettings)
+set (SCHEMA_NAME "com.canonical.indicator.datetime.gschema.xml")
+set (SCHEMA_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME}")
+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 "${CMAKE_INSTALL_FULL_DATADIR}/dbus-1/services")
+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}")
+
+
+##
+## 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.datetime")
+set (UNITY_INDICATOR_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${UNITY_INDICATOR_NAME}")
+
+install (FILES "${UNITY_INDICATOR_FILE}"
+ DESTINATION "${UNITY_INDICATOR_DIR}")
+
+
+##
+## gnome-control-center panel: .ui and .desktop files
+##
+
+if (BUILD_PANEL)
+
+ # the .ui file
+ install (FILES "datetime-dialog.ui"
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}")
+
+ # the .desktop file
+ set (DESKTOP_NAME "gnome-indicator-datetime-panel.desktop")
+ set (DESKTOP_FILE "${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_NAME}")
+ set (DESKTOP_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${DESKTOP_NAME}.in")
+ set (ENV{LC_ALL} "C")
+ execute_process (COMMAND intltool-merge -quiet --desktop-style --utf8 "${CMAKE_SOURCE_DIR}/po" "${DESKTOP_FILE_IN}" "${DESKTOP_FILE}")
+ install (FILES ${DESKTOP_FILE}
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/applications")
+
+endif ()
diff --git a/data/Makefile.am b/data/Makefile.am
deleted file mode 100644
index daaac51..0000000
--- a/data/Makefile.am
+++ /dev/null
@@ -1,58 +0,0 @@
-BUILT_SOURCES=
-CLEANFILES=
-EXTRA_DIST=
-
-#
-# the indicator bus file
-#
-
-indicatorsdir = $(prefix)/share/unity/indicators
-dist_indicators_DATA = com.canonical.indicator.datetime
-
-#
-# the gsettings
-#
-
-gsettings_SCHEMAS = com.canonical.indicator.datetime.gschema.xml
-@GSETTINGS_RULES@
-EXTRA_DIST += $(gsettings_SCHEMAS)
-
-#
-# the upstart job file
-#
-
-upstart_jobsdir = $(datadir)/upstart/sessions
-upstart_jobs_DATA = indicator-datetime.conf
-upstart_jobs_in = $(upstart_jobs_DATA:.conf=.conf.in)
-$(upstart_jobs_DATA): $(upstart_jobs_in)
- $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
-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-datetime.desktop
-xdg_autostart_in = $(xdg_autostart_DATA:.desktop=.desktop.in)
-$(xdg_autostart_DATA): $(xdg_autostart_in)
- $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
-BUILT_SOURCES += $(xdg_autostart_DATA)
-CLEANFILES += $(xdg_autostart_DATA)
-EXTRA_DIST += $(xdg_autostart_in)
-
-#
-# the gnome-control-center panel
-#
-
-if BUILD_CCPANEL
- pkgdata_DATA = datetime-dialog.ui
- @INTLTOOL_DESKTOP_RULE@
- desktopdir = $(datadir)/applications
- desktop_DATA = gnome-indicator-datetime-panel.desktop
- EXTRA_DIST += $(desktop_DATA)
- CLEANFILES += $(desktop_DATA)
-endif
-EXTRA_DIST += datetime-dialog.ui $(desktop_DATA:.desktop=.desktop.in)
diff --git a/data/com.canonical.indicator.datetime.gschema.xml b/data/com.canonical.indicator.datetime.gschema.xml
index 4f831d5..1a5922c 100644
--- a/data/com.canonical.indicator.datetime.gschema.xml
+++ b/data/com.canonical.indicator.datetime.gschema.xml
@@ -64,6 +64,15 @@
time-format value is set to custom.
</description>
</key>
+ <key name="show-year" type="b">
+ <default>false</default>
+ <summary>Show the year in the indicator</summary>
+ <description>
+ Puts the year in the panel along with the month and the date.
+ This setting will be ignored if either the time-format value is set to custom
+ or if show-date is set to false.
+ </description>
+ </key>
<key name="show-calendar" type="b">
<default>true</default>
<summary>Show the monthly calendar in the indicator</summary>
diff --git a/data/datetime-dialog.ui b/data/datetime-dialog.ui
index 430f77f..6f74cd0 100644
--- a/data/datetime-dialog.ui
+++ b/data/datetime-dialog.ui
@@ -529,7 +529,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="showDateTimeCheck">
+ <object class="GtkCheckButton" id="showDateAndMonthCheck">
<property name="label" translatable="yes">_Date and month</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -546,6 +546,45 @@
</packing>
</child>
<child>
+ <object class="GtkAlignment" id="showYearAlignment">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="yscale">0</property>
+ <property name="left_padding">24</property>
+ <child>
+ <object class="GtkVBox" id="showYearVbox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="showYearCheck">
+ <property name="label" translatable="yes">_Year</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkVBox" id="vbox5">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -589,7 +628,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
@@ -606,7 +645,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">4</property>
+ <property name="position">5</property>
</packing>
</child>
</object>
diff --git a/data/indicator-datetime.conf.in b/data/indicator-datetime.conf.in
index e53fc1c..ab9cfd6 100644
--- a/data/indicator-datetime.conf.in
+++ b/data/indicator-datetime.conf.in
@@ -5,4 +5,4 @@ stop on desktop-end or indicator-services-end
respawn
-exec @libexecdir@/indicator-datetime-service
+exec @pkglibexecdir@/indicator-datetime-service
diff --git a/data/indicator-datetime.desktop.in b/data/indicator-datetime.desktop.in
index 90ea7f0..5362af9 100644
--- a/data/indicator-datetime.desktop.in
+++ b/data/indicator-datetime.desktop.in
@@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
Name=Indicator Date & Time
-Exec=@libexecdir@/indicator-datetime-service
+Exec=@pkglibexecdir@/indicator-datetime-service
NotShowIn=Unity;
NoDisplay=true
StartupNotify=false