[maemo-commits] [maemo-commits] r12096 - in projects/haf/trunk/hildon-desktop: . libhildondesktop src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Jun 4 22:59:29 EEST 2007
Author: moimart
Date: 2007-06-04 22:59:21 +0300 (Mon, 04 Jun 2007)
New Revision: 12096

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-item.h
   projects/haf/trunk/hildon-desktop/src/hd-config.h
   projects/haf/trunk/hildon-desktop/src/hd-desktop.c
Log:
2007-06-04  Moises Martinez  <moises.martinez at nokia.com>

        * src/hd-desktop.c:
        * src/hd-config.h:
        - Added additional and optional key X-Load to known whether a plugin
        is to be loaded or not.
        * libhildondesktop/hildon-desktop-item.h:
        - Added prototype.
	* ChangeLog updated.



Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-06-04 19:55:54 UTC (rev 12095)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-06-04 19:59:21 UTC (rev 12096)
@@ -1,3 +1,12 @@
+2007-06-04  Moises Martinez  <moises.martinez at nokia.com>
+
+	* src/hd-desktop.c:
+	* src/hd-config.h:
+	- Added additional and optional key X-Load to known whether a plugin
+	is to be loaded or not.
+	* libhildondesktop/hildon-desktop-item.h:
+	- Added prototype.
+
 2007-06-04  Johan Bilien  <johan.bilien at nokia.com>
 
 	* src/hd-panel-window.c:

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-item.h
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-item.h	2007-06-04 19:55:54 UTC (rev 12095)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-item.h	2007-06-04 19:59:21 UTC (rev 12096)
@@ -70,6 +70,8 @@
 gint          hildon_desktop_item_find_by_id  (HildonDesktopItem *item,
                                                const gchar *id);
 
+GtkWidget    *hildon_desktop_item_settings_dialog (HildonDesktopItem *item);
+
 G_END_DECLS
 
 #endif

Modified: projects/haf/trunk/hildon-desktop/src/hd-config.h
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-config.h	2007-06-04 19:55:54 UTC (rev 12095)
+++ projects/haf/trunk/hildon-desktop/src/hd-config.h	2007-06-04 19:59:21 UTC (rev 12096)
@@ -35,6 +35,7 @@
 #define HD_DESKTOP_CONFIG_KEY_UI_POLICY     "X-UI-Policy"
 #define HD_DESKTOP_CONFIG_KEY_IS_ORDERED    "X-Is-Ordered"
 #define HD_DESKTOP_CONFIG_KEY_PLUGIN_DIR    "X-Plugin-Dir"
+#define HD_DESKTOP_CONFIG_KEY_LOAD	    "X-Load"
 
 #define HD_DESKTOP_CONFIG_KEY_PADDING_TOP       "X-Padding-Top"
 #define HD_DESKTOP_CONFIG_KEY_PADDING_BOTTOM    "X-Padding-Bottom"

Modified: projects/haf/trunk/hildon-desktop/src/hd-desktop.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-desktop.c	2007-06-04 19:55:54 UTC (rev 12095)
+++ projects/haf/trunk/hildon-desktop/src/hd-desktop.c	2007-06-04 19:59:21 UTC (rev 12096)
@@ -309,6 +309,7 @@
 {
   GKeyFile *keyfile;
   gchar **groups;
+  gboolean is_to_load = TRUE;
   GList *plugin_list = NULL;
   GError *error = NULL;
   gint i;
@@ -326,7 +327,7 @@
   {
     g_warning ("Error loading container configuration file %s: %s", config_file, error->message);
     g_error_free (error);
-
+    
     return NULL;
   }
 
@@ -334,7 +335,20 @@
 
   for (i = 0; groups[i]; i++)
   {
-    plugin_list = g_list_append (plugin_list, groups[i]);
+    is_to_load = g_key_file_get_boolean (keyfile,
+		    			 groups[i],
+					 HD_DESKTOP_CONFIG_KEY_LOAD,
+					 &error);
+
+    if (error)
+    {
+      is_to_load = TRUE;
+      g_error_free (error);
+      error = NULL;
+    }      
+
+    if (is_to_load)    
+      plugin_list = g_list_append (plugin_list, groups[i]);
   }
 
   g_free (groups);


More information about the maemo-commits mailing list