From 835866aab819b8fb1564e7a6a604f08aca10ab7f Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Wed, 11 Feb 2004 22:23:11 +0000 Subject: [PATCH] 2004-02-11 Mike Kestner * gtk/*.custom : don't use element_type ctor for GObject lists. svn path=/trunk/gtk-sharp/; revision=22996 --- ChangeLog | 4 ++++ gtk/Container.custom | 6 +++--- gtk/TextChildAnchor.custom | 2 +- gtk/TreeView.custom | 2 +- gtk/TreeViewColumn.custom | 2 +- gtk/Window.custom | 10 +++++----- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index ccf47d25c..feafde0c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-02-11 Mike Kestner + + * gtk/*.custom : don't use element_type ctor for GObject lists. + 2004-02-11 Mike Kestner * gtk/*.custom : return 0 length arrays, not null. diff --git a/gtk/Container.custom b/gtk/Container.custom index bde2af9ca..c7abbddec 100644 --- a/gtk/Container.custom +++ b/gtk/Container.custom @@ -13,7 +13,7 @@ public Widget[] Children { if (list_ptr == IntPtr.Zero) return new Widget [0]; - GLib.List list = new GLib.List (list_ptr, typeof (Gtk.Widget)); + GLib.List list = new GLib.List (list_ptr); Widget[] result = new Widget [list.Count]; for (int i = 0; i < list.Count; i++) result [i] = list [i] as Widget; @@ -34,14 +34,14 @@ public Widget[] FocusChain { if (!success) return new Widget [0]; - GLib.List list = new GLib.List (list_ptr, typeof (Gtk.Widget)); + GLib.List list = new GLib.List (list_ptr); Widget[] result = new Widget [list.Count]; for (int i = 0; i < list.Count; i++) result [i] = list [i] as Widget; return result; } set { - GLib.List list = new GLib.List (IntPtr.Zero, typeof (Gtk.Widget)); + GLib.List list = new GLib.List (IntPtr.Zero); foreach (Widget val in value) list.Append (val.Handle); gtk_container_set_focus_chain (Handle, list.Handle); diff --git a/gtk/TextChildAnchor.custom b/gtk/TextChildAnchor.custom index 4ffb55c12..4e784ce7b 100644 --- a/gtk/TextChildAnchor.custom +++ b/gtk/TextChildAnchor.custom @@ -12,7 +12,7 @@ IntPtr raw_ret = gtk_text_child_anchor_get_widgets (Handle); if (raw_ret == IntPtr.Zero) return new Widget [0]; - GLib.List list = new GLib.List(raw_ret, typeof (Widget)); + GLib.List list = new GLib.List(raw_ret); Widget[] result = new Widget [list.Count]; for (int i = 0; i < list.Count; i++) result [i] = list [i] as Widget; diff --git a/gtk/TreeView.custom b/gtk/TreeView.custom index 680759af6..c2ded12a1 100644 --- a/gtk/TreeView.custom +++ b/gtk/TreeView.custom @@ -23,7 +23,7 @@ IntPtr raw_ret = gtk_tree_view_get_columns (Handle); if (raw_ret == IntPtr.Zero) return new TreeViewColumn [0]; - GLib.List list = new GLib.List (raw_ret, typeof (Gtk.TreeViewColumn)); + GLib.List list = new GLib.List (raw_ret); TreeViewColumn[] result = new TreeViewColumn [list.Count]; for (int i = 0; i < list.Count; i++) result [i] = list [i] as TreeViewColumn; diff --git a/gtk/TreeViewColumn.custom b/gtk/TreeViewColumn.custom index d75571d4f..16a24acf0 100644 --- a/gtk/TreeViewColumn.custom +++ b/gtk/TreeViewColumn.custom @@ -40,7 +40,7 @@ IntPtr raw_ret = gtk_tree_view_column_get_cell_renderers (Handle); if (raw_ret == IntPtr.Zero) return new CellRenderer [0]; - GLib.List list = new GLib.List (raw_ret, typeof (CellRenderer)); + GLib.List list = new GLib.List (raw_ret); CellRenderer[] result = new CellRenderer [list.Count]; for (int i = 0; i < list.Count; i++) result [i] = list [i] as CellRenderer; diff --git a/gtk/Window.custom b/gtk/Window.custom index 9bbc12f71..9d5ef5fd9 100755 --- a/gtk/Window.custom +++ b/gtk/Window.custom @@ -37,14 +37,14 @@ IntPtr raw_ret = gtk_window_get_default_icon_list(); if (raw_ret == IntPtr.Zero) return new Gdk.Pixbuf [0]; - GLib.List list = new GLib.List(raw_ret, typeof (Gdk.Pixbuf)); + GLib.List list = new GLib.List(raw_ret); Gdk.Pixbuf[] result = new Gdk.Pixbuf [list.Count]; for (int i = 0; i < list.Count; i++) result [i] = list [i] as Gdk.Pixbuf; return result; } set { - GLib.List list = new GLib.List(IntPtr.Zero, typeof (Gdk.Pixbuf)); + GLib.List list = new GLib.List(IntPtr.Zero); foreach (Gdk.Pixbuf val in value) list.Append (val.Handle); gtk_window_set_default_icon_list(list.Handle); @@ -73,14 +73,14 @@ IntPtr raw_ret = gtk_window_get_icon_list(Handle); if (raw_ret == IntPtr.Zero) return new Gdk.Pixbuf [0]; - GLib.List list = new GLib.List(raw_ret, typeof (Gdk.Pixbuf)); + GLib.List list = new GLib.List(raw_ret); Gdk.Pixbuf[] result = new Gdk.Pixbuf [list.Count]; for (int i = 0; i < list.Count; i++) result [i] = list [i] as Gdk.Pixbuf; return result; } set { - GLib.List list = new GLib.List(IntPtr.Zero, typeof (Gdk.Pixbuf)); + GLib.List list = new GLib.List(IntPtr.Zero); foreach (Gdk.Pixbuf val in value) list.Append (val.Handle); gtk_window_set_icon_list(Handle, list.Handle); @@ -116,7 +116,7 @@ if (raw_ret == IntPtr.Zero) return new Window [0]; - GLib.List list = new GLib.List(raw_ret, typeof (Gtk.Window)); + GLib.List list = new GLib.List(raw_ret); Window[] result = new Window [list.Count]; for (int i = 0; i < list.Count; i++) result [i] = list [i] as Window;