Assorted test-gapplication fixes
Move this test toghether with the others, and set the appmenu only after the application is registered (i.e. in startup) https://bugzilla.gnome.org/show_bug.cgi?id=678978
This commit is contained in:
parent
9812771dcd
commit
464813ecbb
@ -24,6 +24,7 @@ function do_action_state_change(action) {
|
|||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
Gtk.init(null, null);
|
Gtk.init(null, null);
|
||||||
|
Gdk.set_program_class('test-gjsgapp');
|
||||||
|
|
||||||
let app = new Gtk.Application({ application_id: 'org.gnome.Shell.GtkApplicationTest' });
|
let app = new Gtk.Application({ application_id: 'org.gnome.Shell.GtkApplicationTest' });
|
||||||
app.connect('activate', function() {
|
app.connect('activate', function() {
|
||||||
@ -87,11 +88,11 @@ function main() {
|
|||||||
item.set_action_and_target_value('app.parameter-int', GLib.Variant.new('u', 43));
|
item.set_action_and_target_value('app.parameter-int', GLib.Variant.new('u', 43));
|
||||||
menu.append_item(item);
|
menu.append_item(item);
|
||||||
|
|
||||||
app.set_app_menu(menu);
|
|
||||||
|
|
||||||
let window = null;
|
let window = null;
|
||||||
|
|
||||||
app.connect_after('startup', function(app) {
|
app.connect_after('startup', function(app) {
|
||||||
|
app.set_app_menu(menu);
|
||||||
|
|
||||||
window = new Gtk.ApplicationWindow({ title: "Test Application", application: app });
|
window = new Gtk.ApplicationWindow({ title: "Test Application", application: app });
|
||||||
});
|
});
|
||||||
app.connect('activate', function(app) {
|
app.connect('activate', function(app) {
|
Loading…
Reference in New Issue
Block a user