bin_SCRIPTS = espeaktime-now.sh
bin_PROGRAMS = espeaktimed
-espeaktimed_SOURCES = daemon.c
-espeaktimed_CFLAGS = $(GLIB_CFLAGS) $(DBUS_CFLAGS) $(MCE_CFLAGS) $(HAL_CFLAGS)
-espeaktimed_LDADD = $(GLIB_LIBS) $(DBUS_LIBS) $(MCE_LIBS) $(HAL_LIBS)
+espeaktimed_SOURCES = daemon.c config.c
+espeaktimed_CFLAGS = $(GLIB_CFLAGS) $(DBUS_CFLAGS) $(MCE_CFLAGS) $(HAL_CFLAGS) $(GCONF_CFLAGS)
+espeaktimed_LDADD = $(GLIB_LIBS) $(DBUS_LIBS) $(MCE_LIBS) $(HAL_LIBS) $(GCONF_LIBS)
libcpdir = $(libdir)/hildon-control-panel
libcp_LTLIBRARIES = libespeaktime-cp.la
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
#include <hal/libhal.h>
+#include "config.h"
#include <mce/dbus-names.h>
#include <mce/mode-names.h>
struct app_data {
DBusGConnection *bus;
LibHalContext *hal;
+ GConfClient *gconf;
gboolean mode_locked;
gboolean display_on;
static void speak_time(struct app_data *app)
{
- int res = system("espeaktime-now.sh");
- g_debug("speak script: %d", res);
+ struct espeaktime_settings cfg;
+ cfg_read(app->gconf, &cfg);
+ cfg_speak(&cfg, FALSE);
+ cfg_free(&cfg);
}
static void sig_tklock_mode(DBusGProxy *proxy, const char *mode, gpointer user_data)
return 1;
}
+ app.gconf = gconf_client_get_default();
+ g_assert(app.gconf);
+
if (!init_hal(&app))
return 1;