[monodevelop] fix startup issue with newer GTK+ (BZ #679373) by adding 3 upstream patches
chkr
chkr at fedoraproject.org
Wed May 4 21:41:32 UTC 2011
commit 5c7de8527a33dbd1024017ad1677f12194791088
Author: Christian Krause <chkr at fedoraproject.org>
Date: Wed May 4 23:37:17 2011 +0200
fix startup issue with newer GTK+ (BZ #679373) by adding
3 upstream patches
0001-Added-some-more-gnome3-workarounds.patch | 79 ++++++++++++++++++++
...594-Monodevelop-is-broken-with-new-GTK3-1.patch | 65 ++++++++++++++++
...86594-Monodevelop-is-broken-with-new-GTK3.patch | 60 +++++++++++++++
monodevelop.spec | 17 ++++-
4 files changed, 220 insertions(+), 1 deletions(-)
---
diff --git a/0001-Added-some-more-gnome3-workarounds.patch b/0001-Added-some-more-gnome3-workarounds.patch
new file mode 100644
index 0000000..f68ec0f
--- /dev/null
+++ b/0001-Added-some-more-gnome3-workarounds.patch
@@ -0,0 +1,79 @@
+From 234879092c4b47cb1acba65152f9386a34968db3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Mike=20Kr=C3=BCger?= <mkrueger at novell.com>
+Date: Wed, 13 Apr 2011 10:10:48 +0200
+Subject: [PATCH] Added some more gnome3 workarounds.
+
+---
+ .../MonoDevelop.GtkCore/libstetic/wrapper/Range.cs | 8 +++++---
+ .../MonoDevelop.GtkCore/libstetic/wrapper/Scale.cs | 6 ++++--
+ .../libsteticui/ProjectBackend.cs | 7 +++++--
+ 3 files changed, 14 insertions(+), 7 deletions(-)
+
+diff --git a/main/src/addins/MonoDevelop.GtkCore/libstetic/wrapper/Range.cs b/main/src/addins/MonoDevelop.GtkCore/libstetic/wrapper/Range.cs
+index 453e846..ae0afd5 100644
+--- a/main/src/addins/MonoDevelop.GtkCore/libstetic/wrapper/Range.cs
++++ b/main/src/addins/MonoDevelop.GtkCore/libstetic/wrapper/Range.cs
+@@ -3,16 +3,18 @@ using System;
+ namespace Stetic.Wrapper {
+
+ public abstract class Range : Widget {
+-
++ internal static string[] adjustmentProperties = new string [] { "lower", "page-increment", "page-size", "step-increment", "upper", "value" };
+ public override void Wrap (object obj, bool initialized)
+ {
+ base.Wrap (obj, initialized);
+- ((Gtk.Range)Wrapped).Adjustment.AddNotification (AdjustmentNotifyHandler);
++ foreach (string property in adjustmentProperties)
++ ((Gtk.Range)Wrapped).Adjustment.AddNotification (property, AdjustmentNotifyHandler);
+ }
+
+ public override void Dispose ()
+ {
+- ((Gtk.Range)Wrapped).Adjustment.RemoveNotification (AdjustmentNotifyHandler);
++ foreach (string property in adjustmentProperties)
++ ((Gtk.Range)Wrapped).Adjustment.RemoveNotification (property, AdjustmentNotifyHandler);
+ base.Dispose ();
+ }
+
+diff --git a/main/src/addins/MonoDevelop.GtkCore/libstetic/wrapper/Scale.cs b/main/src/addins/MonoDevelop.GtkCore/libstetic/wrapper/Scale.cs
+index c43f660..bb72beb 100644
+--- a/main/src/addins/MonoDevelop.GtkCore/libstetic/wrapper/Scale.cs
++++ b/main/src/addins/MonoDevelop.GtkCore/libstetic/wrapper/Scale.cs
+@@ -7,12 +7,14 @@ namespace Stetic.Wrapper {
+ public override void Wrap (object obj, bool initialized)
+ {
+ base.Wrap (obj, initialized);
+- ((Gtk.Scale)Wrapped).Adjustment.AddNotification (AdjustmentNotifyHandler);
++ foreach (string property in Range.adjustmentProperties)
++ ((Gtk.Scale)Wrapped).Adjustment.AddNotification (property, AdjustmentNotifyHandler);
+ }
+
+ public override void Dispose ()
+ {
+- ((Gtk.Scale)Wrapped).Adjustment.RemoveNotification (AdjustmentNotifyHandler);
++ foreach (string property in Range.adjustmentProperties)
++ ((Gtk.Scale)Wrapped).Adjustment.RemoveNotification (property, AdjustmentNotifyHandler);
+ base.Dispose ();
+ }
+
+diff --git a/main/src/addins/MonoDevelop.GtkCore/libsteticui/ProjectBackend.cs b/main/src/addins/MonoDevelop.GtkCore/libsteticui/ProjectBackend.cs
+index b60613e..cdcfc01 100644
+--- a/main/src/addins/MonoDevelop.GtkCore/libsteticui/ProjectBackend.cs
++++ b/main/src/addins/MonoDevelop.GtkCore/libsteticui/ProjectBackend.cs
+@@ -277,8 +277,11 @@ namespace Stetic {
+ }
+
+ foreach (WidgetData wd in topLevels) {
+- if (wd.Widget != null)
+- wd.Widget.Destroy ();
++ if (wd.Widget != null) {
++ try {
++ wd.Widget.Destroy ();
++ } catch (Exception e) { Console.WriteLine (e); }
++ }
+ }
+
+ selection = null;
+--
+1.7.4.4
+
diff --git a/0001-Fixed-Bug-686594-Monodevelop-is-broken-with-new-GTK3-1.patch b/0001-Fixed-Bug-686594-Monodevelop-is-broken-with-new-GTK3-1.patch
new file mode 100644
index 0000000..969369e
--- /dev/null
+++ b/0001-Fixed-Bug-686594-Monodevelop-is-broken-with-new-GTK3-1.patch
@@ -0,0 +1,65 @@
+From 5f28fa727d2e8de745f64c1362fb50f7649ebd77 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Mike=20Kr=C3=BCger?= <mkrueger at novell.com>
+Date: Tue, 12 Apr 2011 13:57:26 +0200
+Subject: [PATCH] Fixed "Bug 686594 - Monodevelop is broken with new GTK3 and
+ GNOME3".
+
+---
+ .../CommandManager.cs | 33 +++++++++++++++-----
+ 1 files changed, 25 insertions(+), 8 deletions(-)
+
+diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs
+index 89f04b5..75d7b17 100644
+--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs
++++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs
+@@ -1540,22 +1540,39 @@ namespace MonoDevelop.Components.Commands
+ internal class ToolbarTracker
+ {
+ Gtk.IconSize lastSize;
+-
++
+ public void Track (Gtk.Toolbar toolbar)
+ {
+ lastSize = toolbar.IconSize;
+- toolbar.AddNotification (OnToolbarPropChanged);
++ toolbar.AddNotification ("icon-size", IconSizeChanged);
++ toolbar.OrientationChanged += HandleToolbarOrientationChanged;
++ toolbar.StyleChanged += HandleToolbarStyleChanged;
++
+ toolbar.Destroyed += delegate {
+- toolbar.RemoveNotification (OnToolbarPropChanged);
++ toolbar.StyleChanged -= HandleToolbarStyleChanged;
++ toolbar.OrientationChanged -= HandleToolbarOrientationChanged;
++ toolbar.RemoveNotification ("icon-size", IconSizeChanged);
+ };
+ }
+-
+- void OnToolbarPropChanged (object ob, GLib.NotifyArgs args)
++
++ void HandleToolbarStyleChanged (object o, Gtk.StyleChangedArgs args)
+ {
+- Gtk.Toolbar t = (Gtk.Toolbar) ob;
+- if (lastSize != t.IconSize || args.Property == "orientation" || args.Property == "toolbar-style")
++ Gtk.Toolbar t = (Gtk.Toolbar) o;
++ if (lastSize != t.IconSize)
+ UpdateCustomItems (t);
+- lastSize = t.IconSize;
++ }
++
++ void HandleToolbarOrientationChanged (object o, Gtk.OrientationChangedArgs args)
++ {
++ Gtk.Toolbar t = (Gtk.Toolbar) o;
++ if (lastSize != t.IconSize)
++ UpdateCustomItems (t);
++ }
++
++ void IconSizeChanged (object o, GLib.NotifyArgs args)
++ {
++ this.lastSize = ((Gtk.Toolbar) o).IconSize;
++ UpdateCustomItems ((Gtk.Toolbar) o);
+ }
+
+ void UpdateCustomItems (Gtk.Toolbar t)
+--
+1.7.4.4
+
diff --git a/0001-Fixed-Bug-686594-Monodevelop-is-broken-with-new-GTK3.patch b/0001-Fixed-Bug-686594-Monodevelop-is-broken-with-new-GTK3.patch
new file mode 100644
index 0000000..bc21b7e
--- /dev/null
+++ b/0001-Fixed-Bug-686594-Monodevelop-is-broken-with-new-GTK3.patch
@@ -0,0 +1,60 @@
+From 4e827f0a66362fd9e57a72342b9c311e15d826ad Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Mike=20Kr=C3=BCger?= <mkrueger at novell.com>
+Date: Tue, 12 Apr 2011 14:32:18 +0200
+Subject: [PATCH] Fixed "Bug 686594 - Monodevelop is broken with new GTK3 and
+ GNOME3".
+
+---
+ .../libstetic/wrapper/Object.cs | 22 +++++++++++++++++--
+ 1 files changed, 19 insertions(+), 3 deletions(-)
+
+diff --git a/main/src/addins/MonoDevelop.GtkCore/libstetic/wrapper/Object.cs b/main/src/addins/MonoDevelop.GtkCore/libstetic/wrapper/Object.cs
+index 4d8954c..e1a1937 100644
+--- a/main/src/addins/MonoDevelop.GtkCore/libstetic/wrapper/Object.cs
++++ b/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 @@ namespace Stetic.Wrapper {
+ ((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)
+--
+1.7.4.4
+
diff --git a/monodevelop.spec b/monodevelop.spec
index f93ca0d..77a45a8 100644
--- a/monodevelop.spec
+++ b/monodevelop.spec
@@ -6,7 +6,7 @@
Name: monodevelop
Version: 2.4.2
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: A full-featured IDE for Mono and Gtk#
Group: Development/Tools
@@ -15,6 +15,14 @@ URL: http://monodevelop.com/
Source0: http://ftp.novell.com/pub/mono/sources/%{name}/%{name}-%{version}.tar.bz2
Patch0: %{name}-2.1.0-unbundle-nunit.patch
+# 3 upstream patches to fix starup issue with newer GTK+ (BZ #679373)
+# https://github.com/mono/monodevelop/commit/5f28fa727d2e8de745f64c1362fb50f7649ebd77
+Patch1: 0001-Fixed-Bug-686594-Monodevelop-is-broken-with-new-GTK3-1.patch
+# https://github.com/mono/monodevelop/commit/4e827f0a66362fd9e57a72342b9c311e15d826ad
+Patch2: 0001-Fixed-Bug-686594-Monodevelop-is-broken-with-new-GTK3.patch
+# https://github.com/mono/monodevelop/commit/234879092c4b47cb1acba65152f9386a34968db3
+Patch3: 0001-Added-some-more-gnome3-workarounds.patch
+
BuildRequires: mono-devel >= 2.4 mono-addins-devel >= 0.5 mono-nunit-devel
BuildRequires: mono-nunit-devel monodoc-devel
BuildRequires: gnome-desktop-sharp-devel
@@ -50,6 +58,9 @@ Development files for %{name}.
%prep
%setup -q
%patch0 -p1 -b .unbundle-nunit
+%patch1 -p2 -b .startup1
+%patch2 -p2 -b .startup2
+%patch3 -p2 -b .startup3
sed -i -e 's!$(prefix)/lib/!%{_libdir}/!' \
-e 's!${exec_prefix}/lib!%{_libdir}!' configure
@@ -143,6 +154,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_libdir}/pkgconfig/monodevelop*.pc
%changelog
+* Wed May 04 2011 Christian Krause <chkr at fedoraproject.org> - 2.4.2-4
+- fix startup issue with newer GTK+ (BZ #679373) by adding
+ 3 upstream patches
+
* Tue Apr 19 2011 Dan Horák <dan[at]danny.cz> - 2.4.2-3
- updated the supported arch list
More information about the scm-commits
mailing list