File: tour-summary.js

package info (click to toggle)
gnome-devel-docs 3.14.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 46,300 kB
  • ctags: 630
  • sloc: xml: 2,321; ansic: 2,040; python: 1,807; makefile: 747; sh: 504; cpp: 131
file content (29 lines) | stat: -rw-r--r-- 738 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

#!/usr/bin/gjs

const Lang = imports.lang;
const Gtk = imports.gi.Gtk;

const HelloWorld = new Lang.Class({
    Name: 'HelloWorld',

    _init: function() {
        this.application = new Gtk.Application();
        this.application.connect('activate', Lang.bind(this, this._onActivate));
        this.application.connect('startup', Lang.bind(this, this._onStartup));
    },

    _onActivate: function(){
        this._window.show_all();
    },

    _onStartup: function() {
        let builder = new Gtk.Builder();
        builder.add_from_file('helloworld.glade');
        this._window = builder.get_object('window1');
        this.application.add_window(this._window);
    }
});

let app = new HelloWorld();
app.application.run(ARGV);