From 282993043650b14736443d9a100311c1fdd1f7d4 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 10 Jan 2014 14:45:41 +1300 Subject: Support both gnome-control-center and unity-control-center --- data/CMakeLists.txt | 23 ++++++++++++++++++++++- data/unity-datetime-panel.desktop.in | 13 +++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 data/unity-datetime-panel.desktop.in (limited to 'data') diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index ab393a7..a3360cb 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -72,7 +72,7 @@ if (BUILD_PANEL) # the .ui file install (FILES "datetime-dialog.ui" - DESTINATION "${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}") + DESTINATION "${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}/gnome-control-center") # the .desktop file set (DESKTOP_NAME "gnome-indicator-datetime-panel.desktop") @@ -84,3 +84,24 @@ if (BUILD_PANEL) DESTINATION "${CMAKE_INSTALL_DATADIR}/applications") endif () + +## +## unity-control-center panel: .ui and .desktop files +## + +if (BUILD_UNITY_PANEL) + + # the .ui file + install (FILES "datetime-dialog.ui" + DESTINATION "${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}/unity-control-center") + + # the .desktop file + set (DESKTOP_NAME "unity-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/unity-datetime-panel.desktop.in b/data/unity-datetime-panel.desktop.in new file mode 100644 index 0000000..6e7b252 --- /dev/null +++ b/data/unity-datetime-panel.desktop.in @@ -0,0 +1,13 @@ +[Desktop Entry] +Version=1.0 +_Name=Time & Date +_Comment=Change your clock and date settings +Icon=preferences-system-time +TryExec=unity-control-center +Exec=unity-control-center indicator-datetime +StartupNotify=true +Type=Application +Categories=GNOME;GTK;Utility;DesktopSettings;Settings;X-GNOME-SystemSettings;X-Unity-Settings-Panel; +X-Unity-Settings-Panel=indicator-datetime +OnlyShowIn=Unity; +X-Ubuntu-Gettext-Domain=indicator-datetime -- cgit v1.2.3