Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorJackson Harper <jackson@novell.com>2006-02-27 05:45:57 +0300
committerJackson Harper <jackson@novell.com>2006-02-27 05:45:57 +0300
commit18507258077a3e563e1ec795786c96e20170b6f9 (patch)
treee1d80dc19b06332200080dc243e1172d8b1eb369 /mcs
parente6b933951708127eddaece68ff63b70ff1628067 (diff)
* MimeIcon.cs: Don't crash when we can't load the GNOME stuff
correctly. I am spewing the exception though, so we don't hide the bugs. svn path=/trunk/mcs/; revision=57321
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs14
1 files changed, 10 insertions, 4 deletions
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs
index 5ad94ab5c06..9f6f54a3687 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs
@@ -768,12 +768,18 @@ namespace System.Windows.Forms
if (!GetMainIconThemePath ())
return MimeExtensionHandlerStatus.NO_ICONS;
+
+ try {
+ GetIconThemeInherits ();
- GetIconThemeInherits ();
-
- CreateUIIcons ();
+ CreateUIIcons ();
- CreateMimeTypeIcons( );
+ CreateMimeTypeIcons( );
+ } catch (Exception e) {
+ Console.Error.WriteLine ("Unable to start GNOME mime engine:");
+ Console.Error.WriteLine (e);
+ return MimeExtensionHandlerStatus.NO_GNOMECONFIG;
+ }
inherits_path_collection = null;
icon_paths = null;