--- /dev/null
+.PHONY: all clean install
+
+pluginlibdir=`pkg-config hildon-control-panel --variable pluginlibdir`
+plugindesktopentrydir=`pkg-config hildon-control-panel --variable plugindesktopentrydir`
+
+HILDON_CFLAGS = `pkg-config --cflags hildon-1`
+OSSO_CFLAGS = `pkg-config --cflags libosso`
+
+HILDON_LIBS = `pkg-config --libs hildon-1`
+OSSO_LIBS = `pkg-config --libs libosso`
+
+pluginlib_LTLIBRARY = \
+ libled-pattern-editor.so
+
+plugindesktopentry_DATA = \
+ data/led-pattern-editor.desktop
+
+all: ${pluginlib_LTLIBRARY}
+
+led_pattern_editor_SOURCES = $(patsubst %.vala,%.c,${led_pattern_editor_VALASOURCES})
+
+led_pattern_editor_VALASOURCES = \
+ src/led-pattern-editor.vala
+
+led_pattern_editor_VALAFLAGS = --pkg hildon-1 --pkg libosso
+
+${pluginlib_LTLIBRARY}: ${led_pattern_editor_SOURCES}
+ gcc -shared ${HILDON_CFLAGS} ${OSSO_CFLAGS} -o $@ $^ ${HILDON_LIBS} ${OSSO_LIBS}
+
+src/led-pattern-editor.c: ${led_pattern_editor_VALASOURCES}
+ valac -C ${led_pattern_editor_VALAFLAGS} -o $@ $^
+
+clean:
+ rm ${pluginlib_LTLIBRARY} src/*.c
+
+install:
+ install -d ${DESTDIR}${pluginlibdir}
+ install libled-pattern-editor.so ${DESTDIR}${pluginlibdir}/libled-pattern-editor.so
+ install -d ${DESTDIR}${plugindesktopentrydir}
+ install ${plugindesktopentry_DATA} ${DESTDIR}${plugindesktopentrydir}/`basename ${plugindesktopentry_DATA}`
+
--- /dev/null
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Name=LED Patterns
+Comment=LED pattern editor
+Type=HildonControlPanelPlugin
+Icon=control_led
+X-control-panel-plugin=libled-pattern-editor.so
+Categories=personalisation
--- /dev/null
+/* This file is part of LED Pattern Editor.
+ *
+ * Copyright (C) 2010 Philipp Zabel
+ *
+ * LED Pattern Editor is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * LED Pattern Editor 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with LED Pattern Editor. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+public static Osso.Status execute (Osso.Context osso, void* data, bool user_activated) {
+ var window = data as Gtk.Window;
+
+ // Load mce.ini
+
+ var dialog = new Gtk.Dialog ();
+ dialog.set_transient_for (window);
+
+ int response = dialog.run ();
+ dialog.destroy ();
+ if (response == Gtk.ResponseType.OK) {
+ // Save mce.ini
+ }
+
+ return Osso.Status.OK;
+}
+
+public static Osso.Status save_state (Osso.Context osso, void* data) {
+ return Osso.Status.OK;
+}