Show calendar as a popup
authorEnrico Zini <enrico@enricozini.org>
Mon, 2 Nov 2009 17:53:07 +0000 (18:53 +0100)
committerEnrico Zini <enrico@enricozini.org>
Mon, 2 Nov 2009 17:53:07 +0000 (18:53 +0100)
src/Makefile.am
src/zavai-calendar.vala

index ef21154dcdce1960a26c4a2c161b207b04bc43f9..a58192aec1e1bf53dc22ed4db834687f769eae47 100644 (file)
@@ -26,7 +26,8 @@ AM_CPPFLAGS = \
 
 zavai_VAPIS = linux-input.vapi dbus-extra.vapi devkit-power-gobject.vapi
 
-BUILT_SOURCES = zavai.vala.stamp $(zavai_VALASOURCES:.vala=.c)
+BUILT_SOURCES = zavai.vala.stamp zavai-calendar.vala.stamp \
+               $(zavai_VALASOURCES:.vala=.c) $(zavai_calendar_VALASOURCES:.vala=.c)
 
 bin_PROGRAMS = zavai zavai-calendar
 
index 17bcfde178c4a9635f087cec84d5e3d6618cf118..ed857c7129b6982bc6f8f71d0a44b8d6c97453a1 100644 (file)
@@ -47,6 +47,14 @@ static int main (string[] args) {
        // User interface
        var calendar = new zavai.widgets.Calendar();
 
+       var win = new Gtk.Window(Gtk.WindowType.POPUP);
+       win.title = "Zavai calendar";
+       win.destroy += Gtk.main_quit;
+       win.add(calendar);
+       win.set_size_request(300, 500);
+       win.show_all();
+       win.show();
+
        // # Shutdown the main loop on SIGINT
        // def on_kill(signum, frame):
        //     gtk.main_quit()
@@ -58,22 +66,6 @@ static int main (string[] args) {
        // app.connect("destroy", gtk.main_quit)
        // app.run()
 
-/*
-       dynamic DBus.Object otime = zavai.registry.sbus.get_object(
-                       "org.freesmartphone.otimed",
-                       "/org/freesmartphone/Time/Alarm",
-                       "org.freesmartphone.Time.Alarm");
-
-       otime.ClearAlarm();
-       otime.SetAlarm(time_t() + 10);
-
-       dynamic DBus.Object notification = zavai.registry.sbus.get_object(
-                       "org.freesmartphone",
-                       "org/freesmartphone/Notification",
-                       "org.freesmartphone.Notification");
-       notification.Alarm += on_alarm;
-*/
-
        //zavai.app.run();
        Gtk.main();