2009-05-06 Mike Kestner <mkestner@novell.com>
* gtk/RadioMenuItem.custom: implement subclassing for group/label ctor. [Fixes #320971] svn path=/trunk/gtk-sharp/; revision=133706
This commit is contained in:
parent
71656c5839
commit
64d2064d48
3 changed files with 28 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2009-05-06 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* gtk/RadioMenuItem.custom: implement subclassing for group/label
|
||||
ctor. [Fixes #320971]
|
||||
|
||||
2009-05-06 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* gtk/PaperSize.custom: add static props for Letter and the other
|
||||
|
|
|
@ -561,6 +561,7 @@
|
|||
<attr path="/api/namespace/object[@cname='GtkRadioButton']/property[@name='Group']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkRadioMenuItem']/constructor[@cname='gtk_radio_menu_item_new']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkRadioMenuItem']/constructor[@cname='gtk_radio_menu_item_new_with_label']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkRadioMenuItem']/constructor[@cname='gtk_radio_menu_item_new_with_mnemonic']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkRadioMenuItem']/constructor[@cname='gtk_radio_menu_item_new_with_label_from_widget']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkRadioToolButton']/constructor[@cname='gtk_radio_tool_button_new']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkRadioToolButton']/constructor[@cname='gtk_radio_tool_button_new_from_stock']" name="hidden">1</attr>
|
||||
|
|
|
@ -36,3 +36,25 @@
|
|||
Raw = gtk_radio_menu_item_new_with_mnemonic (IntPtr.Zero, label_as_native);
|
||||
GLib.Marshaller.Free (label_as_native);
|
||||
}
|
||||
|
||||
|
||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||
static extern IntPtr gtk_radio_menu_item_new_with_mnemonic(IntPtr group, IntPtr label);
|
||||
|
||||
public RadioMenuItem (GLib.SList group, string label) : base (IntPtr.Zero)
|
||||
{
|
||||
if (GetType () != typeof (RadioMenuItem)) {
|
||||
CreateNativeObject (new string [0], new GLib.Value [0]);
|
||||
AccelLabel al = new AccelLabel ("");
|
||||
al.TextWithMnemonic = label;
|
||||
al.SetAlignment (0.0f, 0.5f);
|
||||
Add (al);
|
||||
al.AccelWidget = this;
|
||||
Group = group;
|
||||
return;
|
||||
}
|
||||
IntPtr native_label = GLib.Marshaller.StringToPtrGStrdup (label);
|
||||
Raw = gtk_radio_menu_item_new_with_mnemonic(group == null ? IntPtr.Zero : group.Handle, native_label);
|
||||
GLib.Marshaller.Free (native_label);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue