updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / tasque / drop-gnome-sharp-dependency.patch
blobb7a57dbbad4d97fd1b96ac9e054e73d94501fd91
1 diff -Naur tasque-0.1.9.orig/configure.ac tasque-0.1.9/configure.ac
2 --- tasque-0.1.9.orig/configure.ac 2010-01-12 20:45:49.000000000 +0100
3 +++ tasque-0.1.9/configure.ac 2012-01-12 02:55:51.862579809 +0100
4 @@ -37,7 +37,6 @@
5 AM_GCONF_SOURCE_2
7 PKG_CHECK_MODULES([GLIB_SHARP_20], [glib-sharp-2.0])
8 -PKG_CHECK_MODULES([GNOME_SHARP_20], [gnome-sharp-2.0])
9 PKG_CHECK_MODULES([GTK_DOTNET_20], [gtk-dotnet-2.0])
10 PKG_CHECK_MODULES([GTK_SHARP_20], [gtk-sharp-2.0 >= 2.10.0])
11 PKG_CHECK_MODULES([GTK_SHARP_2_12], gtk-sharp-2.0 >= 2.12.0, GTK_2_12="yes", GTK_2_12="no")
12 diff -Naur tasque-0.1.9.orig/src/Backends/IceCore/Makefile.am tasque-0.1.9/src/Backends/IceCore/Makefile.am
13 --- tasque-0.1.9.orig/src/Backends/IceCore/Makefile.am 2010-01-12 20:45:49.000000000 +0100
14 +++ tasque-0.1.9/src/Backends/IceCore/Makefile.am 2012-01-12 02:55:51.869246068 +0100
15 @@ -8,7 +8,6 @@
16 ASSMS = \
17 -r:$(top_builddir)/src/Tasque.exe \
18 $(GLIB_SHARP_20_LIBS) \
19 - $(GNOME_SHARP_20_LIBS) \
20 $(GTK_DOTNET_20_LIBS) \
21 $(ICE_DESKTOP_LIBS) \
22 $(NDESK_DBUS_10_LIBS) \
23 diff -Naur tasque-0.1.9.orig/src/GnomeApplication.cs tasque-0.1.9/src/GnomeApplication.cs
24 --- tasque-0.1.9.orig/src/GnomeApplication.cs 2010-01-12 20:45:49.000000000 +0100
25 +++ tasque-0.1.9/src/GnomeApplication.cs 2012-01-12 02:55:51.869246068 +0100
26 @@ -12,7 +12,6 @@
28 public class GnomeApplication : INativeApplication
30 - private Gnome.Program program;
31 private string confDir;
33 public GnomeApplication ()
34 @@ -36,10 +35,6 @@
35 } catch {} // Ignore exception if fail (not needed to run)
37 Gtk.Application.Init ();
38 - program = new Gnome.Program (display_name,
39 - Defines.Version,
40 - Gnome.Modules.UI,
41 - args);
44 public void InitializeIdle ()
45 @@ -56,7 +51,7 @@
47 public void StartMainLoop ()
49 - program.Run ();
50 + Gtk.Application.Run ();
53 public void QuitMainLoop ()
54 @@ -95,7 +90,7 @@
56 public void OpenUrl (string url)
58 - Gnome.Url.Show (url);
59 + GtkBeans.Global.ShowUri (null, url);
62 public string ConfDir {
63 diff -Naur tasque-0.1.9.orig/src/gtk-sharp-beans/Global.cs tasque-0.1.9/src/gtk-sharp-beans/Global.cs
64 --- tasque-0.1.9.orig/src/gtk-sharp-beans/Global.cs 1970-01-01 01:00:00.000000000 +0100
65 +++ tasque-0.1.9/src/gtk-sharp-beans/Global.cs 2012-01-12 02:55:51.905910494 +0100
66 @@ -0,0 +1,46 @@
67 +// GtkBeans.Global.cs
68 +//
69 +// Author(s):
70 +// Stephane Delcroix <stephane@delcroix.org>
71 +//
72 +// Copyright (c) 2009 Novell, Inc.
73 +//
74 +// This program is free software; you can redistribute it and/or
75 +// modify it under the terms of version 2 of the Lesser GNU General
76 +// Public License as published by the Free Software Foundation.
77 +//
78 +// This program is distributed in the hope that it will be useful,
79 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
80 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
81 +// Lesser General Public License for more details.
82 +//
83 +// You should have received a copy of the GNU Lesser General Public
84 +// License along with this program; if not, write to the
85 +// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
86 +// Boston, MA 02111-1307, USA.
88 +using System;
89 +using System.Collections;
90 +using System.Runtime.InteropServices;
92 +namespace GtkBeans {
93 + public static class Global {
94 + [DllImport("libgtk-win32-2.0-0.dll")]
95 + static extern unsafe bool gtk_show_uri(IntPtr screen, IntPtr uri, uint timestamp, out IntPtr error);
97 + public static unsafe bool ShowUri(Gdk.Screen screen, string uri, uint timestamp) {
98 + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
99 + IntPtr error = IntPtr.Zero;
100 + bool raw_ret = gtk_show_uri(screen == null ? IntPtr.Zero : screen.Handle, native_uri, timestamp, out error);
101 + bool ret = raw_ret;
102 + GLib.Marshaller.Free (native_uri);
103 + if (error != IntPtr.Zero) throw new GLib.GException (error);
104 + return ret;
107 + public static bool ShowUri (Gdk.Screen screen, string uri)
109 + return ShowUri (screen, uri, Gdk.EventHelper.GetTime (new Gdk.Event(IntPtr.Zero)));
113 diff -Naur tasque-0.1.9.orig/src/Makefile.am tasque-0.1.9/src/Makefile.am
114 --- tasque-0.1.9.orig/src/Makefile.am 2010-01-12 20:45:49.000000000 +0100
115 +++ tasque-0.1.9/src/Makefile.am 2012-01-12 02:55:51.909243624 +0100
116 @@ -89,6 +89,7 @@
117 $(srcdir)/TaskWindow.cs \
118 $(srcdir)/TaskTreeView.cs \
119 $(srcdir)/Utilities.cs \
120 + $(srcdir)/gtk-sharp-beans/*.cs \
122 $(DUMMY_CSFILES) \
124 @@ -130,7 +131,6 @@
125 -r:System.Web \
126 -r:$(top_builddir)/RtmNet/RtmNet \
127 $(GLIB_SHARP_20_LIBS) \
128 - $(GNOME_SHARP_20_LIBS) \
129 $(GTK_DOTNET_20_LIBS) \
130 $(NOTIFY_SHARP_LIBS) \
131 $(NDESK_DBUS_10_LIBS) \
132 diff -Naur tasque-0.1.9.orig/src/Tasque.exe.config.in tasque-0.1.9/src/Tasque.exe.config.in
133 --- tasque-0.1.9.orig/src/Tasque.exe.config.in 2010-01-12 20:45:49.000000000 +0100
134 +++ tasque-0.1.9/src/Tasque.exe.config.in 2012-01-12 02:56:39.739653991 +0100
135 @@ -1,4 +1,5 @@
136 <configuration>
137 <dllmap dll="libX11" target="libX11.so.6" />
138 <dllmap dll="gdk-x11-2.0" target="libgdk-x11-2.0.so.0" />
139 + <dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so" />
140 </configuration>