Upstream patches

This commit is contained in:
Mikkel Kruse Johnsen 2016-06-08 08:56:55 +02:00
parent 8134f48a5a
commit 7236eb3fa7
6 changed files with 17 additions and 31 deletions

View file

@ -259,7 +259,7 @@ namespace Cairo {
NativeMethods.cairo_set_dash (handle, dashes, dashes.Length, offset);
}
[Obsolete("Use GetSource/GetSource")]
[Obsolete("Use GetSource/SetSource")]
public Pattern Pattern {
set {
SetSource (value);
@ -270,7 +270,7 @@ namespace Cairo {
}
//This is obsolete because it wasn't obvious it needed to be disposed
[Obsolete("Use GetSource/GetSource")]
[Obsolete("Use GetSource/SetSource")]
public Pattern Source {
set {
SetSource (value);

View file

@ -78,23 +78,23 @@ namespace GtkSharp.Generation {
Console.Write ("gapi-codegen: ");
Console.WriteLine (e.Message);
Console.WriteLine ("Try `gapi-codegen --help' for more information.");
return 0;
return 64;
}
if (show_help) {
ShowHelp (options);
return 1;
return 0;
}
if (filenames.Count == 0) {
Console.WriteLine ("You need to specify a file to process using the --generate option.");
Console.WriteLine ("Try `gapi-codegen --help' for more information.");
return 0;
return 64;
}
if (extra.Exists (v => { return v.StartsWith ("--customdir"); })) {
Console.WriteLine ("Using .custom files is not supported anymore, use partial classes instead.");
return 0;
return 64;
}
if (!String.IsNullOrEmpty (schema_name) && !File.Exists (schema_name)) {

View file

@ -110,23 +110,15 @@ namespace Gtk {
public Gtk.TreeIter AppendValues (Array values)
{
Gtk.TreeIter iter = Append();
int col = 0;
foreach (object value in values) {
if (value != null) {
GLib.Value val = new GLib.Value (value);
SetValue (iter, col, val);
val.Dispose ();
}
col++;
}
SetValues (iter, values);
return iter;
}
public Gtk.TreeIter AppendValues (params object[] values)
{
return AppendValues ((Array) values);
Gtk.TreeIter iter = Append();
SetValues (iter, values);
return iter;
}
[DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)]

View file

@ -88,6 +88,7 @@ sources = \
StockManager.cs \
Style.cs \
StyleContext.cs \
StyleProviderPriority.cs \
Target.cs \
TargetEntry.cs \
TargetList.cs \

View file

@ -198,28 +198,21 @@ namespace Gtk {
val.Dispose ();
}
private void _AppendValues (Gtk.TreeIter iter, Array values) {
int col = 0;
foreach (object value in values) {
if (value != null)
SetValue (iter, col, value);
col++;
}
}
public Gtk.TreeIter AppendValues (Gtk.TreeIter parent, Array values) {
Gtk.TreeIter iter = AppendNode (parent);
_AppendValues (iter, values);
SetValues (iter, values);
return iter;
}
public Gtk.TreeIter AppendValues (Gtk.TreeIter parent, params object[] values) {
return AppendValues (parent, (Array) values);
Gtk.TreeIter iter = AppendNode (parent);
SetValues (iter, values);
return iter;
}
public Gtk.TreeIter AppendValues (Array values) {
Gtk.TreeIter iter = AppendNode ();
_AppendValues (iter, values);
SetValues (iter, values);
return iter;
}

View file

@ -26,7 +26,7 @@
$private_regex = '^#if.*(ENABLE_BACKEND|ENABLE_ENGINE)';
$eatit_regex = '^#if(.*(__cplusplus|DEBUG|DISABLE_COMPAT|ENABLE_BROKEN)|\s+0\s*$)';
$ignoreit_regex = '^\s+\*|#ident|#error|#\s*include|#\s*import|#\s*else|#\s*undef|G_(BEGIN|END)_DECLS|GDKVAR|GTKVAR|GTKMAIN_C_VAR|GTKTYPEUTILS_VAR|VARIABLE|GTKTYPEBUILTIN|G_GNUC_INTERNAL';
$ignoreit_regex = '^\s+\*|#ident|#error|#\s*include|#\s*import|#\s*else|#\s*undef|G_(BEGIN|END)_DECLS|ATK_VAR|GDK_PIXBUF_VAR|GDKVAR|GTKVAR|GTKMAIN_C_VAR|GTKTYPEUTILS_VAR|VARIABLE|GTKTYPEBUILTIN|G_GNUC_INTERNAL';
foreach $arg (@ARGV) {
if (-d $arg && -e $arg) {