зеркало из https://github.com/mono/mail-archives.git
95 строки
3.9 KiB
HTML
95 строки
3.9 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-osx] KeyEquivalents not working for MonoMac NSMenuItem when used in a GTK# app
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:mono-osx%40lists.ximian.com?Subject=Re%3A%20%5BMono-osx%5D%20KeyEquivalents%20not%20working%20for%20MonoMac%20NSMenuItem%20when%0A%20used%20in%20a%20GTK%23%20app&In-Reply-To=%3C56011E70.6030104%40gmail.com%3E">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<style type="text/css">
|
|
pre {
|
|
white-space: pre-wrap; /* css-2.1, curent FF, Opera, Safari */
|
|
}
|
|
</style>
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="005323.html">
|
|
<LINK REL="Next" HREF="005325.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-osx] KeyEquivalents not working for MonoMac NSMenuItem when used in a GTK# app</H1>
|
|
<B>Vladimir Dimitrov</B>
|
|
<A HREF="mailto:mono-osx%40lists.ximian.com?Subject=Re%3A%20%5BMono-osx%5D%20KeyEquivalents%20not%20working%20for%20MonoMac%20NSMenuItem%20when%0A%20used%20in%20a%20GTK%23%20app&In-Reply-To=%3C56011E70.6030104%40gmail.com%3E"
|
|
TITLE="[Mono-osx] KeyEquivalents not working for MonoMac NSMenuItem when used in a GTK# app">vlad.dimitrov at gmail.com
|
|
</A><BR>
|
|
<I>Tue Sep 22 09:25:04 UTC 2015</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="005323.html">[Mono-osx] Mono framework installed on OS X v 10.10.5, but not usable from terminal
|
|
</A></li>
|
|
<LI>Next message: <A HREF="005325.html">[Mono-osx] App crashes at mono_jit_exec when launched from Xcode
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#5324">[ date ]</a>
|
|
<a href="thread.html#5324">[ thread ]</a>
|
|
<a href="subject.html#5324">[ subject ]</a>
|
|
<a href="author.html#5324">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>Hello,
|
|
|
|
I posted this question on stack overflow yesterday too:
|
|
<A HREF="http://stackoverflow.com/questions/32697645/keyequivalents-not-working-for-monomac-nsmenuitem-when-used-in-a-gtk-app">http://stackoverflow.com/questions/32697645/keyequivalents-not-working-for-monomac-nsmenuitem-when-used-in-a-gtk-app</A>
|
|
|
|
In brief I am trying to run a GTK# application on Mac OS and use MonoMac
|
|
to make it look better. One of the key things I am trying to get rid of
|
|
is the use of libigemacintegration.dylib which we used to integrate the
|
|
GTK# menu with the Cocoa menu. I used MonoDevelop as a code reference
|
|
but I can't make the keyboard shortcuts work for the menu. They show up
|
|
in the menu, but they never get activated. And in MonoDevelop they work
|
|
fine...
|
|
|
|
This is the sample code I am using:
|
|
|
|
NSApplication.InitDrawingBridge ();
|
|
NSApplication.Init ();
|
|
|
|
NSMenuItem super = new NSMenuItem (DataHelper.ProductName);
|
|
super.Submenu = new NSMenu (DataHelper.ProductName);
|
|
|
|
NSMenu mainMenu = new NSMenu ();
|
|
mainMenu.AddItem (super);
|
|
|
|
NSApplication.SharedApplication.MainMenu = mainMenu;
|
|
|
|
< menu initialization comes here >
|
|
|
|
NSApplication.SharedApplication.Delegate = new AppDelegate ();
|
|
NSApplication.SharedApplication.ActivateIgnoringOtherApps (true);
|
|
|
|
Thanks,
|
|
Vladimir
|
|
</PRE>
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="005323.html">[Mono-osx] Mono framework installed on OS X v 10.10.5, but not usable from terminal
|
|
</A></li>
|
|
<LI>Next message: <A HREF="005325.html">[Mono-osx] App crashes at mono_jit_exec when launched from Xcode
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#5324">[ date ]</a>
|
|
<a href="thread.html#5324">[ thread ]</a>
|
|
<a href="subject.html#5324">[ subject ]</a>
|
|
<a href="author.html#5324">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/mono-osx">More information about the Mono-osx
|
|
mailing list</a><br>
|
|
</body></html>
|