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:
Giovanni Campagna 2012-04-06 20:38:27 +02:00
parent 9812771dcd
commit 464813ecbb

View File

@ -24,6 +24,7 @@ function do_action_state_change(action) {
function main() {
Gtk.init(null, null);
Gdk.set_program_class('test-gjsgapp');
let app = new Gtk.Application({ application_id: 'org.gnome.Shell.GtkApplicationTest' });
app.connect('activate', function() {
@ -87,11 +88,11 @@ function main() {
item.set_action_and_target_value('app.parameter-int', GLib.Variant.new('u', 43));
menu.append_item(item);
app.set_app_menu(menu);
let window = null;
app.connect_after('startup', function(app) {
app.set_app_menu(menu);
window = new Gtk.ApplicationWindow({ title: "Test Application", application: app });
});
app.connect('activate', function(app) {