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 --- panel/CMakeLists.txt | 25 ------------------------- panel/datetime-prefs.c | 10 +++++++++- 2 files changed, 9 insertions(+), 26 deletions(-) delete mode 100644 panel/CMakeLists.txt (limited to 'panel') diff --git a/panel/CMakeLists.txt b/panel/CMakeLists.txt deleted file mode 100644 index b3fcc7b..0000000 --- a/panel/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -set (PANEL_LIB "indicator-datetime") - -add_definitions (-DPKGDATADIR="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}") - -add_library (${PANEL_LIB} SHARED - datetime-prefs.c - datetime-prefs-locations.c - datetime-prefs-locations.h - ${CMAKE_SOURCE_DIR}/src/utils.c - ${CMAKE_SOURCE_DIR}/src/utils.h - ${CMAKE_SOURCE_DIR}/src/settings-shared.h) - -include_directories (${PANEL_DEPS_INCLUDE_DIRS}) - -link_directories (${PANEL_DEPS_LIBRARY_DIRS}) - -set_property (TARGET ${PANEL_LIB} - APPEND_STRING PROPERTY COMPILE_FLAGS - " -g ${CC_WARNING_ARGS} ${GCOV_FLAGS}") - -target_link_libraries (${PANEL_LIB} ${PANEL_DEPS_LIBRARIES} ${GCOV_LIBS}) - -install (TARGETS ${PANEL_LIB} - DESTINATION ${CMAKE_INSTALL_LIBDIR}/control-center-1/panels) - diff --git a/panel/datetime-prefs.c b/panel/datetime-prefs.c index 55456ac..c1e70b1 100644 --- a/panel/datetime-prefs.c +++ b/panel/datetime-prefs.c @@ -33,7 +33,11 @@ with this program. If not, see . #include #include #include +#if USE_UNITY +#include +#else #include +#endif #include #include @@ -42,7 +46,11 @@ with this program. If not, see . #include "utils.h" #include "datetime-prefs-locations.h" -#define DATETIME_DIALOG_UI_FILE PKGDATADIR "/datetime-dialog.ui" +#if USE_UNITY +#define DATETIME_DIALOG_UI_FILE PKGDATADIR "/unity-control-center/datetime-dialog.ui" +#else +#define DATETIME_DIALOG_UI_FILE PKGDATADIR "/gnome-control-center/datetime-dialog.ui" +#endif #define INDICATOR_DATETIME_TYPE_PANEL indicator_datetime_panel_get_type() -- cgit v1.2.3