Re: [Gtk-osx-users] Crash on "Quit" in menu.

Hi John

The crash is after NSApplicationWillTerminate, the only way I can get it to not make a crash report, is to Quit Gtk main loop in NSApplicationBlockTermination and return true. Then NSApplicationWillTerminate is never called, but the program exit.

I don't see the accelerators bypass the Gtk menu, if I keep my normal Gtk menu item with accelerator as cmd-q and hide it, it calls my normal quit function. If I don't have the menuitem, nothing happens when cmd-q is pressed. The same with the other accelerators in main menu and windows menu, they don't work.

Med Venlig Hilsen / Kind Regards

Mikkel Kruse Johnsen
IT Ansvarlig, Medejer

Structura IT ApS
Kratbjerg 212
3480 Fredensborg

Telefon: +45 4816 1001
Telefax: +45 4824 5320
Direkte: +45 2128 7793
e-mail: mikkel structura-it dk

søn, 10 04 2011 kl. 12:25 -0700, skrev John Ralls:
On Apr 10, 2011, at 10:12 AM, Mikkel Kruse Johnsen wrote:

> Hi 
> Using the GtkOSXApplication the application crashes when I click on the "Quit" in the menu, a report message pops up asking if I want to send to apple. If I use my accelerator Apple-Q there is no report popup.
> There seems to be a diffrent, when using the "Quit" from the menu I get a "NSApplication terminate" signal, that I don't get with the apple-Q accelerator. Any ideas ?

The Keyboard accelerator bypasses the Gtk menu and tells the underlying Cocoa event loop to send the NSApplicationShouldTerminate and NSApplicationWillTerminate notifications, which should be translated into the corresponding Gtk signals by NSApplicationDelegate in GtkOSXApplication. Where's the crash?

John Ralls

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]