summaryrefslogtreecommitdiff
blob: c7afbeb47de2645b77f074a4317e8267850ebc8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
diff -rupN monodevelop/configure monodevelop.nognome/configure
--- monodevelop/configure	2015-04-28 11:55:36.000000000 +0300
+++ monodevelop.nognome/configure	2015-05-27 12:40:15.073411758 +0300
@@ -3711,224 +3711,6 @@ $as_echo "yes" >&6; }
 
 fi
 
-
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNOME_SHARP" >&5
-$as_echo_n "checking for GNOME_SHARP... " >&6; }
-
-if test -n "$GNOME_SHARP_CFLAGS"; then
-    pkg_cv_GNOME_SHARP_CFLAGS="$GNOME_SHARP_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnome-sharp-2.0 >= \$GTKSHARP_REQUIRED_VERSION\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "gnome-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_GNOME_SHARP_CFLAGS=`$PKG_CONFIG --cflags "gnome-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$GNOME_SHARP_LIBS"; then
-    pkg_cv_GNOME_SHARP_LIBS="$GNOME_SHARP_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnome-sharp-2.0 >= \$GTKSHARP_REQUIRED_VERSION\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "gnome-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_GNOME_SHARP_LIBS=`$PKG_CONFIG --libs "gnome-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        GNOME_SHARP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gnome-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION" 2>&1`
-        else
-	        GNOME_SHARP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gnome-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$GNOME_SHARP_PKG_ERRORS" >&5
-
-	gnome_sharp=no
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	gnome_sharp=no
-else
-	GNOME_SHARP_CFLAGS=$pkg_cv_GNOME_SHARP_CFLAGS
-	GNOME_SHARP_LIBS=$pkg_cv_GNOME_SHARP_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	gnome_sharp=yes
-fi
-
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNOME_VFS_SHARP" >&5
-$as_echo_n "checking for GNOME_VFS_SHARP... " >&6; }
-
-if test -n "$GNOME_VFS_SHARP_CFLAGS"; then
-    pkg_cv_GNOME_VFS_SHARP_CFLAGS="$GNOME_VFS_SHARP_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnome-vfs-sharp-2.0 >= \$GTKSHARP_REQUIRED_VERSION\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "gnome-vfs-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_GNOME_VFS_SHARP_CFLAGS=`$PKG_CONFIG --cflags "gnome-vfs-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$GNOME_VFS_SHARP_LIBS"; then
-    pkg_cv_GNOME_VFS_SHARP_LIBS="$GNOME_VFS_SHARP_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnome-vfs-sharp-2.0 >= \$GTKSHARP_REQUIRED_VERSION\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "gnome-vfs-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_GNOME_VFS_SHARP_LIBS=`$PKG_CONFIG --libs "gnome-vfs-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        GNOME_VFS_SHARP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gnome-vfs-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION" 2>&1`
-        else
-	        GNOME_VFS_SHARP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gnome-vfs-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$GNOME_VFS_SHARP_PKG_ERRORS" >&5
-
-	gnome_vfs_sharp=no
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	gnome_vfs_sharp=no
-else
-	GNOME_VFS_SHARP_CFLAGS=$pkg_cv_GNOME_VFS_SHARP_CFLAGS
-	GNOME_VFS_SHARP_LIBS=$pkg_cv_GNOME_VFS_SHARP_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	gnome_vfs_sharp=yes
-fi
-
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCONF_SHARP" >&5
-$as_echo_n "checking for GCONF_SHARP... " >&6; }
-
-if test -n "$GCONF_SHARP_CFLAGS"; then
-    pkg_cv_GCONF_SHARP_CFLAGS="$GCONF_SHARP_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gconf-sharp-2.0 >= \$GTKSHARP_REQUIRED_VERSION\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "gconf-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_GCONF_SHARP_CFLAGS=`$PKG_CONFIG --cflags "gconf-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$GCONF_SHARP_LIBS"; then
-    pkg_cv_GCONF_SHARP_LIBS="$GCONF_SHARP_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gconf-sharp-2.0 >= \$GTKSHARP_REQUIRED_VERSION\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "gconf-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_GCONF_SHARP_LIBS=`$PKG_CONFIG --libs "gconf-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        GCONF_SHARP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gconf-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION" 2>&1`
-        else
-	        GCONF_SHARP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gconf-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$GCONF_SHARP_PKG_ERRORS" >&5
-
-	gconf_sharp=no
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	gconf_sharp=no
-else
-	GCONF_SHARP_CFLAGS=$pkg_cv_GCONF_SHARP_CFLAGS
-	GCONF_SHARP_LIBS=$pkg_cv_GCONF_SHARP_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	gconf_sharp=yes
-fi
-
-
 gtksharp_prefix="`$PKG_CONFIG --variable=prefix gtk-sharp-2.0`"
 
 
diff -rupN monodevelop/src/addins/GnomePlatform/GnomePlatform.cs monodevelop.nognome/src/addins/GnomePlatform/GnomePlatform.cs
--- monodevelop/src/addins/GnomePlatform/GnomePlatform.cs	2014-09-22 16:28:49.000000000 +0300
+++ monodevelop.nognome/src/addins/GnomePlatform/GnomePlatform.cs	2015-05-27 12:40:15.073411758 +0300
@@ -26,7 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using Gnome;
 using MonoDevelop.Ide.Desktop;
 using System;
 using System.Collections.Generic;
@@ -40,46 +39,15 @@ namespace MonoDevelop.Platform
 {
 	public class GnomePlatform : PlatformService
 	{
-		static bool useGio;
-
-		Gnome.ThumbnailFactory thumbnailFactory = new Gnome.ThumbnailFactory (Gnome.ThumbnailSize.Normal);
-
 		static GnomePlatform ()
 		{
 			try {
 				Gio.GetDefaultForType ("text/plain");
-				useGio = true;
 			} catch (Exception ex) {
 				Console.WriteLine (ex);
 			}
-			//apparently Gnome.Icon needs GnomeVFS initialized even when we're using GIO.
-			Gnome.Vfs.Vfs.Initialize ();
-		}
-		
-		DesktopApplication GetGnomeVfsDefaultApplication (string mimeType)
-		{
-			var app = Gnome.Vfs.Mime.GetDefaultApplication (mimeType);
-			if (app != null)
-				return (DesktopApplication) Marshal.PtrToStructure (app.Handle, typeof(DesktopApplication));
-			else
-				return null;
-		}
-		
-		IEnumerable<DesktopApplication> GetGnomeVfsApplications (string mimeType)
-		{
-			var def = GetGnomeVfsDefaultApplication (mimeType);
-			var list = new List<DesktopApplication> ();
-			var apps = Gnome.Vfs.Mime.GetAllApplications (mimeType);
-			foreach (var app in apps) {
-				var dap = (GnomeVfsApp) Marshal.PtrToStructure (app.Handle, typeof(GnomeVfsApp));
-				if (!string.IsNullOrEmpty (dap.Command) && !string.IsNullOrEmpty (dap.DisplayName) && !dap.Command.Contains ("monodevelop ")) {
-					var isDefault = def != null && def.Id == dap.Command;
-					list.Add (new GnomeDesktopApplication (dap.Command, dap.DisplayName, isDefault));
-				}
-			}
-			return list;
 		}
-		
+
 		public override IEnumerable<DesktopApplication> GetApplications (string filename)
 		{
 			var mimeType = GetMimeTypeForUri (filename);
@@ -88,10 +56,7 @@ namespace MonoDevelop.Platform
 
 		IEnumerable<DesktopApplication> GetApplicationsForMimeType (string mimeType)
 		{
-			if (useGio)
-				return Gio.GetAllForType (mimeType);
-			else
-				return GetGnomeVfsApplications (mimeType);
+			return Gio.GetAllForType (mimeType);
 		}
 		
 		struct GnomeVfsApp {
@@ -100,10 +65,7 @@ namespace MonoDevelop.Platform
 
 		protected override string OnGetMimeTypeDescription (string mt)
 		{
-			if (useGio)
-				return Gio.GetMimeTypeDescription (mt);
-			else
-				return Gnome.Vfs.Mime.GetDescription (mt);
+			return Gio.GetMimeTypeDescription (mt);
 		}
 
 		protected override string OnGetMimeTypeForUri (string uri)
@@ -111,12 +73,7 @@ namespace MonoDevelop.Platform
 			if (uri == null)
 				return null;
 			
-			if (useGio) {
-				string mt = Gio.GetMimeTypeForUri (uri);
-				if (mt != null)
-					return mt;
-			}
-			return Gnome.Vfs.MimeType.GetMimeTypeForUri (ConvertFileNameToVFS (uri));
+			return Gio.GetMimeTypeForUri (uri);
 		}
 		
 		protected override bool OnGetMimeTypeIsText (string mimeType)
@@ -127,20 +84,10 @@ namespace MonoDevelop.Platform
 					return true;
 			return base.OnGetMimeTypeIsText (mimeType);
 		}
-
-
-		public override void ShowUrl (string url)
-		{
-			Gnome.Url.Show (url);
-		}
 		
 		public override string DefaultMonospaceFont {
 			get {
-				try {
-					return (string) (new GConf.Client ().Get ("/desktop/gnome/interface/monospace_font_name"));
-				} catch (Exception) {
-					return "Monospace 11";
-				}
+				return "Monospace 11";
 			}
 		}
 		
@@ -158,19 +105,9 @@ namespace MonoDevelop.Platform
 			} else if (System.IO.File.Exists (filename)) {
 				filename = EscapeFileName (filename);
 				if (filename == null)
-					return "gnome-fs-regular";
-				
-				string icon = null;
-				Gnome.IconLookupResultFlags result;
-				try {
-					icon = Gnome.Icon.LookupSync (IconTheme.Default, thumbnailFactory, filename, null, 
-					                              Gnome.IconLookupFlags.None, out result);
-				} catch {}
-				if (icon != null && icon.Length > 0)
-					return icon;
+					return "gnome-fs-regular";				
 			}			
-			return "gnome-fs-regular";
-			
+			return "gnome-fs-regular";			
 		}
 		
 		protected override Xwt.Drawing.Image OnGetIconForFile (string filename)