Created
February 21, 2016 22:55
-
-
Save craigcabrey/cea560f4823f69211bd8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/gjs | |
const GLib = imports.gi.GLib; | |
const Gtk = imports.gi.Gtk; | |
const Lang = imports.lang; | |
const AppChooserWidgetTest = new Lang.Class({ | |
Name: 'AppChooserWidgetTest', | |
_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.present(); | |
}, | |
_onStartup: function() { | |
this._window = new Gtk.ApplicationWindow({ | |
application: this.application, | |
title: 'AppChooserWidgetTest', | |
default_height: 200, | |
default_width: 400, | |
window_position: Gtk.WindowPosition.CENTER | |
}); | |
this._window.add(new Gtk.AppChooserWidget({show_all: true})); | |
this._window.show_all(); | |
} | |
}); | |
const app = new AppChooserWidgetTest(); | |
app.application.run(ARGV); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment