从菜单中删除“开始听写”和“特殊字符” [英] Remove 'Start Dictation' and 'Special Characters' from menu

查看:149
本文介绍了从菜单中删除“开始听写”和“特殊字符”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要在我的Cocoa应用程序中启用复制和粘贴,我向菜单添加了两个新菜单项(复制和粘贴),并将选择器从每个项目拖到第一个响应者(复制和粘贴)。但是,复制和粘贴菜单项下面会显示两个额外的项目:开始听写和特殊字符。

To enable Copy and Paste in my Cocoa app, I added two new menu items (copy and paste) to the menu and dragged the selector from each item to the first responder (copy and paste). However, two extra items show up below the Copy and Paste menu items: 'Start Dictation' and 'Special Characters' .

我无法弄清楚它们为什么出现或如何删除它们。

I haven't been able to figure out why they show up or how I remove them.

,我什至不希望复制和粘贴菜单项可见。我只希望我的应用程序的用户能够将东西(例如,来自电子邮件,文本文档等)粘贴到我的应用程序之一的文本字段中。

Optimally, I don't even want the copy and paste menu items to be visible. I just want the user of my app to be able to paste stuff (i.e. from an email, text doc etc) into a text field on one of the forms in my app.

推荐答案

Mac OS X Internals:一种系统方法 Qt Mac(重新)移动特殊字符...在编辑菜单中操作,您可以在加载笔尖之前在main()中执行类似操作(但不支持该API):

As mentioned in Mac OS X Internals: A Systems Approach and Qt Mac (Re)move "Special Characters..." action in Edit menu, you can do something like this in main() before you load the nib (but it is not supported API):

[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"NSDisabledDictationMenuItem"];
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"NSDisabledCharacterPaletteMenuItem"];

这篇关于从菜单中删除“开始听写”和“特殊字符”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆