//string VERSION = "0.1";
static int main (string[] args) {
- string opt_popup = null;
+ bool opt_popup = false;
GLib.OptionEntry[] entries = new GLib.OptionEntry[] {
OptionEntry() {
long_name = "popup",
short_name = 'p',
flags = 0,
- arg = OptionArg.STRING,
+ arg = OptionArg.NONE,
arg_data = &opt_popup,
description = "run as a popup at the specified location on screen",
- arg_description = "X,Y" },
+ arg_description = null },
OptionEntry()
};
Gtk.init_with_args(ref args, "", entries, null);
// User interface
var calendar = new zavai.widgets.Calendar();
- Gtk.WindowType wtype;
- if (opt_popup == null)
- wtype = Gtk.WindowType.TOPLEVEL;
- else
+ Gtk.Window win = new Gtk.Window(Gtk.WindowType.TOPLEVEL);
+ if (opt_popup)
{
- wtype = Gtk.WindowType.POPUP;
+ win.set_decorated(false);
+ //win.set_resizable(false);
+ win.set_border_width(5);
+ win.set_skip_taskbar_hint(true);
+ win.set_skip_pager_hint(true);
+ // gtk_window_set_type_hint(GTK_WINDOW(win), GDK_WINDOW_TYPE_HINT_DOCK);
+ win.set_position(Gtk.WindowPosition.MOUSE);
+ win.stick();
}
- var win = new Gtk.Window(wtype);
win.title = "Zavai calendar";
win.destroy += Gtk.main_quit;
win.add(calendar);