Commit Graph

4 Commits

Author SHA1 Message Date
Marek Habersack
2c82d95b58 Fix System.Array usage in {List,Tree}Store
{List,Tree}Store.AppendValues overloads which take System.Array as their
'values' parameter incorrectly pass the array down to SetValues. The latter
expects a 'params object[]' array of parameters but passing an instance of
System.Array to such method will NOT pass the contents of System.Array instance
into the 'params' method as separate members of the parms array. It will instead
box System.Array and the params method will receive one parameter of type
System.Array instead of X parameters of various types. This affects the
following example code:

   var store = new TreeStore (typeof (string), typeof (int));
   store.AppendValues ("One", 1);

If the column configured to retrieve the 'string' value reads data from this
store it will instead get an instance of System.Array and the node displayed by
the TreeView will have no text, won't be clickable etc.

The fix implemented here is to "explode" the System.Array into a separate array
of the 'object[]' type.

The 'TreeStore.AppendValues (params object[] values)' overload no longer calls
the 'TreeStore.Appendvalues (Array values)' overload since the indirection only
wastes time and memory. It now directly calls `SetValues`.
2016-12-18 00:08:05 +01:00
Mikkel Kruse Johnsen
7236eb3fa7 Upstream patches 2016-06-08 08:56:55 +02:00
Bertrand Lorentz
691de4e606 gtk: Fix dll name and use a const for all DllImports in custom code
In Windows builds of GTK+ 3.x, the dll filename is libgtk-3-0.dll.

We use this opportunity to use a common const in the DllImport
statement for all custom code.
2014-02-23 15:12:20 +01:00
Bertrand Lorentz
a410d42975 gtk: Move all .custom files to partial classes
There are no real code changes in this commit, just a lot of file
renaming and boilerplate additions.

A few .custom files are just removed, because the corresponding class in
GTK is gone, so they were not really used anymore.

Some files need to be re-indented, but that will be done in a separate
commit, so that git can track the renamed files correctly and not be
confused by all the changes.
2012-08-05 16:32:41 +02:00