aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-02-15 16:31:31 -0600
committerCharles Kerr <charles.kerr@canonical.com>2012-02-15 16:31:31 -0600
commitb18a7b815228aa5fdbfee6272fdcc621becbf3b8 (patch)
treea0ac50094bd2e0c2d408e5828ea85b8ed7e09b81 /src
parented432b431805543fd27b991aeab7908fabe74ae0 (diff)
parent78e082682d5d833fd271899b67d6a203acffa803 (diff)
downloadayatana-indicator-datetime-b18a7b815228aa5fdbfee6272fdcc621becbf3b8.tar.gz
ayatana-indicator-datetime-b18a7b815228aa5fdbfee6272fdcc621becbf3b8.tar.bz2
ayatana-indicator-datetime-b18a7b815228aa5fdbfee6272fdcc621becbf3b8.zip
lp:~ballogy/indicator-datetime/make-ccpanel-optional
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am4
-rw-r--r--src/datetime-service.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 328f279..e2d9a92 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,8 @@
+if BUILD_CCPANEL
ccpaneldir = $(CCPANELDIR)
ccpanel_LTLIBRARIES = libindicator-datetime.la
+endif
libexec_PROGRAMS = indicator-datetime-service
@@ -42,6 +44,7 @@ libdatetime_la_LDFLAGS = \
-module \
-avoid-version
+if BUILD_CCPANEL
libindicator_datetime_la_SOURCES =\
datetime-prefs.c \
datetime-prefs-locations.c \
@@ -58,6 +61,7 @@ libindicator_datetime_la_CFLAGS = \
libindicator_datetime_la_LIBADD = \
$(PREF_LIBS)
libindicator_datetime_la_LDFLAGS = -module -avoid-version
+endif
gen-%.xml.c: %.xml
@echo "Building $@ from $<"
diff --git a/src/datetime-service.c b/src/datetime-service.c
index dfce637..ef43594 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -54,6 +54,11 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include "settings-shared.h"
#include "utils.h"
+#ifdef HAVE_CCPANEL
+ #define SETTINGS_APP_INVOCATION "gnome-control-center indicator-datetime"
+#else
+ #define SETTINGS_APP_INVOCATION "gnome-control-center datetime"
+#endif
static void geo_create_client (GeoclueMaster * master, GeoclueMasterClient * client, gchar * path, GError * error, gpointer user_data);
static gboolean update_appointment_menu_items (gpointer user_data);
@@ -1167,7 +1172,7 @@ build_menus (DbusmenuMenuitem * root)
dbusmenu_menuitem_property_set (settings, DBUSMENU_MENUITEM_PROP_LABEL, _("Time & Date Settingsā€¦"));
/* insensitive until we check for available apps */
dbusmenu_menuitem_property_set_bool(settings, DBUSMENU_MENUITEM_PROP_ENABLED, FALSE);
- g_signal_connect(G_OBJECT(settings), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(activate_cb), "gnome-control-center indicator-datetime");
+ g_signal_connect(G_OBJECT(settings), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(activate_cb), SETTINGS_APP_INVOCATION);
dbusmenu_menuitem_child_append(root, settings);
g_idle_add(check_for_timeadmin, NULL);
}