aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog20
-rw-r--r--INSTALL97
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in1
-rwxr-xr-xautogen.sh11
-rw-r--r--debian/changelog6
-rw-r--r--po/POTFILES.in2
-rw-r--r--src/Makefile.am13
-rw-r--r--src/Makefile.in137
-rw-r--r--src/datetime-service.c7
-rw-r--r--src/indicator-datetime.c108
11 files changed, 289 insertions, 115 deletions
diff --git a/ChangeLog b/ChangeLog
index 989bb93..2f4309c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
# Generated by Makefile. Do not edit.
+2010-02-22 Ted Gould <ted@gould.cx>
+
+ Fix build to include the source files
+
+2010-02-18 Ted Gould <ted@gould.cx>
+
+ Adding autogen.sh to dist
+
+2010-02-17 Ted Gould <ted@gould.cx>
+
+ Date menuitem, calendar menuitem and time settings menuitem.
+
+2010-02-17 David Barth <david.barth@canonical.com>
+
+ checks for evolution and provides a calendar option
+
+2010-02-15 David Barth <david.barth@canonical.com>
+
+ add date & settings option
+
2010-01-07 Ted Gould <ted@gould.cx>
Adding the loadable indicator.
diff --git a/INSTALL b/INSTALL
index 7d1c323..2550dab 100644
--- a/INSTALL
+++ b/INSTALL
@@ -4,10 +4,8 @@ Installation Instructions
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007, 2008, 2009 Free Software Foundation, Inc.
- Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved. This file is offered as-is,
-without warranty of any kind.
+ This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
Basic Installation
==================
@@ -15,11 +13,7 @@ Basic Installation
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
-instructions specific to this package. Some packages provide this
-`INSTALL' file but do not implement all of the features documented
-below. The lack of an optional feature in a given package is not
-necessarily a bug. More recommendations for GNU packages can be found
-in *note Makefile Conventions: (standards)Makefile Conventions.
+instructions specific to this package.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
@@ -48,7 +42,7 @@ may remove or edit it.
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
- The simplest way to compile this package is:
+The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
@@ -59,22 +53,12 @@ of `autoconf'.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
- the package, generally using the just-built uninstalled binaries.
+ the package.
4. Type `make install' to install the programs and any data files and
- documentation. When installing into a prefix owned by root, it is
- recommended that the package be configured and built as a regular
- user, and only the `make install' phase executed with root
- privileges.
-
- 5. Optionally, type `make installcheck' to repeat any self-tests, but
- this time using the binaries in their final installed location.
- This target does not install anything. Running this target as a
- regular user, particularly if the prior `make install' required
- root privileges, verifies that the installation completed
- correctly.
-
- 6. You can remove the program binaries and object files from the
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
@@ -83,15 +67,8 @@ of `autoconf'.
all sorts of other programs in order to regenerate files that came
with the distribution.
- 7. Often, you can also type `make uninstall' to remove the installed
- files again. In practice, not all packages have tested that
- uninstallation works correctly, even though it is required by the
- GNU Coding Standards.
-
- 8. Some packages, particularly those that use Automake, provide `make
- distcheck', which can by used by developers to test that all other
- targets like `make install' and `make uninstall' work correctly.
- This target is generally not run by end users.
+ 6. Often, you can also type `make uninstall' to remove the installed
+ files again.
Compilers and Options
=====================
@@ -116,8 +93,7 @@ same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'. This
-is known as a "VPATH" build.
+source code in the directory that `configure' is in and in `..'.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
@@ -144,8 +120,7 @@ Installation Names
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX', where PREFIX must be an
-absolute file name.
+`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
@@ -156,46 +131,15 @@ Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them. In general, the
-default for these options is expressed in terms of `${prefix}', so that
-specifying just `--prefix' will affect all of the other directory
-specifications that were not explicitly provided.
-
- The most portable way to affect installation locations is to pass the
-correct locations to `configure'; however, many packages provide one or
-both of the following shortcuts of passing variable assignments to the
-`make install' command line to change installation locations without
-having to reconfigure or recompile.
-
- The first method involves providing an override variable for each
-affected directory. For example, `make install
-prefix=/alternate/directory' will choose an alternate location for all
-directory configuration variables that were expressed in terms of
-`${prefix}'. Any directories that were specified during `configure',
-but not in terms of `${prefix}', must each be overridden at install
-time for the entire installation to be relocated. The approach of
-makefile variable overrides for each directory variable is required by
-the GNU Coding Standards, and ideally causes no recompilation.
-However, some platforms have known limitations with the semantics of
-shared libraries that end up requiring recompilation when using this
-method, particularly noticeable in packages that use GNU Libtool.
-
- The second method involves providing the `DESTDIR' variable. For
-example, `make install DESTDIR=/alternate/directory' will prepend
-`/alternate/directory' before all installation names. The approach of
-`DESTDIR' overrides is not required by the GNU Coding Standards, and
-does not work on platforms that have drive letters. On the other hand,
-it does better at avoiding recompilation issues, and works well even
-when some directory options were not specified in terms of `${prefix}'
-at `configure' time.
-
-Optional Features
-=================
+you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+Optional Features
+=================
+
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
@@ -208,13 +152,6 @@ find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
- Some packages offer the ability to configure how verbose the
-execution of `make' will be. For these packages, running `./configure
---enable-silent-rules' sets the default to minimal output, which can be
-overridden with `make V=1'; while running `./configure
---disable-silent-rules' sets the default to verbose, which can be
-overridden with `make V=0'.
-
Particular systems
==================
@@ -351,7 +288,7 @@ operates.
`configure' can determine that directory automatically.
`--prefix=DIR'
- Use DIR as the installation prefix. *note Installation Names::
+ Use DIR as the installation prefix. *Note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
diff --git a/Makefile.am b/Makefile.am
index a96836c..4b2bca4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,6 +7,8 @@ SUBDIRS = \
DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall
+EXTRA_DIST = autogen.sh
+
dist-hook:
@if test -d "$(top_srcdir)/.bzr"; \
then \
diff --git a/Makefile.in b/Makefile.in
index 0926939..5e4ef8b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -263,6 +263,7 @@ SUBDIRS = \
po
DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall
+EXTRA_DIST = autogen.sh
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..381a739
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+PKG_NAME="indicator-datetime"
+
+which gnome-autogen.sh || {
+ echo "You need gnome-common from GNOME SVN"
+ exit 1
+}
+
+USE_GNOME2_MACROS=1 \
+. gnome-autogen.sh $@
diff --git a/debian/changelog b/debian/changelog
index 8bb1a90..e8e7d2a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+indicator-datetime (0.0.1-0ubuntu1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- Didier Roche <didrocks@ubuntu.com> Fri, 26 Feb 2010 10:39:44 +0100
+
indicator-datetime (0.0.1~r2-0ubuntu2) lucid; urgency=low
* debian/control:
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e69de29..41324a7 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -0,0 +1,2 @@
+src/indicator-datetime.c
+src/datetime-service.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 390f89a..bf9093d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,15 @@
+libexec_PROGRAMS = indicator-datetime-service
+
+indicator_datetime_service_SOURCES = \
+ datetime-service.c
+indicator_datetime_service_CFLAGS = \
+ -Wall \
+ -Werror \
+ $(INDICATOR_CFLAGS)
+indicator_datetime_service_LDADD = \
+ $(INDICATOR_LIBS)
+
datetimelibdir = $(INDICATORDIR)
datetimelib_LTLIBRARIES = libdatetime.la
libdatetime_la_SOURCES = \
@@ -11,3 +22,5 @@ libdatetime_la_LIBADD = \
libdatetime_la_LDFLAGS = \
-module \
-avoid-version
+
+EXTRA_DIST = $(libdatetime_la_SOURCES)
diff --git a/src/Makefile.in b/src/Makefile.in
index f3ad827..80e7b27 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -15,6 +15,7 @@
@SET_MAKE@
+
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -34,6 +35,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+libexec_PROGRAMS = indicator-datetime-service$(EXEEXT)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -68,7 +70,8 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(datetimelibdir)"
+am__installdirs = "$(DESTDIR)$(datetimelibdir)" \
+ "$(DESTDIR)$(libexecdir)"
LTLIBRARIES = $(datetimelib_LTLIBRARIES)
am__DEPENDENCIES_1 =
libdatetime_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
@@ -81,6 +84,16 @@ libdatetime_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(libdatetime_la_CFLAGS) $(CFLAGS) $(libdatetime_la_LDFLAGS) \
$(LDFLAGS) -o $@
+PROGRAMS = $(libexec_PROGRAMS)
+am_indicator_datetime_service_OBJECTS = \
+ indicator_datetime_service-datetime-service.$(OBJEXT)
+indicator_datetime_service_OBJECTS = \
+ $(am_indicator_datetime_service_OBJECTS)
+indicator_datetime_service_DEPENDENCIES = $(am__DEPENDENCIES_1)
+indicator_datetime_service_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(indicator_datetime_service_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -107,8 +120,10 @@ am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
-SOURCES = $(libdatetime_la_SOURCES)
-DIST_SOURCES = $(libdatetime_la_SOURCES)
+SOURCES = $(libdatetime_la_SOURCES) \
+ $(indicator_datetime_service_SOURCES)
+DIST_SOURCES = $(libdatetime_la_SOURCES) \
+ $(indicator_datetime_service_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -257,6 +272,17 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+indicator_datetime_service_SOURCES = \
+ datetime-service.c
+
+indicator_datetime_service_CFLAGS = \
+ -Wall \
+ -Werror \
+ $(INDICATOR_CFLAGS)
+
+indicator_datetime_service_LDADD = \
+ $(INDICATOR_LIBS)
+
datetimelibdir = $(INDICATORDIR)
datetimelib_LTLIBRARIES = libdatetime.la
libdatetime_la_SOURCES = \
@@ -273,6 +299,7 @@ libdatetime_la_LDFLAGS = \
-module \
-avoid-version
+EXTRA_DIST = $(libdatetime_la_SOURCES)
all: all-am
.SUFFIXES:
@@ -340,6 +367,52 @@ clean-datetimelibLTLIBRARIES:
done
libdatetime.la: $(libdatetime_la_OBJECTS) $(libdatetime_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdatetime_la_LINK) -rpath $(datetimelibdir) $(libdatetime_la_OBJECTS) $(libdatetime_la_LIBADD) $(LIBS)
+install-libexecPROGRAMS: $(libexec_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+
+clean-libexecPROGRAMS:
+ @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+indicator-datetime-service$(EXEEXT): $(indicator_datetime_service_OBJECTS) $(indicator_datetime_service_DEPENDENCIES)
+ @rm -f indicator-datetime-service$(EXEEXT)
+ $(AM_V_CCLD)$(indicator_datetime_service_LINK) $(indicator_datetime_service_OBJECTS) $(indicator_datetime_service_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -347,6 +420,7 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_datetime_service-datetime-service.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdatetime_la-indicator-datetime.Plo@am__quote@
.c.o:
@@ -381,6 +455,22 @@ libdatetime_la-indicator-datetime.lo: indicator-datetime.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdatetime_la_CFLAGS) $(CFLAGS) -c -o libdatetime_la-indicator-datetime.lo `test -f 'indicator-datetime.c' || echo '$(srcdir)/'`indicator-datetime.c
+indicator_datetime_service-datetime-service.o: datetime-service.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_datetime_service_CFLAGS) $(CFLAGS) -MT indicator_datetime_service-datetime-service.o -MD -MP -MF $(DEPDIR)/indicator_datetime_service-datetime-service.Tpo -c -o indicator_datetime_service-datetime-service.o `test -f 'datetime-service.c' || echo '$(srcdir)/'`datetime-service.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_datetime_service-datetime-service.Tpo $(DEPDIR)/indicator_datetime_service-datetime-service.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='datetime-service.c' object='indicator_datetime_service-datetime-service.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_datetime_service_CFLAGS) $(CFLAGS) -c -o indicator_datetime_service-datetime-service.o `test -f 'datetime-service.c' || echo '$(srcdir)/'`datetime-service.c
+
+indicator_datetime_service-datetime-service.obj: datetime-service.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_datetime_service_CFLAGS) $(CFLAGS) -MT indicator_datetime_service-datetime-service.obj -MD -MP -MF $(DEPDIR)/indicator_datetime_service-datetime-service.Tpo -c -o indicator_datetime_service-datetime-service.obj `if test -f 'datetime-service.c'; then $(CYGPATH_W) 'datetime-service.c'; else $(CYGPATH_W) '$(srcdir)/datetime-service.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_datetime_service-datetime-service.Tpo $(DEPDIR)/indicator_datetime_service-datetime-service.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='datetime-service.c' object='indicator_datetime_service-datetime-service.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_datetime_service_CFLAGS) $(CFLAGS) -c -o indicator_datetime_service-datetime-service.obj `if test -f 'datetime-service.c'; then $(CYGPATH_W) 'datetime-service.c'; else $(CYGPATH_W) '$(srcdir)/datetime-service.c'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
@@ -471,9 +561,9 @@ distdir: $(DISTFILES)
done
check-am: all-am
check: check-am
-all-am: Makefile $(LTLIBRARIES)
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS)
installdirs:
- for dir in "$(DESTDIR)$(datetimelibdir)"; do \
+ for dir in "$(DESTDIR)$(datetimelibdir)" "$(DESTDIR)$(libexecdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -503,8 +593,8 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
-clean-am: clean-datetimelibLTLIBRARIES clean-generic clean-libtool \
- mostlyclean-am
+clean-am: clean-datetimelibLTLIBRARIES clean-generic \
+ clean-libexecPROGRAMS clean-libtool mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -530,7 +620,7 @@ install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am:
+install-exec-am: install-libexecPROGRAMS
install-html: install-html-am
@@ -570,24 +660,27 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-datetimelibLTLIBRARIES
+uninstall-am: uninstall-datetimelibLTLIBRARIES \
+ uninstall-libexecPROGRAMS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean \
- clean-datetimelibLTLIBRARIES clean-generic clean-libtool ctags \
- distclean distclean-compile distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-datetimelibLTLIBRARIES install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-datetimelibLTLIBRARIES
+ clean-datetimelibLTLIBRARIES clean-generic \
+ clean-libexecPROGRAMS clean-libtool ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-datetimelibLTLIBRARIES install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-libexecPROGRAMS \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-datetimelibLTLIBRARIES \
+ uninstall-libexecPROGRAMS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/src/datetime-service.c b/src/datetime-service.c
new file mode 100644
index 0000000..63590c7
--- /dev/null
+++ b/src/datetime-service.c
@@ -0,0 +1,7 @@
+
+int
+main (int argc, char ** argv)
+{
+
+ return 0;
+}
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c
index 9b4bec4..00854a4 100644
--- a/src/indicator-datetime.c
+++ b/src/indicator-datetime.c
@@ -34,6 +34,8 @@ struct _IndicatorDatetime {
struct _IndicatorDatetimePrivate {
GtkLabel * label;
+ GtkMenuItem * date;
+ GtkMenuItem * calendar;
guint timer;
};
@@ -79,6 +81,8 @@ indicator_datetime_init (IndicatorDatetime *self)
self->priv = INDICATOR_DATETIME_GET_PRIVATE(self);
self->priv->label = NULL;
+ self->priv->date = NULL;
+ self->priv->calendar = NULL;
self->priv->timer = 0;
return;
@@ -94,6 +98,16 @@ indicator_datetime_dispose (GObject *object)
self->priv->label = NULL;
}
+ if (self->priv->date != NULL) {
+ g_object_unref(self->priv->date);
+ self->priv->date = NULL;
+ }
+
+ if (self->priv->calendar != NULL) {
+ g_object_unref(self->priv->calendar);
+ self->priv->calendar = NULL;
+ }
+
if (self->priv->timer != 0) {
g_source_remove(self->priv->timer);
self->priv->timer = 0;
@@ -113,9 +127,11 @@ indicator_datetime_finalize (GObject *object)
/* Updates the label to be the current time. */
static void
-update_label (GtkLabel * label)
+update_label (IndicatorDatetime * io)
{
- if (label == NULL) return;
+ IndicatorDatetime * self = INDICATOR_DATETIME(io);
+
+ if (self->priv->label == NULL) return;
gchar longstr[128];
time_t t;
@@ -125,14 +141,23 @@ update_label (GtkLabel * label)
ltime = localtime(&t);
if (ltime == NULL) {
g_debug("Error getting local time");
- gtk_label_set_label(label, _("Error getting time"));
+ gtk_label_set_label(self->priv->label, _("Error getting time"));
return;
}
strftime(longstr, 128, "%I:%M %p", ltime);
gchar * utf8 = g_locale_to_utf8(longstr, -1, NULL, NULL, NULL);
- gtk_label_set_label(label, utf8);
+ gtk_label_set_label(self->priv->label, utf8);
+ g_free(utf8);
+
+ if (self->priv->date == NULL) return;
+
+ /* Note: may require some localization tweaks */
+ strftime(longstr, 128, "%A, %e %B %Y", ltime);
+
+ utf8 = g_locale_to_utf8(longstr, -1, NULL, NULL, NULL);
+ gtk_menu_item_set_label(self->priv->date, utf8);
g_free(utf8);
return;
@@ -145,7 +170,7 @@ minute_timer_func (gpointer user_data)
IndicatorDatetime * self = INDICATOR_DATETIME(user_data);
if (self->priv->label != NULL) {
- update_label(self->priv->label);
+ update_label(self);
return TRUE;
} else {
self->priv->timer = 0;
@@ -155,6 +180,18 @@ minute_timer_func (gpointer user_data)
return FALSE;
}
+static void
+activate_cb (GtkWidget *widget, const gchar *command)
+{
+ GError * error = NULL;
+
+ if (!g_spawn_command_line_async(command, &error)) {
+ g_warning("Unable to start %s: %s", (char *)command, error->message);
+ g_error_free(error);
+ }
+}
+
+
/* Grabs the label. Creates it if it doesn't
exist already */
static GtkLabel *
@@ -166,10 +203,10 @@ get_label (IndicatorObject * io)
if (self->priv->label == NULL) {
self->priv->label = GTK_LABEL(gtk_label_new("Time"));
g_object_ref(G_OBJECT(self->priv->label));
- update_label(self->priv->label);
+ update_label(self);
gtk_widget_show(GTK_WIDGET(self->priv->label));
}
-
+
if (self->priv->timer == 0) {
self->priv->timer = g_timeout_add_seconds(60, minute_timer_func, self);
}
@@ -177,20 +214,65 @@ get_label (IndicatorObject * io)
return self->priv->label;
}
-/* Build a dummy menu for now */
+static void
+check_for_calendar_application (IndicatorDatetime * self)
+{
+ GtkMenuItem * item = self->priv->calendar;
+ g_return_if_fail (item != NULL);
+
+ gchar *evo = g_find_program_in_path("evolution");
+ if (evo != NULL) {
+ g_signal_connect (GTK_MENU_ITEM (item), "activate",
+ G_CALLBACK (activate_cb), "evolution -c calendar");
+ gtk_widget_set_sensitive (GTK_WIDGET (item), TRUE);
+ gtk_widget_show(GTK_WIDGET(item));
+ g_free(evo);
+ } else {
+ gtk_widget_hide(GTK_WIDGET(item));
+ }
+}
+
static GtkMenu *
get_menu (IndicatorObject * io)
{
+ IndicatorDatetime * self = INDICATOR_DATETIME(io);
+
GtkWidget * menu = NULL;
GtkWidget * item = NULL;
menu = gtk_menu_new();
+
+ if (self->priv->date == NULL) {
+ item = gtk_menu_item_new_with_label("No date yet...");
+ gtk_widget_set_sensitive (GTK_WIDGET (item), FALSE);
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
+ self->priv->date = GTK_MENU_ITEM (item);
+ update_label(self);
+ }
- item = gtk_menu_item_new_with_label("No menu yet.");
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
- gtk_widget_show(item);
-
- gtk_widget_show(menu);
+ if (self->priv->calendar == NULL) {
+ item = gtk_menu_item_new_with_label(_("Open Calendar"));
+ /* insensitive until we check for available apps */
+ gtk_widget_set_sensitive (GTK_WIDGET (item), FALSE);
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
+ self->priv->calendar = GTK_MENU_ITEM (item);
+ }
+
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu),
+ gtk_separator_menu_item_new ());
+
+ GtkWidget *settings_mi = gtk_menu_item_new_with_label (_("Set Time and Date..."));
+ g_signal_connect (GTK_MENU_ITEM (settings_mi), "activate",
+ G_CALLBACK (activate_cb), "time-admin");
+ gtk_menu_shell_append (GTK_MENU_SHELL(menu), settings_mi);
+ gtk_widget_show(settings_mi);
+
+ /* show_all to reveal the separator */
+ gtk_widget_show_all(menu);
+
+ /* Note: maybe should move that to an idle loop if that helps with
+ boot performance */
+ check_for_calendar_application (self);
return GTK_MENU(menu);
}