Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using GLib;
- using Gtk;
- using Cc;
- public class MapTesting : Object {
- Gtk.Window window;
- Cc.TimezoneMap map;
- public bool location_changed(TimezoneLocation data) {
- map.set_watermark(data.Comment);
- return true;
- }
- public MapTesting() {
- window = new Window(WindowType.TOPLEVEL);
- window.title = "Vala + TimezoneMap";
- window.set_default_size(640, 480);
- window.destroy.connect(Gtk.main_quit);
- map = new TimezoneMap();
- map.set_timezone("America/New_York");
- map.set_watermark("America/New_York");
- map.location_changed.connect((w,tz) => location_changed(tz));
- window.add(map);
- window.show_all();
- }
- public static int main(string[] args) {
- Gtk.init(ref args);
- var map = new MapTesting();
- Gtk.main();
- return 0;
- }
- }
Add Comment
Please, Sign In to add comment