Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed "Bug 686594 - Monodevelop is broken with new GTK3 and GNOME3".

  • Loading branch information...
commit 4e827f0a66362fd9e57a72342b9c311e15d826ad 1 parent 5f28fa7
@mkrueger mkrueger authored
Showing with 19 additions and 3 deletions.
  1. +19 −3 main/src/addins/MonoDevelop.GtkCore/libstetic/wrapper/Object.cs
View
22 main/src/addins/MonoDevelop.GtkCore/libstetic/wrapper/Object.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections;
+using System.Collections.Generic;
namespace Stetic.Wrapper {
public abstract class Object : Stetic.ObjectWrapper {
@@ -11,17 +12,32 @@ public override void Dispose ()
((GLib.Object)Wrapped).RemoveNotification (NotifyHandler);
base.Dispose ();
}
-
+
+ IEnumerable<string> GladePropertyNames {
+ get {
+ foreach (ItemGroup group in ClassDescriptor.ItemGroups) {
+ foreach (ItemDescriptor item in group) {
+ TypedPropertyDescriptor prop = item as TypedPropertyDescriptor;
+ if (prop != null && !string.IsNullOrEmpty (prop.GladeName)) {
+ yield return prop.GladeName;
+ }
+ }
+ }
+ }
+ }
+
internal protected override void OnDesignerAttach (IDesignArea designer)
{
base.OnDesignerAttach (designer);
- ((GLib.Object)Wrapped).AddNotification (NotifyHandler);
+ foreach (string property in GladePropertyNames)
+ ((GLib.Object)Wrapped).AddNotification (property, NotifyHandler);
}
internal protected override void OnDesignerDetach (IDesignArea designer)
{
base.OnDesignerDetach (designer);
- ((GLib.Object)Wrapped).RemoveNotification (NotifyHandler);
+ foreach (string property in GladePropertyNames)
+ ((GLib.Object)Wrapped).RemoveNotification (property, NotifyHandler);
}
public static Object Lookup (GLib.Object obj)
Please sign in to comment.
Something went wrong with that request. Please try again.