From 38a7a49cfb4345072559ab63f881ec14defee5b7 Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Tue, 15 Jun 2004 13:38:44 +0000 Subject: [PATCH] 2004-06-15 Mike Kestner * gtk/Gtk.metadata : hide the button_new_from_stock ctor. * gtk/Button.custom : add a manual ctor implementation. svn path=/trunk/gtk-sharp/; revision=29598 --- ChangeLog | 5 +++++ gtk/Button.custom | 25 +++++++++++++++++++++++++ gtk/Gtk.metadata | 3 +-- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 74db9e970..23e6630fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-06-15 Mike Kestner + + * gtk/Gtk.metadata : hide the button_new_from_stock ctor. + * gtk/Button.custom : add a manual ctor implementation. + 2004-06-14 Mike Kestner * configure.in : another "really frozen this time" release. diff --git a/gtk/Button.custom b/gtk/Button.custom index da8a2d179..0fbefe168 100644 --- a/gtk/Button.custom +++ b/gtk/Button.custom @@ -1,3 +1,28 @@ +// Gtk.Button.custom - Gtk Button class customizations +// +// Author: Mike Kestner +// +// 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_button_new_from_stock(string stock_id); + +public Button (string stock_id) : base (IntPtr.Zero) +{ + if (GetType () != typeof (Button)) { + GLib.Value[] vals = new GLib.Value [2]; + string[] names = new string [2]; + names [0] = "label"; + vals [0] = new GLib.Value (stock_id); + names [1] = "use_stock"; + vals [1] = new GLib.Value (true); + CreateNativeObject (names, vals); + return; + } + Raw = gtk_button_new_from_stock(stock_id); +} [DllImport("gtksharpglue")] static extern int gtksharp_button_get_in_button (IntPtr button); diff --git a/gtk/Gtk.metadata b/gtk/Gtk.metadata index b2974f987..571e313e6 100644 --- a/gtk/Gtk.metadata +++ b/gtk/Gtk.metadata @@ -70,8 +70,7 @@ 1 PackEnd PackStart - 1 - label + 1 Click Press Release