Ticket #25962: app-gui-gui.c.diff

File app-gui-gui.c.diff, 2.5 KB (added by hsivank@…, 14 years ago)
  • app/gui/gui.c

    old new  
    7979#include "splash.h"
    8080#include "themes.h"
    8181#ifdef GDK_WINDOWING_QUARTZ
    82 #include "ige-mac-menu.h"
     82#ifndef __x86_64__
     83#include <ige-mac-menu.h>
     84#else
     85#include <igemacintegration/gtkosxapplication.h>
     86#endif
    8387#endif /* GDK_WINDOWING_QUARTZ */
    8488
    8589#include "gimp-intl.h"
     
    457461  gimp_ui_manager_update (image_ui_manager, NULL);
    458462
    459463#ifdef GDK_WINDOWING_QUARTZ
     464#ifndef __x86_64__
    460465  {
    461466    IgeMacMenuGroup *group;
    462467    GtkWidget       *menu;
     
    501506    if (GTK_IS_MENU_ITEM (item))
    502507      ige_mac_menu_add_app_menu_item (group, GTK_MENU_ITEM (item), NULL);
    503508  }
     509#else
     510  {
     511    GtkOSXApplication * theApp;
     512    GtkWidget * item;
     513    GtkOSXApplicationMenuGroup * group;
     514    GtkWidget * menu;
     515       
     516    theApp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
     517         
     518         
     519    menu = gtk_ui_manager_get_widget (GTK_UI_MANAGER (image_ui_manager),"/dummy-menubar/image-popup");
     520    if (GTK_IS_MENU_ITEM (menu))
     521      menu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (menu));
     522
     523        gtk_osxapplication_set_menu_bar(theApp, GTK_MENU_SHELL(menu));
     524        gtk_osxapplication_set_use_quartz_accelerators(theApp, TRUE);
     525         
     526    group = gtk_osxapplication_add_app_menu_group (theApp);
     527    item = gtk_ui_manager_get_widget (GTK_UI_MANAGER (image_ui_manager),"/dummy-menubar/image-popup/Help/dialogs-about");
     528    if (GTK_IS_MENU_ITEM (item))
     529      gtk_osxapplication_add_app_menu_item(theApp, group,GTK_MENU_ITEM (item));
     530         
     531    group = gtk_osxapplication_add_app_menu_group (theApp);
     532    item = gtk_ui_manager_get_widget (GTK_UI_MANAGER (image_ui_manager),"/dummy-menubar/image-popup/Edit/Preferences/dialogs-preferences");
     533    if (GTK_IS_MENU_ITEM (item))
     534      gtk_osxapplication_add_app_menu_item(theApp, group,GTK_MENU_ITEM (item));
     535         
     536    item = gtk_ui_manager_get_widget (GTK_UI_MANAGER (image_ui_manager),"/dummy-menubar/image-popup/Edit/Preferences/dialogs-keyboard-shortcuts");
     537    if (GTK_IS_MENU_ITEM (item))
     538      gtk_osxapplication_add_app_menu_item(theApp, group,GTK_MENU_ITEM (item));
     539       
     540    item = gtk_ui_manager_get_widget (GTK_UI_MANAGER (image_ui_manager),"/dummy-menubar/image-popup/Edit/Preferences/plug-in-unit-editor");
     541    if (GTK_IS_MENU_ITEM (item))
     542      gtk_osxapplication_add_app_menu_item(theApp, group,GTK_MENU_ITEM (item));
     543   
     544  }
     545#endif
    504546#endif /* GDK_WINDOWING_QUARTZ */
    505547
    506548  g_signal_connect_object (gui_config, "notify::single-window-mode",