[maemo-commits] [maemo-commits] r8282 - in projects/haf/branches/maemo-af-desktop/hildon-desktop: . src

From: www-data at stage.maemo.org www-data at stage.maemo.org
Date: Thu Nov 23 15:19:25 EET 2006
Author: jobi
Date: 2006-11-23 15:19:24 +0200 (Thu, 23 Nov 2006)
New Revision: 8282

Modified:
   projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
   projects/haf/branches/maemo-af-desktop/hildon-desktop/src/hd-plugin-loader-factory.c
Log:

2006-11-23  Johan Bilien  <johan.bilien at nokia.com>

	* src/hd-plugin-loader-factory.c: if no Type= assume old API



Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog	2006-11-23 13:10:36 UTC (rev 8281)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog	2006-11-23 13:19:24 UTC (rev 8282)
@@ -1,5 +1,9 @@
 2006-11-23  Johan Bilien  <johan.bilien at nokia.com>
 
+	* src/hd-plugin-loader-factory.c: if no Type= assume old API
+
+2006-11-23  Johan Bilien  <johan.bilien at nokia.com>
+
 	* src/hd-home-window.[ch]:
 	- added
 	- inherit from HildonHomeWindow and implement everything related

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/src/hd-plugin-loader-factory.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/src/hd-plugin-loader-factory.c	2006-11-23 13:10:36 UTC (rev 8281)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/src/hd-plugin-loader-factory.c	2006-11-23 13:19:24 UTC (rev 8282)
@@ -136,10 +136,19 @@
 
   if (error)
   {
-    g_warning ("Error reading plugin desktop file: %s", error->message);
-    g_error_free (error);
-
-    return NULL;
+    if (error->domain == G_KEY_FILE_ERROR &&
+        error->code == G_KEY_FILE_ERROR_KEY_NOT_FOUND)
+    {
+      /* If no Type= assume old API */
+      type = g_strdup (HD_PLUGIN_LOADER_OLD_API);
+      g_error_free (error);
+    }
+    else
+    {
+      g_warning ("Error reading plugin desktop file: %s", error->message);
+      g_error_free (error);
+      return NULL;
+    }
   }
 
   if (!g_ascii_strcasecmp (type, HD_PLUGIN_LOADER_OLD_API)) 


More information about the maemo-commits mailing list