[Gtk-osx-users] How to change the application's menubar entry?



My project is to write Gtk+ bindings to Tcl. 

Using the gtkosxapplication functions it is possible to create a Mac like menubar and to modify the appmenus menuitems like About, Preferences and so on. This works fine. But:

As the Gtk functions are called by Tcl the name of the application in the appmenu is always "tclsh".

In the file gtkosxapplication_quartz.c I studied the lines which are creating the apple menu to see how the apple menu is created:

-----------------------------
static GNSMenuItem*
create_apple_menu (GtkOSXApplication *self)
{
  NSMenuItem *menuitem;
  // Create the application (Apple) menu.
  NSMenu *app_menu = [[NSMenu alloc] initWithTitle: @"Apple Menu"];

  NSMenu *menuServices = [[NSMenu alloc] initWithTitle: @"Services"];
  [NSApp setServicesMenu:menuServices];

 ...

-----------------------------

I thought to change the code to something like

NSMenu *app_menu = [[NSMenu alloc] initWithTitle: applicationname];

where applicationname could be given by the Tcl commandline but I hesitate to change the source code.

Is there any 'official' way to set the applicationname?






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