2004-05-07 Mike Kestner <mkestner@ximian.com>
* gtk/Gtk.metadata : hide some *MenuItem ctors. * gtk/CheckMenuItem.custom : implement string ctor. * gtk/ImageMenuItem.custom : implement string ctor. * gtk/MenuItem.custom : use AccelLabel. * gtk/RadioMenuItem.custom : fix string ctor for subclassing. * gtk/Makefile.am : add new customs. svn path=/trunk/gtk-sharp/; revision=26935
This commit is contained in:
parent
d09ba525b1
commit
133a5c8715
7 changed files with 86 additions and 11 deletions
|
@ -1,3 +1,12 @@
|
|||
2004-05-07 Mike Kestner <mkestner@ximian.com>
|
||||
|
||||
* gtk/Gtk.metadata : hide some *MenuItem ctors.
|
||||
* gtk/CheckMenuItem.custom : implement string ctor.
|
||||
* gtk/ImageMenuItem.custom : implement string ctor.
|
||||
* gtk/MenuItem.custom : use AccelLabel.
|
||||
* gtk/RadioMenuItem.custom : fix string ctor for subclassing.
|
||||
* gtk/Makefile.am : add new customs.
|
||||
|
||||
2004-05-07 Mike Kestner <mkestner@ximian.com>
|
||||
|
||||
* gtk/Gtk.metadata : hide some MenuItem ctors.
|
||||
|
|
24
gtk/CheckMenuItem.custom
Normal file
24
gtk/CheckMenuItem.custom
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Gtk.CheckMenuItem.custom - Gtk CheckMenuItem class customizations
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
//
|
||||
// Copyright (C) 2004 Novell, Inc.
|
||||
//
|
||||
// This code is inserted after the automatically generated code.
|
||||
|
||||
[DllImport ("libgtk-win32-2.0-0.dll")]
|
||||
static extern IntPtr gtk_check_menu_item_new_with_mnemonic (string label);
|
||||
|
||||
public CheckMenuItem (string label) : base (IntPtr.Zero)
|
||||
{
|
||||
if (GetType() != typeof (CheckMenuItem)) {
|
||||
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;
|
||||
}
|
||||
|
||||
Raw = gtk_check_menu_item_new_with_mnemonic (label);
|
||||
}
|
|
@ -76,7 +76,8 @@
|
|||
<attr path="/api/namespace/object[@cname='GtkButton']/signal[@name='Leave']" name="name">Left</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkCalendar']/method[@name='DisplayOptions']" name="name">SetDisplayOptions</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkCheckButton']/constructor[@cname='gtk_check_button_new_with_mnemonic']" name="preferred">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkCheckMenuItem']/constructor[@cname='gtk_check_menu_item_new_with_mnemonic']" name="preferred">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkCheckMenuItem']/constructor[@cname='gtk_check_menu_item_new_with_mnemonic']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkCheckMenuItem']/constructor[@cname='gtk_check_menu_item_new_with_label']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkCheckMenuItem']/method[@name='Toggled']" name="name">Toggle</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkClipboard']/method[@name='SetWithData']/*/*[@name='targets']" name="array">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkClipboard']/method[@name='SetWithOwner']/*/*[@name='targets']" name="array">1</attr>
|
||||
|
@ -106,7 +107,8 @@
|
|||
<attr path="/api/namespace/object[@cname='GtkHandleBox']/property[@name='ShadowType']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkHScale']/constructor[@cname='gtk_hscale_new']/*/*[@type='GtkAdjustment*']" name="null_ok">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkHScrollbar']/constructor[@cname='gtk_hscrollbar_new']/*/*[@type='GtkAdjustment*']" name="null_ok">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkImageMenuItem']/constructor[@cname='gtk_image_menu_item_new_with_mnemonic']" name="preferred">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkImageMenuItem']/constructor[@cname='gtk_image_menu_item_new_with_mnemonic']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkImageMenuItem']/constructor[@cname='gtk_image_menu_item_new_with_label']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkImage']/method[@name='SetFromPixmap']/*/*[@type='GdkBitmap*']" name="null_ok">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkIMContext']/signal[@name='DeleteSurrounding']" name="name">SurroundingDeleted</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkInvisible']/property[@name='Screen']" name="new_flag">1</attr>
|
||||
|
|
25
gtk/ImageMenuItem.custom
Normal file
25
gtk/ImageMenuItem.custom
Normal file
|
@ -0,0 +1,25 @@
|
|||
// Gtk.ImageMenuItem.custom - Gtk ImageMenuItem class customizations
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
//
|
||||
// Copyright (C) 2004 Novell, Inc.
|
||||
//
|
||||
// This code is inserted after the automatically generated code.
|
||||
|
||||
[DllImport ("libgtk-win32-2.0-0.dll")]
|
||||
static extern IntPtr gtk_image_menu_item_new_with_mnemonic (string label);
|
||||
|
||||
public ImageMenuItem (string label) : base (IntPtr.Zero)
|
||||
{
|
||||
if (GetType() != typeof (ImageMenuItem)) {
|
||||
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;
|
||||
}
|
||||
|
||||
Raw = gtk_image_menu_item_new_with_mnemonic (label);
|
||||
}
|
||||
|
|
@ -33,6 +33,7 @@ customs = \
|
|||
Adjustment.custom \
|
||||
Button.custom \
|
||||
Calendar.custom \
|
||||
CheckMenuItem.custom \
|
||||
Clipboard.custom \
|
||||
ColorSelection.custom \
|
||||
ColorSelectionDialog.custom \
|
||||
|
@ -45,6 +46,7 @@ customs = \
|
|||
HBox.custom \
|
||||
IconFactory.custom \
|
||||
IconSet.custom \
|
||||
ImageMenuItem.custom \
|
||||
Label.custom \
|
||||
Layout.custom \
|
||||
ListStore.custom \
|
||||
|
|
|
@ -13,7 +13,11 @@
|
|||
{
|
||||
if (GetType() != typeof (MenuItem)) {
|
||||
CreateNativeObject (new string [0], new GLib.Value [0]);
|
||||
Add (new Label (label));
|
||||
AccelLabel al = new AccelLabel ("");
|
||||
al.TextWithMnemonic = label;
|
||||
al.SetAlignment (0.0f, 0.5f);
|
||||
Add (al);
|
||||
al.AccelWidget = this;
|
||||
}
|
||||
|
||||
Raw = gtk_menu_item_new_with_mnemonic (label);
|
||||
|
|
|
@ -1,11 +1,20 @@
|
|||
// Gtk.RadioMenuItem.custom - Gtk RadioMenuItem customizations
|
||||
//
|
||||
// RadioMenuItem.custom
|
||||
//
|
||||
// Author: John Luke <jluke@cfl.rr.com>
|
||||
// Authors: John Luke <jluke@cfl.rr.com>
|
||||
// Mike Kestner <mkestner@ximian.com>
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
|
||||
// creates a new group for this RadioMenuItem
|
||||
public RadioMenuItem (string label)
|
||||
{
|
||||
Raw = gtk_radio_menu_item_new_with_mnemonic (IntPtr.Zero, label);
|
||||
}
|
||||
public RadioMenuItem (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;
|
||||
}
|
||||
|
||||
Raw = gtk_radio_menu_item_new_with_mnemonic (IntPtr.Zero, label);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue