Integration with the Mac OS X Menubar

NOTE: See the new page about integration instead.



How to integrate with the Mac OS X Menubar

This page describes a way to integrate a GTK+ application with the Mac OS X Menubar. The work was sponsored by Pioneer Research and developed by Imendio AB.

In order to synchronize your GtkMenu with the Mac OS X Menubar you only need to put the sync-menu.c and sync-menu.h files (from sync-menu-0.2.tar.gz) into your project.

After that all you need to do is to call:

#include "syncmenu.h"
/* ... */
{
  GtkMenuShell *shell;
 
  /* Setup your menu */
 
  sync_menu_takeover_menu (shell);
}

SyncMenu will take care of keeping your changes to the GtkMenu synchronized with the menu bar. See the Todo section below for things that are currently lacking.

SyncMenu will also transform your Ctrl+ shortcuts to Cmd+ to integrate better with Mac applications.

Todo

  • Synchronization on add/remove/reorder.
  • Integration with the Mac Menu (the one named as your app) to be able to add the Quit call, preferences and about there as other Mac apps.