Index: gnome-panel/panel-menu-items.c
===================================================================
--- gnome-panel/panel-menu-items.c	(révision 11234)
+++ gnome-panel/panel-menu-items.c	(copie de travail)
@@ -59,7 +59,7 @@
 #define NAMES_DIR               "/apps/nautilus/desktop"
 #define HOME_NAME_KEY           "/apps/nautilus/desktop/home_icon_name"
 #define COMPUTER_NAME_KEY       "/apps/nautilus/desktop/computer_icon_name"
-#define MAX_ITEMS_OR_SUBMENU    5
+#define MAX_ITEMS_OR_SUBMENU    "/apps/panel/global/max_items_or_submenu"
 
 G_DEFINE_TYPE (PanelPlaceMenuItem, panel_place_menu_item, GTK_TYPE_IMAGE_MENU_ITEM)
 G_DEFINE_TYPE (PanelDesktopMenuItem, panel_desktop_menu_item, GTK_TYPE_IMAGE_MENU_ITEM)
@@ -318,6 +318,7 @@
 	int          i;
 	GSList      *add_bookmarks, *l;
 	PanelBookmark *bookmark;
+	int max_items_or_submenu;
 
 	filename = g_build_filename (g_get_home_dir (),
 				     BOOKMARKS_FILENAME, NULL);
@@ -382,7 +383,12 @@
 
 	add_bookmarks = g_slist_reverse (add_bookmarks);
 
-	if (g_slist_length (add_bookmarks) <= MAX_ITEMS_OR_SUBMENU) {
+	max_items_or_submenu = gconf_client_get_int (
+						panel_gconf_get_client (),
+	                                        MAX_ITEMS_OR_SUBMENU,
+                                                NULL);
+
+	if (g_slist_length (add_bookmarks) <= max_items_or_submenu) {
 		add_menu = menu;
 	} else {
 		GtkWidget *item;
@@ -700,6 +706,7 @@
 	GSList       *sl;
 	PanelGioItem *item;
 	GtkWidget *add_menu;
+	int max_items_or_submenu;
 
 	items = NULL;
 
@@ -817,7 +824,12 @@
 	/* now that we have everything, add the items inline or in a submenu */
 	items = g_slist_reverse (items);
 
-	if (g_slist_length (items) <= MAX_ITEMS_OR_SUBMENU) {
+	max_items_or_submenu = gconf_client_get_int (
+						panel_gconf_get_client (),
+	                                        MAX_ITEMS_OR_SUBMENU,
+                                                NULL);
+
+	if (g_slist_length (items) <= max_items_or_submenu) {
 		add_menu = menu;
 	} else {
 		GtkWidget  *item;
@@ -868,6 +880,7 @@
 	GList     *mounts, *l;
 	GMount    *mount;
 	GSList    *add_mounts, *sl;
+	int max_items_or_submenu;
 
 	/* add mounts that has no volume (/etc/mtab mounts, ftp, sftp,...) */
 	mounts = g_volume_monitor_get_mounts (place_item->priv->volume_monitor);
@@ -898,7 +911,12 @@
 	}
 	add_mounts = g_slist_reverse (add_mounts);
 
-	if (g_slist_length (add_mounts) <= MAX_ITEMS_OR_SUBMENU) {
+	max_items_or_submenu = gconf_client_get_int (
+						panel_gconf_get_client (),
+	                                        MAX_ITEMS_OR_SUBMENU,
+                                                NULL);
+
+	if (g_slist_length (add_mounts) <= max_items_or_submenu) {
 		add_menu = menu;
 	} else {
 		GtkWidget  *item;
Index: gnome-panel/panel-global.schemas.in
===================================================================
--- gnome-panel/panel-global.schemas.in	(révision 11234)
+++ gnome-panel/panel-global.schemas.in	(copie de travail)
@@ -271,6 +271,18 @@
         </locale>
       </schema>
 
+      <schema>
+        <key>/schemas/apps/panel/global/max_items_or_submenu</key>
+        <applyto>/apps/panel/global/max_items_or_submenu</applyto>
+        <owner>panel</owner>
+        <type>int</type>
+        <default>5</default>
+        <locale name="C">
+          <short>Max items in a menu before using a submenu</short>
+          <long>By default, panel will use a submenu if there is more than 5 items in a menu, use this to configure this behaviour. Panel restart needed.
+          </long>
+        </locale>
+       </schema>
   </schemalist>
   
 </gconfschemafile>
