* Features to add:
- zavai-calendar to use as a calendar popup for lxde
+ - option to choose toplevel or popup (and where to show the popup)
- zavai calendar: show month notes
- zavai calendar: show global notes
- contacts: show as a fancy focus+context list (see prefuse)
/*
- * zavai - simple interface to the OpenMoko (or to the FSO stack)
+ * zavai-calendar - simple calendar tool
*
* Copyright (C) 2009 Enrico Zini <enrico@enricozini.org>
*
//string VERSION = "0.1";
static int main (string[] args) {
- Gtk.init (ref args);
+ string opt_popup = null;
+ GLib.OptionEntry[] entries = new GLib.OptionEntry[] {
+ OptionEntry() {
+ long_name = "popup",
+ short_name = 'p',
+ flags = 0,
+ arg = OptionArg.STRING,
+ arg_data = &opt_popup,
+ description = "run as a popup at the specified location on screen",
+ arg_description = "X,Y" },
+ OptionEntry()
+ };
+ Gtk.init_with_args(ref args, "", entries, null);
// parser = Parser(usage="usage: %prog [options]",
// version="%prog "+ VERSION,
// Set up zavai
- // Core infrastructure
+ // Core infrastructure
zavai.config = new zavai.Config();
// User interface
var calendar = new zavai.widgets.Calendar();
- var win = new Gtk.Window(Gtk.WindowType.POPUP);
+ Gtk.WindowType wtype;
+ if (opt_popup == null)
+ wtype = Gtk.WindowType.TOPLEVEL;
+ else
+ {
+ wtype = Gtk.WindowType.POPUP;
+ }
+
+ var win = new Gtk.Window(wtype);
win.title = "Zavai calendar";
win.destroy += Gtk.main_quit;
win.add(calendar);
// signal.signal(signal.SIGINT, on_kill)
// signal.signal(signal.SIGTERM, on_kill)
- // zavai.info("Starting")
- // app = registry.resource("app")
- // app.connect("destroy", gtk.main_quit)
- // app.run()
-
- //zavai.app.run();
Gtk.main();
// zavai.info("Shutting down")