From: Alex Badea Date: Thu, 17 Jun 2010 19:08:20 +0000 (+0300) Subject: Add skeleton settings applet, in its own binary package X-Git-Url: http://git.maemo.org/git/?p=espeaktime;a=commitdiff_plain;h=963a35db769d1575c466a968683cf4a3d617aafb Add skeleton settings applet, in its own binary package --- diff --git a/autogen.sh b/autogen.sh index bdebfcb..14f457a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,7 @@ #!/bin/sh cd $(dirname $0) +libtoolize aclocal automake -ac autoconf diff --git a/configure.ac b/configure.ac index 57fb79b..d33b1ee 100644 --- a/configure.ac +++ b/configure.ac @@ -3,6 +3,7 @@ AM_INIT_AUTOMAKE AC_PROG_CC AC_PROG_INSTALL +AC_PROG_LIBTOOL AC_HEADER_STDC PKG_CHECK_MODULES(GLIB, [glib-2.0]) @@ -21,6 +22,14 @@ PKG_CHECK_MODULES(HAL, [hal]) AC_SUBST(HAL_CFLAGS) AC_SUBST(HAL_LIBS) +PKG_CHECK_MODULES(OSSO, libosso >= 1) +AC_SUBST(OSSO_LIBS) +AC_SUBST(OSSO_CFLAGS) + +PKG_CHECK_MODULES(HILDON, libhildondesktop-1) +AC_SUBST(HILDON_LIBS) +AC_SUBST(HILDON_CFLAGS) + AC_OUTPUT([ Makefile src/Makefile diff --git a/data/Makefile.am b/data/Makefile.am index 6f46a9f..8a1f702 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,3 +1,6 @@ install-data-local: $(INSTALL_DATA) -D $(srcdir)/espeaktime $(DESTDIR)/etc/event.d/espeaktime +controlpaneldir = $(datadir)/applications/hildon-control-panel +controlpanel_DATA = espeaktime-cp.desktop + diff --git a/data/espeaktime-cp.desktop b/data/espeaktime-cp.desktop new file mode 100644 index 0000000..6d79bfa --- /dev/null +++ b/data/espeaktime-cp.desktop @@ -0,0 +1,5 @@ +[Desktop Entry] +Name=eSpeakTime +Type=HildonControlPanelPlugin +Icon=espeaktime +X-control-panel-plugin=libespeaktime-cp.so diff --git a/debian/control b/debian/control index c8efdfa..4e6fe75 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,8 @@ Section: user/multimedia Priority: extra Maintainer: Alex Badea Build-Depends: debhelper (>= 5), - libglib2.0-dev, libdbus-glib-1-dev, libhal-dev, mce-dev (>= 1.8.10) + libglib2.0-dev, libdbus-glib-1-dev, libhal-dev, mce-dev (>= 1.8.10), + libgtk2.0-dev, libhildondesktop1-dev, hildon-control-panel-dev, libosso-dev (>= 1) Standards-Version: 3.7.2 Package: espeaktime-daemon @@ -18,3 +19,14 @@ Description: Talking clock based on eSpeak XB-Maemo-Display-Name: eSpeakTime XSBC-Bugtracker: mailto:vamposdecampos@gmail.com +Package: espeaktime-ui +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Talking clock based on eSpeak (UI) + This is a simple talking clock daemon. Activate it by double-pressing + the power button while the display is locked. + . + This package provides the settings UI. +XB-Maemo-Display-Name: eSpeakTime UI +XSBC-Bugtracker: mailto:vamposdecampos@gmail.com + diff --git a/debian/espeaktime-ui.install b/debian/espeaktime-ui.install new file mode 100644 index 0000000..53f3f76 --- /dev/null +++ b/debian/espeaktime-ui.install @@ -0,0 +1,2 @@ +usr/lib/hildon-control-panel/*.so +usr/share/applications/hildon-control-panel/*.desktop diff --git a/src/Makefile.am b/src/Makefile.am index 86908a2..599f5f3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,3 +4,10 @@ espeaktimed_SOURCES = daemon.c espeaktimed_CFLAGS = $(GLIB_CFLAGS) $(DBUS_CFLAGS) $(MCE_CFLAGS) $(HAL_CFLAGS) espeaktimed_LDADD = $(GLIB_LIBS) $(DBUS_LIBS) $(MCE_LIBS) $(HAL_LIBS) +libcpdir = $(libdir)/hildon-control-panel +libcp_LTLIBRARIES = libespeaktime-cp.la +libespeaktime_cp_la_SOURCES = applet.c +libespeaktime_cp_la_CFLAGS = $(HILDON_CFLAGS) $(OSSO_CFLAGS) +libespeaktime_cp_la_LDFLAGS = -module -avoid-version +libespeaktime_cp_la_LIBADD = $(HILDON_LIBS) + diff --git a/src/applet.c b/src/applet.c new file mode 100644 index 0000000..72e47f1 --- /dev/null +++ b/src/applet.c @@ -0,0 +1,29 @@ +#include +#include + +osso_return_t execute(osso_context_t *osso, gpointer data, gboolean user_activated) +{ + GtkWidget *dialog; + + dialog = gtk_dialog_new_with_buttons( + "eSpeakTime Settings", + GTK_WINDOW(data), + GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR, + GTK_STOCK_SAVE, + GTK_RESPONSE_OK, + GTK_STOCK_CANCEL, + GTK_RESPONSE_CANCEL, + NULL); + + gtk_widget_show_all(dialog); + gtk_dialog_run(GTK_DIALOG(dialog)); + gtk_widget_destroy(GTK_WIDGET(dialog)); + + return OSSO_OK; +} + +osso_return_t save_state(osso_context_t *osso, gpointer data) +{ + return OSSO_OK; +} +