[eog] Fix a forgotten PeasUI-to-PeasGtk conversion and report errors



commit 95694f8b5f06b891a5e55356451ad60b53387563
Author: Felix Riemann <friemann gnome org>
Date:   Mon Jan 3 21:24:45 2011 +0100

    Fix a forgotten PeasUI-to-PeasGtk conversion and report errors
    
    - Print warnings when typelibs cannot be loaded.
    - Try to load PeasGtk not PeasUI

 src/eog-plugin-engine.c |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)
---
diff --git a/src/eog-plugin-engine.c b/src/eog-plugin-engine.c
index 6049dec..d9976af 100644
--- a/src/eog-plugin-engine.c
+++ b/src/eog-plugin-engine.c
@@ -103,17 +103,31 @@ eog_plugin_engine_new (void)
 	g_free (search_path);
 
 	/* This should be moved to libpeas */
-	g_irepository_require (g_irepository_get_default (),
-			       "Peas", "1.0", 0, NULL);
-	g_irepository_require (g_irepository_get_default (),
-			       "PeasUI", "1.0", 0, NULL);
+	if (g_irepository_require (g_irepository_get_default (),
+				   "Peas", "1.0", 0, &error) == NULL)
+	{
+		g_warning ("Error loading Peas typelib: %s\n",
+			   error->message);
+		g_clear_error (&error);
+	}
+
+
+	if (g_irepository_require (g_irepository_get_default (),
+				   "PeasGtk", "1.0", 0, &error) == NULL)
+	{
+		g_warning ("Error loading PeasGtk typelib: %s\n",
+			   error->message);
+		g_clear_error (&error);
+	}
+
+
 
 	if (g_irepository_require (g_irepository_get_default (),
 				   "Eog", "3.0", 0, &error) == NULL)
 	{
-		g_warning ("Error loading eog typelib: %s\n",
+		g_warning ("Error loading Eog typelib: %s\n",
 			   error->message);
-		g_error_free (error);
+		g_clear_error (&error);
 	}
 
 	engine = EOG_PLUGIN_ENGINE (g_object_new (EOG_TYPE_PLUGIN_ENGINE,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]