From 9463e98ca22a387eceb1689ccf25efa259adacba Mon Sep 17 00:00:00 2001 From: Bertrand Lorentz Date: Sat, 16 Jul 2011 17:53:21 +0200 Subject: [PATCH] gtk: move ComboBoxText custom code to a partial class Also rename the constructor parameter to has_entry and pass its value to CreateNativeObject. --- gtk/{ComboBoxText.custom => ComboBoxText.cs} | 15 ++++++++++----- gtk/Makefile.am | 1 - 2 files changed, 10 insertions(+), 6 deletions(-) rename gtk/{ComboBoxText.custom => ComboBoxText.cs} (77%) diff --git a/gtk/ComboBoxText.custom b/gtk/ComboBoxText.cs similarity index 77% rename from gtk/ComboBoxText.custom rename to gtk/ComboBoxText.cs index c891084a3..a5f4c0914 100644 --- a/gtk/ComboBoxText.custom +++ b/gtk/ComboBoxText.cs @@ -1,4 +1,4 @@ -// ComboBoxText.custom - Gtk ComboBoxText customizations +// ComboBoxText.cs - Gtk ComboBoxText customizations // // Authors: Bertrand Lorentz // @@ -18,14 +18,18 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - protected ComboBoxText (bool with_entry) : base (IntPtr.Zero) +namespace Gtk { + + public partial class ComboBoxText { + + protected ComboBoxText (bool has_entry) : base (IntPtr.Zero) { if (GetType () != typeof (ComboBoxText)) { - CreateNativeObject (new string [0], new GLib.Value[0]); + CreateNativeObject (new string[] { "has-entry" }, new GLib.Value[] { new GLib.Value (has_entry) }); return; } - if (with_entry) { + if (has_entry) { Raw = gtk_combo_box_text_new_with_entry (); } else { Raw = gtk_combo_box_text_new (); @@ -37,4 +41,5 @@ return (Gtk.Entry)Child; } } - + } +} diff --git a/gtk/Makefile.am b/gtk/Makefile.am index c3cb221cd..c9e2c4837 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -54,7 +54,6 @@ customs = \ ColorSelection.custom \ ColorSelectionDialog.custom \ ComboBox.custom \ - ComboBoxText.custom \ Container.custom \ Dialog.custom \ Drag.custom \