projects
/
espeaktime
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
daemon: read settings from gconf
[espeaktime]
/
src
/
daemon.c
diff --git
a/src/daemon.c
b/src/daemon.c
index
065c990
..
a7bbeaf
100644
(file)
--- a/
src/daemon.c
+++ b/
src/daemon.c
@@
-5,6
+5,7
@@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
#include <hal/libhal.h>
#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>
#include <mce/dbus-names.h>
#include <mce/mode-names.h>
@@
-16,6
+17,7
@@
struct app_data {
DBusGConnection *bus;
LibHalContext *hal;
struct app_data {
DBusGConnection *bus;
LibHalContext *hal;
+ GConfClient *gconf;
gboolean mode_locked;
gboolean display_on;
gboolean mode_locked;
gboolean display_on;
@@
-25,8
+27,10
@@
struct app_data {
static void speak_time(struct app_data *app)
{
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)
}
static void sig_tklock_mode(DBusGProxy *proxy, const char *mode, gpointer user_data)
@@
-190,6
+194,9
@@
int main(int argc, char *argv[])
return 1;
}
return 1;
}
+ app.gconf = gconf_client_get_default();
+ g_assert(app.gconf);
+
if (!init_hal(&app))
return 1;
if (!init_hal(&app))
return 1;