AC_SUBST(LOCATION_LIBS)
AC_SUBST(LOCATION_CFLAGS)
-PKG_CHECK_MODULES(HILDON, hildon-1)
+PKG_CHECK_MODULES(OSSO, libosso >= 1.0.0)
+AC_SUBST(OSSO_LIBS)
+AC_SUBST(OSSO_CFLAGS)
+
+PKG_CHECK_MODULES(HILDON, hildon-1 hildon-control-panel >= 0.10.0)
AC_SUBST(HILDON_LIBS)
AC_SUBST(HILDON_CFLAGS)
+PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.6)
+AC_SUBST(GCONF_LIBS)
+AC_SUBST(GCONF_CFLAGS)
+
+PKG_CHECK_MODULES(DBUSGLIB, dbus-glib-1 >= 0.23.4)
+AC_SUBST(DBUSGLIB_LIBS)
+AC_SUBST(DBUSGLIB_CFLAGS)
+
dnl Localization
GETTEXT_PACKAGE=publish-position
AC_SUBST(GETTEXT_PACKAGE)
HILDON_DESKTOP_LIB_DIR=`pkg-config libhildondesktop-1 --variable=hildondesktoplibdir`
AC_SUBST(HILDON_DESKTOP_LIB_DIR)
+hildoncpdesktopentrydir=`$PKG_CONFIG --variable=plugindesktopentrydir hildon-control-panel`
+AC_SUBST(hildoncpdesktopentrydir)
+
+cpazimuthdir=`$PKG_CONFIG --variable=pluginlibdir hildon-control-panel`
+AC_SUBST(cpazimuthdir)
+
AC_ARG_ENABLE(cast-checks, [ --disable-cast-checks compile with GLIB cast checks disabled],[cchecks=${enableval}],cchecks=yes)
if test "x$cchecks" = "xno"; then
CFLAGS="$CFLAGS -DG_DISABLE_CAST_CHECKS"
AC_OUTPUT([
Makefile
src/Makefile
+ src/cpazimuth.desktop
])
-I$(top_srcdir) \
-DG_LOG_DOMAIN=\"azimuth\" \
$(TELEPATHY_GLIB_CFLAGS) \
+ $(OSSO_CFLAGS) \
$(HILDON_CFLAGS) \
$(GTK_CFLAGS) \
$(GLIB_CFLAGS) \
LDADD = \
$(TELEPATHY_GLIB_LIBS) \
+ $(OSSO_LIBS) \
$(HILDON_LIBS) \
$(GTK_LIBS) \
$(GLIB_LIBS) \
main.c \
connection-watcher.c \
position-publisher.c
+
+
+hildoncpdesktopentry_DATA = cpazimuth.desktop
+
+cpazimuth_LTLIBRARIES = libcpazimuth.la
+
+libcpazimuth_la_LIBADD = $(HILDON_LIBS) $(GCONF_LIBS) \
+ $(DBUS_LIBS) $(OSSO_LIBS)
+
+libcpazimuth_la_SOURCES = \
+ controlpanel-applet.c
--- /dev/null
+/*
+ * controlpanel-applet.c.c - Source for Azimuth's control panel applet
+ * Copyright (C) 2010 Collabora
+ * @author Alban Crequy <alban.crequy@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <libintl.h>
+#include <libosso.h>
+#include <hildon/hildon.h>
+#include <hildon-cp-plugin/hildon-cp-plugin-interface.h>
+
+static GtkWidget*
+create_main_dialog (gpointer window, osso_context_t *osso)
+{
+ GtkWidget *dialog;
+ GtkWidget *bSave;
+
+ dialog = g_object_new (GTK_TYPE_DIALOG,
+ "transient-for", GTK_WINDOW (window),
+ "destroy-with-parent", TRUE,
+ "resizable", TRUE,
+ "has-separator", FALSE,
+ "modal", TRUE,
+ NULL);
+ gtk_window_set_title (GTK_WINDOW (dialog),
+ "Publish location");
+
+ bSave = gtk_dialog_add_button (GTK_DIALOG (dialog),
+ dgettext ("hildon-libs", "wdgt_bd_save"),
+ GTK_RESPONSE_OK);
+
+ gtk_widget_show_all (dialog);
+
+ return dialog;
+}
+
+osso_return_t
+execute (osso_context_t *osso, gpointer data,
+ gboolean user_activated)
+{
+ GtkWidget *dialog;
+ gint ret;
+
+ dialog = create_main_dialog (data, osso);
+
+ ret = gtk_dialog_run (GTK_DIALOG (dialog));
+
+ gtk_widget_destroy (dialog);
+
+
+ return OSSO_OK;
+}
+