Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 4e827f0a66362fd9e57a72342b9c311e15d826ad 1 parent 5f28fa7
Mike Krüger authored
22  main/src/addins/MonoDevelop.GtkCore/libstetic/wrapper/Object.cs
... ...
@@ -1,5 +1,6 @@
1 1
 using System;
2 2
 using System.Collections;
  3
+using System.Collections.Generic;
3 4
 
4 5
 namespace Stetic.Wrapper {
5 6
 	public abstract class Object : Stetic.ObjectWrapper {
@@ -11,17 +12,32 @@ public override void Dispose ()
11 12
 			((GLib.Object)Wrapped).RemoveNotification (NotifyHandler);
12 13
 			base.Dispose ();
13 14
 		}
14  
-
  15
+		
  16
+		IEnumerable<string> GladePropertyNames {
  17
+			get {
  18
+				foreach (ItemGroup group in ClassDescriptor.ItemGroups) {
  19
+					foreach (ItemDescriptor item in group) {
  20
+						TypedPropertyDescriptor prop = item as TypedPropertyDescriptor;
  21
+						if (prop != null && !string.IsNullOrEmpty (prop.GladeName)) {
  22
+							yield return prop.GladeName;
  23
+						}
  24
+					}
  25
+				}
  26
+			}
  27
+		}
  28
+		
15 29
 		internal protected override void OnDesignerAttach (IDesignArea designer)
16 30
 		{
17 31
 			base.OnDesignerAttach (designer);
18  
-			((GLib.Object)Wrapped).AddNotification (NotifyHandler);
  32
+			foreach (string property in GladePropertyNames)
  33
+				((GLib.Object)Wrapped).AddNotification (property, NotifyHandler);
19 34
 		}
20 35
 		
21 36
 		internal protected override void OnDesignerDetach (IDesignArea designer)
22 37
 		{
23 38
 			base.OnDesignerDetach (designer);
24  
-			((GLib.Object)Wrapped).RemoveNotification (NotifyHandler);
  39
+			foreach (string property in GladePropertyNames)
  40
+				((GLib.Object)Wrapped).RemoveNotification (property, NotifyHandler);
25 41
 		}
26 42
 		
27 43
 		public static Object Lookup (GLib.Object obj)

0 notes on commit 4e827f0

Please sign in to comment.
Something went wrong with that request. Please try again.