Merge pull request #82 from knocte/cleanup
Various small cleanups in generator and glib
This commit is contained in:
commit
bd9cde5e61
4 changed files with 3 additions and 4 deletions
|
@ -160,7 +160,7 @@ namespace GtkSharp.Generation {
|
||||||
void GenerateCtors (StreamWriter sw)
|
void GenerateCtors (StreamWriter sw)
|
||||||
{
|
{
|
||||||
// Native GObjects do not implement the *Implementor interfaces
|
// Native GObjects do not implement the *Implementor interfaces
|
||||||
sw.WriteLine ("\t\tGLib.Object implementor;", Name);
|
sw.WriteLine ("\t\tGLib.Object implementor;");
|
||||||
sw.WriteLine ();
|
sw.WriteLine ();
|
||||||
|
|
||||||
if (!IsConsumeOnly) {
|
if (!IsConsumeOnly) {
|
||||||
|
|
|
@ -90,7 +90,7 @@ namespace GtkSharp.Generation {
|
||||||
}
|
}
|
||||||
|
|
||||||
Parameters parms = Parameters;
|
Parameters parms = Parameters;
|
||||||
is_get = ((((parms.IsAccessor && retval.IsVoid) || (parms.Count == 0 && !retval.IsVoid)) || (parms.Count == 0 && !retval.IsVoid)) && HasGetterName);
|
is_get = ((parms.IsAccessor && retval.IsVoid) || (parms.Count == 0 && !retval.IsVoid)) && HasGetterName;
|
||||||
is_set = ((parms.IsAccessor || (parms.VisibleCount == 1 && retval.IsVoid)) && HasSetterName);
|
is_set = ((parms.IsAccessor || (parms.VisibleCount == 1 && retval.IsVoid)) && HasSetterName);
|
||||||
|
|
||||||
call = "(" + (IsStatic ? "" : container_type.CallByName () + (parms.Count > 0 ? ", " : "")) + Body.GetCallString (is_set) + ")";
|
call = "(" + (IsStatic ? "" : container_type.CallByName () + (parms.Count > 0 ? ", " : "")) + Body.GetCallString (is_set) + ")";
|
||||||
|
|
|
@ -87,7 +87,7 @@ namespace GtkSharp.Generation {
|
||||||
|
|
||||||
public string DefaultValue {
|
public string DefaultValue {
|
||||||
get {
|
get {
|
||||||
if (default_value != null && default_value.Length > 0)
|
if (!String.IsNullOrEmpty (default_value))
|
||||||
return default_value;
|
return default_value;
|
||||||
if (IGen == null)
|
if (IGen == null)
|
||||||
return String.Empty;
|
return String.Empty;
|
||||||
|
|
|
@ -552,7 +552,6 @@ namespace GLib {
|
||||||
|
|
||||||
internal void Update (object val)
|
internal void Update (object val)
|
||||||
{
|
{
|
||||||
Type t = GType.LookupType (type);
|
|
||||||
if (GType.Is (type, GType.Boxed) && !(val is IWrapper)) {
|
if (GType.Is (type, GType.Boxed) && !(val is IWrapper)) {
|
||||||
MethodInfo mi = val.GetType ().GetMethod ("Update", BindingFlags.NonPublic | BindingFlags.Instance);
|
MethodInfo mi = val.GetType ().GetMethod ("Update", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||||
IntPtr boxed_ptr = g_value_get_boxed (ref this);
|
IntPtr boxed_ptr = g_value_get_boxed (ref this);
|
||||||
|
|
Loading…
Reference in a new issue