[gtk-mac-integration] Fix naming conflict with gtkquartz-menu
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-mac-integration] Fix naming conflict with gtkquartz-menu
- Date: Wed, 15 Feb 2012 05:04:12 +0000 (UTC)
commit 310a8663816d68daa94519220897a64ef0110b99
Author: John Ralls <jralls ceridwen us>
Date: Tue Feb 14 20:52:10 2012 -0800
Fix naming conflict with gtkquartz-menu
Change GNSMenuBar and GNSMenuItem to _GNSMenuBar and _GNSMenuItem
src/GNSMenuBar.c | 14 +++++-----
src/GNSMenuBar.h | 26 +++++++++---------
src/GNSMenuItem.c | 4 +-
src/GNSMenuItem.h | 8 +++---
src/cocoa_menu_item.c | 56 ++++++++++++++++++++--------------------
src/cocoa_menu_item.h | 2 +-
src/gtkosxapplication_quartz.c | 44 +++++++++++++++---------------
7 files changed, 77 insertions(+), 77 deletions(-)
---
diff --git a/src/GNSMenuBar.c b/src/GNSMenuBar.c
index 117b3af..41b5d3a 100644
--- a/src/GNSMenuBar.c
+++ b/src/GNSMenuBar.c
@@ -21,7 +21,7 @@
#import "GNSMenuBar.h"
#include "cocoa_menu_item.h"
- implementation GNSMenuBar
+ implementation _GNSMenuBar
- (id) initWithTitle:(NSString*) title
{
@@ -70,37 +70,37 @@
return gtk_menubar;
}
-- (void) setAppMenu: (GNSMenuItem*) menu_item
+- (void) setAppMenu: (_GNSMenuItem*) menu_item
{
[app_menu release];
app_menu = menu_item;
[app_menu retain];
}
-- (GNSMenuItem*) appMenu {
+- (_GNSMenuItem*) appMenu {
return app_menu;
}
-- (void) setWindowsMenu: (GNSMenuItem*) menu_item
+- (void) setWindowsMenu: (_GNSMenuItem*) menu_item
{
[window_menu release];
window_menu = menu_item;
[window_menu retain];
}
-- (GNSMenuItem*) windowsMenu
+- (_GNSMenuItem*) windowsMenu
{
return window_menu;
}
-- (void) setHelpMenu: (GNSMenuItem*) menu_item
+- (void) setHelpMenu: (_GNSMenuItem*) menu_item
{
[help_menu release];
help_menu = menu_item;
[help_menu retain];
}
-- (GNSMenuItem*) helpMenu
+- (_GNSMenuItem*) helpMenu
{
return help_menu;
}
diff --git a/src/GNSMenuBar.h b/src/GNSMenuBar.h
index 5971e4a..279b922 100644
--- a/src/GNSMenuBar.h
+++ b/src/GNSMenuBar.h
@@ -22,26 +22,26 @@
#include <gtk/gtk.h>
#include "gtkosxapplication.h"
- class GNSMenuItem;
+ class _GNSMenuItem;
/**
- * SECTION:GNSMenuBar
+ * SECTION:_GNSMenuBar
* @short_description: Wrapper class for NSMenubar
- * #title: GNSMenuBar
+ * #title: _GNSMenuBar
* @stability: Private
*
* Wrapper class around NSMenu providing an extra
* parameter for stashing the App menu groups.
*/
- interface GNSMenuBar : NSMenu
+ interface _GNSMenuBar : NSMenu
{
@private
GList *app_menu_groups;
GtkMenuBar *gtk_menubar;
- GNSMenuItem *app_menu;
- GNSMenuItem *window_menu;
- GNSMenuItem *help_menu;
+ _GNSMenuItem *app_menu;
+ _GNSMenuItem *window_menu;
+ _GNSMenuItem *help_menu;
}
/**
@@ -83,12 +83,12 @@
-(void) resync;
- (GtkMenuBar*) menuBar;
-- (void) setAppMenu: (GNSMenuItem*) menu_item;
-- (GNSMenuItem*) appMenu;
-- (void) setWindowsMenu: (GNSMenuItem*) menu_item;
-- (GNSMenuItem*) windowsMenu;
-- (void) setHelpMenu: (GNSMenuItem*) menu_item;
-- (GNSMenuItem*) helpMenu;
+- (void) setAppMenu: (_GNSMenuItem*) menu_item;
+- (_GNSMenuItem*) appMenu;
+- (void) setWindowsMenu: (_GNSMenuItem*) menu_item;
+- (_GNSMenuItem*) windowsMenu;
+- (void) setHelpMenu: (_GNSMenuItem*) menu_item;
+- (_GNSMenuItem*) helpMenu;
/**
* dealloc:
diff --git a/src/GNSMenuItem.c b/src/GNSMenuItem.c
index f6e5167..72d0aeb 100644
--- a/src/GNSMenuItem.c
+++ b/src/GNSMenuItem.c
@@ -35,7 +35,7 @@ idle_call_activate (ClosureData *action)
return FALSE;
}
- implementation GNSMenuItem
+ implementation _GNSMenuItem
- (id) initWithTitle:(NSString*) title aGClosure:(GClosure*) closure andPointer:(gpointer) ptr
{
@@ -90,7 +90,7 @@ idle_call_activate (ClosureData *action)
if (index < 0) index = 0;
if (index > maxIndex) index = maxIndex;
[inMenu insertItem: self atIndex: index];
- [(GNSMenuBar*)[NSApp mainMenu] resync];
+ [(_GNSMenuBar*)[NSApp mainMenu] resync];
}
[self release];
#endif
diff --git a/src/GNSMenuItem.h b/src/GNSMenuItem.h
index f4ecccd..299be33 100644
--- a/src/GNSMenuItem.h
+++ b/src/GNSMenuItem.h
@@ -30,16 +30,16 @@ typedef struct {
} ClosureData;
/**
- * SECTION:GNSMenuItem
+ * SECTION:_GNSMenuItem
* @Short_description: NSMenuItem Wrapper Class
- * @Title: GNSMenuItem
+ * @Title: _GNSMenuItem
* @stability: private
*
* Wrapper class around NSMenuItem providing an
* action function which puts invocation of the provided GClosure onto
* the gtk idle queue.
*/
- interface GNSMenuItem : NSMenuItem
+ interface _GNSMenuItem : NSMenuItem
{
@public
//accel_closure is manipulated directly by
@@ -67,7 +67,7 @@ typedef struct {
* run when the menu item is activated.
* @ptr: A gpointer to a data object to be passed with the closure
*
- * Create a new GNSMenuItem with a GClosure and an additional
+ * Create a new _GNSMenuItem with a GClosure and an additional
* arbitrary data struct
*
* Returns: A pointer to the new menu item.
diff --git a/src/cocoa_menu_item.c b/src/cocoa_menu_item.c
index 29e315c..f0637f0 100644
--- a/src/cocoa_menu_item.c
+++ b/src/cocoa_menu_item.c
@@ -73,18 +73,18 @@ _gtk_accel_label_get_closure (GtkAccelLabel *label)
static void
cocoa_menu_item_free (gpointer *ptr)
{
- GNSMenuItem* item = (GNSMenuItem*) ptr;
+ _GNSMenuItem* item = (_GNSMenuItem*) ptr;
[item release];
}
-GNSMenuItem *
+_GNSMenuItem *
cocoa_menu_item_get (GtkWidget *widget)
{
- return (GNSMenuItem*) g_object_get_qdata (G_OBJECT (widget), cocoa_menu_item_quark);
+ return (_GNSMenuItem*) g_object_get_qdata (G_OBJECT (widget), cocoa_menu_item_quark);
}
static void
-cocoa_menu_item_update_state (GNSMenuItem* cocoa_item,
+cocoa_menu_item_update_state (_GNSMenuItem* cocoa_item,
GtkWidget *widget)
{
gboolean sensitive;
@@ -107,7 +107,7 @@ cocoa_menu_item_update_state (GNSMenuItem* cocoa_item,
}
static void
-cocoa_menu_item_update_checked (GNSMenuItem *cocoa_item,
+cocoa_menu_item_update_checked (_GNSMenuItem *cocoa_item,
GtkWidget *widget)
{
gboolean active, inconsistent;
@@ -126,7 +126,7 @@ cocoa_menu_item_update_checked (GNSMenuItem *cocoa_item,
}
static void
-cocoa_menu_item_update_submenu (GNSMenuItem *cocoa_item,
+cocoa_menu_item_update_submenu (_GNSMenuItem *cocoa_item,
GtkWidget *widget)
{
GtkWidget *submenu;
@@ -177,7 +177,7 @@ cocoa_menu_item_update_submenu (GNSMenuItem *cocoa_item,
}
static void
-cocoa_menu_item_update_label (GNSMenuItem *cocoa_item,
+cocoa_menu_item_update_label (_GNSMenuItem *cocoa_item,
GtkWidget *widget)
{
g_return_if_fail (cocoa_item != NULL);
@@ -191,7 +191,7 @@ cocoa_menu_item_update_label (GNSMenuItem *cocoa_item,
}
static void
-cocoa_menu_item_update_accelerator (GNSMenuItem *cocoa_item,
+cocoa_menu_item_update_accelerator (_GNSMenuItem *cocoa_item,
GtkWidget *widget)
{
GtkWidget *label;
@@ -298,7 +298,7 @@ cocoa_menu_item_accel_changed (GtkAccelGroup *accel_group,
GClosure *accel_closure,
GtkWidget *widget)
{
- GNSMenuItem *cocoa_item = cocoa_menu_item_get (widget);
+ _GNSMenuItem *cocoa_item = cocoa_menu_item_get (widget);
GtkWidget *label;
get_menu_label_text (widget, &label);
@@ -310,7 +310,7 @@ cocoa_menu_item_accel_changed (GtkAccelGroup *accel_group,
}
static void
-cocoa_menu_item_update_accel_closure (GNSMenuItem *cocoa_item,
+cocoa_menu_item_update_accel_closure (_GNSMenuItem *cocoa_item,
GtkWidget *widget)
{
GtkAccelGroup *group;
@@ -353,7 +353,7 @@ cocoa_menu_item_notify_label (GObject *object,
GParamSpec *pspec,
gpointer data)
{
- GNSMenuItem *cocoa_item = cocoa_menu_item_get (GTK_WIDGET (object));
+ _GNSMenuItem *cocoa_item = cocoa_menu_item_get (GTK_WIDGET (object));
if (!strcmp (pspec->name, "label"))
{
@@ -370,7 +370,7 @@ cocoa_menu_item_notify_label (GObject *object,
static void
cocoa_menu_item_notify (GObject *object,
GParamSpec *pspec,
- GNSMenuItem *cocoa_item)
+ _GNSMenuItem *cocoa_item)
{
if (!strcmp (pspec->name, "sensitive") ||
!strcmp (pspec->name, "visible"))
@@ -390,10 +390,10 @@ cocoa_menu_item_notify (GObject *object,
static void
cocoa_menu_item_connect (GtkWidget* menu_item,
- GNSMenuItem* cocoa_item,
+ _GNSMenuItem* cocoa_item,
GtkWidget *label)
{
- GNSMenuItem* old_item = cocoa_menu_item_get (menu_item);
+ _GNSMenuItem* old_item = cocoa_menu_item_get (menu_item);
if (old_item == cocoa_item)
return;
@@ -401,7 +401,7 @@ cocoa_menu_item_connect (GtkWidget* menu_item,
[cocoa_item retain];
if (cocoa_menu_item_quark == 0)
- cocoa_menu_item_quark = g_quark_from_static_string ("GNSMenuItem");
+ cocoa_menu_item_quark = g_quark_from_static_string ("_GNSMenuItem");
g_object_set_qdata_full (G_OBJECT (menu_item), cocoa_menu_item_quark,
cocoa_item,
@@ -431,7 +431,7 @@ cocoa_menu_item_connect (GtkWidget* menu_item,
static void
cocoa_menu_item_sync (GtkWidget* menu_item)
{
- GNSMenuItem *cocoa_item = cocoa_menu_item_get (menu_item);
+ _GNSMenuItem *cocoa_item = cocoa_menu_item_get (menu_item);
cocoa_menu_item_update_state (cocoa_item, menu_item);
if (GTK_IS_CHECK_MENU_ITEM (menu_item))
@@ -453,7 +453,7 @@ void
cocoa_menu_item_add_item (NSMenu* cocoa_menu, GtkWidget* menu_item, int index)
{
GtkWidget* label = NULL;
- GNSMenuItem *cocoa_item;
+ _GNSMenuItem *cocoa_item;
DEBUG ("add %s to menu %s separator ? %d\n",
get_menu_label_text (menu_item, NULL),
@@ -469,7 +469,7 @@ cocoa_menu_item_add_item (NSMenu* cocoa_menu, GtkWidget* menu_item, int index)
}
if (GTK_IS_SEPARATOR_MENU_ITEM (menu_item)) {
- cocoa_item = (GNSMenuItem*)[GNSMenuItem separatorItem];
+ cocoa_item = (_GNSMenuItem*)[_GNSMenuItem separatorItem];
DEBUG ("\ta separator\n");
} else {
const gchar* text = get_menu_label_text (menu_item, &label);
@@ -480,16 +480,16 @@ cocoa_menu_item_add_item (NSMenu* cocoa_menu, GtkWidget* menu_item, int index)
G_OBJECT(menu_item));
g_closure_set_marshal(menu_action, g_cclosure_marshal_VOID__VOID);
- cocoa_item = [[GNSMenuItem alloc]
+ cocoa_item = [[_GNSMenuItem alloc]
initWithTitle: title
aGClosure:menu_action andPointer:NULL];
DEBUG ("\tan item\n");
}
- cocoa_menu_item_connect (menu_item, (GNSMenuItem*) cocoa_item, label);
+ cocoa_menu_item_connect (menu_item, (_GNSMenuItem*) cocoa_item, label);
[ cocoa_item setEnabled:YES];
- /* connect GtkMenuItem and GNSMenuItem so that we can notice changes
+ /* connect GtkMenuItem and _GNSMenuItem so that we can notice changes
* to accel/label/submenu etc. */
if (index >= 0 && index < [cocoa_menu numberOfItems])
@@ -513,21 +513,21 @@ cocoa_menu_item_add_submenu (GtkMenuShell *menu_shell,
count = [cocoa_menu numberOfItems];
/* First go through the cocoa menu and mark all of the items unused. */
for (index = 0; index < count; index++) {
- GNSMenuItem *indexedItem = (GNSMenuItem*)[cocoa_menu itemAtIndex: index];
+ _GNSMenuItem *indexedItem = (_GNSMenuItem*)[cocoa_menu itemAtIndex: index];
if (GTK_IS_MENU_BAR(menu_shell) &&
- (indexedItem == [(GNSMenuBar*)cocoa_menu windowsMenu] ||
- indexedItem == [(GNSMenuBar*)cocoa_menu helpMenu] ||
- indexedItem == [(GNSMenuBar*)cocoa_menu appMenu]))
+ (indexedItem == [(_GNSMenuBar*)cocoa_menu windowsMenu] ||
+ indexedItem == [(_GNSMenuBar*)cocoa_menu helpMenu] ||
+ indexedItem == [(_GNSMenuBar*)cocoa_menu appMenu]))
continue;
if ([[cocoa_menu itemAtIndex: index] respondsToSelector: @selector(mark)])
- [(GNSMenuItem*)[cocoa_menu itemAtIndex: index] mark];
+ [(_GNSMenuItem*)[cocoa_menu itemAtIndex: index] mark];
}
index = toplevel ? 1 : 0; //Skip the 0th menu item on the menu bar
/* Now iterate over the menu shell and check it against the cocoa menu */
children = gtk_container_get_children (GTK_CONTAINER (menu_shell));
for (l = children; l; l = l->next) {
GtkWidget *menu_item = (GtkWidget*) l->data;
- GNSMenuItem *cocoa_item = cocoa_menu_item_get (menu_item);
+ _GNSMenuItem *cocoa_item = cocoa_menu_item_get (menu_item);
if ([cocoa_item menu] && [cocoa_item menu] != cocoa_menu)
/* This item has been moved to another menu; skip it */
continue;
@@ -568,7 +568,7 @@ cocoa_menu_item_add_submenu (GtkMenuShell *menu_shell,
}
/* Iterate over the cocoa menu again removing anything that's still marked */
for (index = 0; index < [cocoa_menu numberOfItems]; index++) {
- GNSMenuItem *item = (GNSMenuItem*)[cocoa_menu itemAtIndex: index];
+ _GNSMenuItem *item = (_GNSMenuItem*)[cocoa_menu itemAtIndex: index];
if (([item respondsToSelector: @selector(isMarked)]) && [item isMarked])
[cocoa_menu removeItem: item];
}
diff --git a/src/cocoa_menu_item.h b/src/cocoa_menu_item.h
index e104a48..78fc249 100644
--- a/src/cocoa_menu_item.h
+++ b/src/cocoa_menu_item.h
@@ -28,7 +28,7 @@
#include "cocoa_menu.h"
#import "GNSMenuItem.h"
-GNSMenuItem *cocoa_menu_item_get(GtkWidget* menu_item);
+_GNSMenuItem *cocoa_menu_item_get(GtkWidget* menu_item);
void cocoa_menu_item_add_item (NSMenu* cocoa_menu,
GtkWidget* menu_item,
diff --git a/src/gtkosxapplication_quartz.c b/src/gtkosxapplication_quartz.c
index e6cb439..b4394d9 100644
--- a/src/gtkosxapplication_quartz.c
+++ b/src/gtkosxapplication_quartz.c
@@ -77,7 +77,7 @@ parent_set_emission_hook (GSignalInvocationHint *ihint,
if (GTK_IS_MENU_ITEM (instance)) {
GtkWidget *old_parent = (GtkWidget*) g_value_get_object (param_values + 1);
GtkWidget *new_parent = gtk_widget_get_parent(instance);
- GNSMenuItem *cocoa_item = cocoa_menu_item_get(instance);
+ _GNSMenuItem *cocoa_item = cocoa_menu_item_get(instance);
/* If neither the old parent or the new parent has a cocoa menu, then
we're not really interested in this. */
if (!( (old_parent && GTK_IS_WIDGET(old_parent)
@@ -87,7 +87,7 @@ parent_set_emission_hook (GSignalInvocationHint *ihint,
return TRUE;
if (GTK_IS_MENU_SHELL (old_parent)) {
- GNSMenuBar *cocoa_menu = (GNSMenuBar*)cocoa_menu_get (old_parent);
+ _GNSMenuBar *cocoa_menu = (_GNSMenuBar*)cocoa_menu_get (old_parent);
[cocoa_item removeFromMenu: cocoa_menu];
}
@@ -97,7 +97,7 @@ parent_set_emission_hook (GSignalInvocationHint *ihint,
there isn't some other item in the menu that's been moved to the
app-menu for quartz. */
if (GTK_IS_MENU_SHELL (new_parent) && cocoa_menu_get(new_parent)) {
- GNSMenuBar *cocoa_menu = (GNSMenuBar*)cocoa_menu_get (new_parent);
+ _GNSMenuBar *cocoa_menu = (_GNSMenuBar*)cocoa_menu_get (new_parent);
if (GTK_IS_MENU_BAR(new_parent) && cocoa_menu &&
[cocoa_menu respondsToSelector: @selector(resync)]) {
[cocoa_menu resync];
@@ -141,10 +141,10 @@ parent_set_emission_hook_remove (GtkWidget *widget,
*
* Returns: a pointer to the NSMenuItem now holding the menu.
*/
-static GNSMenuItem*
+static _GNSMenuItem*
add_to_menubar (GtkosxApplication *self, NSMenu *menu, int pos)
{
- GNSMenuItem *dummyItem = [[GNSMenuItem alloc] initWithTitle:@""
+ _GNSMenuItem *dummyItem = [[_GNSMenuItem alloc] initWithTitle:@""
action:nil keyEquivalent:@""];
NSMenu *menubar = [NSApp mainMenu];
@@ -172,7 +172,7 @@ add_to_menubar (GtkosxApplication *self, NSMenu *menu, int pos)
*
* Returns: A pointer to the menu item.
*/
-static GNSMenuItem*
+static _GNSMenuItem*
create_apple_menu (GtkosxApplication *self)
{
NSMenuItem *menuitem;
@@ -233,14 +233,14 @@ create_apple_menu (GtkosxApplication *self)
*
* Returns: A pointer to the menu item on the mainMenu.
*/
-static GNSMenuItem *
+static _GNSMenuItem *
create_window_menu (GtkosxApplication *self)
{
NSString *title = NSLocalizedStringFromTable(@"Window",
@"GtkOSXApplication",
@"Window Menu title");
NSMenu *window_menu = [[[NSMenu alloc] initWithTitle: title] autorelease];
- GtkMenuBar *menubar = [(GNSMenuBar*)[NSApp mainMenu] menuBar];
+ GtkMenuBar *menubar = [(_GNSMenuBar*)[NSApp mainMenu] menuBar];
GtkWidget *parent = NULL;
GdkWindow *win = NULL;
NSWindow *nswin = NULL;
@@ -263,7 +263,7 @@ create_window_menu (GtkosxApplication *self)
[NSApp setWindowsMenu:window_menu];
if (nswin)
[NSApp addWindowsItem: nswin title: [nswin title] filename: NO];
- pos = [[NSApp mainMenu] indexOfItem: [(GNSMenuBar*)[NSApp mainMenu] helpMenu]];
+ pos = [[NSApp mainMenu] indexOfItem: [(_GNSMenuBar*)[NSApp mainMenu] helpMenu]];
return add_to_menubar (self, window_menu, pos);
}
@@ -620,7 +620,7 @@ gtkosx_application_cleanup(GtkosxApplication *self)
* window_focus_cb:
* @window: The application window receiving focus
* @event: The GdkEvent. Not used.
- * @menubar: The GNSMenubar associated with window
+ * @menubar: The _GNSMenubar associated with window
*
* Changes the active menubar when the application switches
* windows. If you switch window focus programmatically, make sure
@@ -628,7 +628,7 @@ gtkosx_application_cleanup(GtkosxApplication *self)
* this handler.
*/
static gboolean
-window_focus_cb (GtkWindow* window, GdkEventFocus *event, GNSMenuBar *menubar)
+window_focus_cb (GtkWindow* window, GdkEventFocus *event, _GNSMenuBar *menubar)
{
[NSApp setMainMenu: menubar];
return FALSE;
@@ -648,16 +648,16 @@ window_focus_cb (GtkWindow* window, GdkEventFocus *event, GNSMenuBar *menubar)
void
gtkosx_application_set_menu_bar (GtkosxApplication *self, GtkMenuShell *menu_shell)
{
- GNSMenuBar* cocoa_menubar;
+ _GNSMenuBar* cocoa_menubar;
NSMenu* old_menubar = [NSApp mainMenu];
GtkWidget *parent = gtk_widget_get_toplevel(GTK_WIDGET(menu_shell));
gulong emission_hook_id;
g_return_if_fail (GTK_IS_MENU_SHELL (menu_shell));
- cocoa_menubar = (GNSMenuBar*)cocoa_menu_get(GTK_WIDGET (menu_shell));
+ cocoa_menubar = (_GNSMenuBar*)cocoa_menu_get(GTK_WIDGET (menu_shell));
if (!cocoa_menubar) {
- cocoa_menubar = [[[GNSMenuBar alloc] initWithGtkMenuBar:
+ cocoa_menubar = [[[_GNSMenuBar alloc] initWithGtkMenuBar:
GTK_MENU_BAR(menu_shell)] autorelease];
cocoa_menu_connect(GTK_WIDGET (menu_shell), cocoa_menubar);
/* turn off auto-enabling for the menu - its silly and slow and
@@ -706,7 +706,7 @@ gtkosx_application_set_menu_bar (GtkosxApplication *self, GtkMenuShell *menu_she
void
gtkosx_application_sync_menubar (GtkosxApplication *self)
{
- [(GNSMenuBar*)[NSApp mainMenu] resync];
+ [(_GNSMenuBar*)[NSApp mainMenu] resync];
}
@@ -735,7 +735,7 @@ gtkosx_application_insert_app_menu_item (GtkosxApplication* self,
gint index) {
cocoa_menu_item_add_item ([[[NSApp mainMenu] itemAtIndex: 0] submenu],
item, index);
- [(GNSMenuItem*)[[[[NSApp mainMenu] itemAtIndex: 0] submenu]
+ [(_GNSMenuItem*)[[[[NSApp mainMenu] itemAtIndex: 0] submenu]
itemAtIndex: index] setHidden: NO];
}
@@ -756,20 +756,20 @@ void
gtkosx_application_set_window_menu(GtkosxApplication *self,
GtkMenuItem *menu_item)
{
- GNSMenuBar *cocoa_menubar = (GNSMenuBar*)[NSApp mainMenu];
+ _GNSMenuBar *cocoa_menubar = (_GNSMenuBar*)[NSApp mainMenu];
g_return_if_fail(cocoa_menubar != NULL);
if (menu_item) {
GtkWidget *parent = NULL;
GdkWindow *win = NULL;
NSWindow *nswin = NULL;
- GNSMenuItem *cocoa_item = cocoa_menu_item_get(GTK_WIDGET(menu_item));
+ _GNSMenuItem *cocoa_item = cocoa_menu_item_get(GTK_WIDGET(menu_item));
g_return_if_fail(cocoa_item != NULL);
[cocoa_menubar setWindowsMenu: cocoa_item];
[NSApp setWindowsMenu: [cocoa_item submenu]];
}
else {
- GNSMenuItem *cocoa_item = create_window_menu (self);
+ _GNSMenuItem *cocoa_item = create_window_menu (self);
[cocoa_menubar setWindowsMenu: cocoa_item];
}
}
@@ -791,16 +791,16 @@ void
gtkosx_application_set_help_menu (GtkosxApplication *self,
GtkMenuItem *menu_item)
{
- GNSMenuBar *cocoa_menubar = (GNSMenuBar*)[NSApp mainMenu];
+ _GNSMenuBar *cocoa_menubar = (_GNSMenuBar*)[NSApp mainMenu];
g_return_if_fail(cocoa_menubar != NULL);
if (menu_item) {
- GNSMenuItem *cocoa_item = cocoa_menu_item_get(GTK_WIDGET(menu_item));
+ _GNSMenuItem *cocoa_item = cocoa_menu_item_get(GTK_WIDGET(menu_item));
g_return_if_fail(cocoa_item != NULL);
[cocoa_menubar setHelpMenu: cocoa_item];
}
else {
- GNSMenuItem *menuitem = [[[GNSMenuItem alloc] initWithTitle: @"Help"
+ _GNSMenuItem *menuitem = [[[_GNSMenuItem alloc] initWithTitle: @"Help"
action: NULL keyEquivalent: @""] autorelease];
[cocoa_menubar setHelpMenu: menuitem];
[cocoa_menubar addItem: [cocoa_menubar helpMenu]];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]