Re: [gtk-osx-users] [Gtk-osx-users] GTK osx apps and iconification




On Mar 9, 2017, at 4:09 AM, Gabriele Greco <gabrielegreco gmail com> wrote:

Hi guys,

I've found that I have to add to my GTK+2 OSX apps the following code:

#ifdef __APPLE__
    GtkosxApplication *theApp = (GtkosxApplication *)g_object_new(GTKOSX_TYPE_APPLICATION, NULL);
    g_signal_connect(theApp, "NSApplicationWillTerminate", G_CALLBACK(g_main_quit), NULL);
    gtkosx_application_ready(theApp);
#endif

... to respond correctly to an un-iconify OSX signal (click on the dock icon) or to the right click on icon 
"exit signal"

Is this necessary or, provided I don't need a menu, there are other crossplatform ways to avoid these 
problems?


That looks correct to me. It's not a problem to have special code for different platforms: It's more of a 
fact of life in cross-platform programming with Gnome libraries. If that really bugs you, you can port your 
program to Qt, which AFAIK requires no special per-platform code.

I don't know of any other library that provides mac integration for Gtk2.

Regards,
John Ralls


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Gtk-osx-users mailing list
Gtk-osx-users lists sourceforge net
https://lists.sourceforge.net/lists/listinfo/gtk-osx-users


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