зеркало из https://github.com/mono/mail-archives.git
95 строки
3.5 KiB
HTML
95 строки
3.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Gtk-sharp-list] Disabling UIManager Actions
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=Re%3A%20%5BGtk-sharp-list%5D%20Disabling%20UIManager%20Actions&In-Reply-To=%3C1381155169121-4661053.post%40n4.nabble.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="011331.html">
|
|
<LINK REL="Next" HREF="011332.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Gtk-sharp-list] Disabling UIManager Actions</H1>
|
|
<B>LiamDyalog</B>
|
|
<A HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=Re%3A%20%5BGtk-sharp-list%5D%20Disabling%20UIManager%20Actions&In-Reply-To=%3C1381155169121-4661053.post%40n4.nabble.com%3E"
|
|
TITLE="[Gtk-sharp-list] Disabling UIManager Actions">liam at dyalog.com
|
|
</A><BR>
|
|
<I>Mon Oct 7 14:12:49 UTC 2013</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="011331.html">[Gtk-sharp-list] Is there a gdl-sharp that plays well with Windows?
|
|
</A></li>
|
|
<LI>Next message: <A HREF="011332.html">[Gtk-sharp-list] Gtk# installer without mono for Windows
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#11330">[ date ]</a>
|
|
<a href="thread.html#11330">[ thread ]</a>
|
|
<a href="subject.html#11330">[ subject ]</a>
|
|
<a href="author.html#11330">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>I know this is stale but for anyone coming across this now there is actually
|
|
a way to get the UIManager.GetAction() function to retrieve the action
|
|
you're looking for. You need to give it the path of a "proxy widget"
|
|
connected to the action that you're trying to access.
|
|
|
|
For example, imagine you have a simple MenuBar:
|
|
- MenuBar
|
|
- HelpMenu
|
|
- About
|
|
|
|
The xml might look like:
|
|
<ui>
|
|
<menubar name='MenuBar'>
|
|
<menu action='HelpMenu'>
|
|
<menuitem action='About'/>
|
|
</menu>
|
|
</menubar>
|
|
</ui>
|
|
|
|
The path you need to pass to the GetAction function:
|
|
var action = uiManager.GetAction("/MenuBar/HelpMenu/About"); // The leading
|
|
forward slash is important
|
|
|
|
At which point you could set the sensitivity from the variable you have etc.
|
|
|
|
|
|
|
|
--
|
|
View this message in context: <A HREF="http://mono.1490590.n4.nabble.com/Gtk-sharp-list-Disabling-UIManager-Actions-tp1544168p4661053.html">http://mono.1490590.n4.nabble.com/Gtk-sharp-list-Disabling-UIManager-Actions-tp1544168p4661053.html</A>
|
|
Sent from the Mono - Gtk# mailing list archive at Nabble.com.
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="011331.html">[Gtk-sharp-list] Is there a gdl-sharp that plays well with Windows?
|
|
</A></li>
|
|
<LI>Next message: <A HREF="011332.html">[Gtk-sharp-list] Gtk# installer without mono for Windows
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#11330">[ date ]</a>
|
|
<a href="thread.html#11330">[ thread ]</a>
|
|
<a href="subject.html#11330">[ subject ]</a>
|
|
<a href="author.html#11330">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">More information about the Gtk-sharp-list
|
|
mailing list</a><br>
|
|
</body></html>
|