← Back to team overview

cairo-dock-team team mailing list archive

[Merge] lp:~cairo-dock-team/cairo-dock-core/ubuntu into lp:ubuntu/cairo-dock

 

Matthieu Baerts has proposed merging lp:~cairo-dock-team/cairo-dock-core/ubuntu into lp:ubuntu/cairo-dock.

Requested reviews:
  Cairo-Dock Team (cairo-dock-team)
Related bugs:
  #518453 dock appears under all windows after a full screen app is run
  https://bugs.launchpad.net/bugs/518453
  #518628 Dialogs don't respect selected font
  https://bugs.launchpad.net/bugs/518628
  #521167 Cairo-dock crashes by theme changing
  https://bugs.launchpad.net/bugs/521167
  #521369 Separator not removed when closing grouped windows
  https://bugs.launchpad.net/bugs/521369
  #521534 Please update cairo-dock to 2.1.3-3 version
  https://bugs.launchpad.net/bugs/521534
  #521762 Misspelled and badly worded messages
  https://bugs.launchpad.net/bugs/521762
  #526466 Icons are being stacked
  https://bugs.launchpad.net/bugs/526466
  #526664 cairo-dock random crash, no self-restart
  https://bugs.launchpad.net/bugs/526664
  #535083 ugly notifications with dialog boxes
  https://bugs.launchpad.net/bugs/535083
  #568083 Please update Cairo-Dock to v2.1.3-10
  https://bugs.launchpad.net/bugs/568083
  #611733 icon labels go off-screen
  https://bugs.launchpad.net/bugs/611733
  #611738 icon label text is truncated
  https://bugs.launchpad.net/bugs/611738
  #612355 Add option in config file to set GL/Cairo mode
  https://bugs.launchpad.net/bugs/612355
  #612617 Add custom launchers or sub-docks, can't modify name.
  https://bugs.launchpad.net/bugs/612617
  #614624 Please update cairo-dock to 2.2.0 version
  https://bugs.launchpad.net/bugs/614624
  #614686 create new sud-dock icon that looking like flat.
  https://bugs.launchpad.net/bugs/614686
  #618336 all button tips visible if icons  'maximum zoom' set to 1.0
  https://bugs.launchpad.net/bugs/618336
  #632055 Please update cairo-dock to the latest 2.2.0 version  
  https://bugs.launchpad.net/bugs/632055
  #638527 Please update cairo-dock to the final 2.2.0 version  
  https://bugs.launchpad.net/bugs/638527
  #653702 Please update cairo-dock to the final 2.2.0~4 version (bugs fixed)
  https://bugs.launchpad.net/bugs/653702

-- 
https://code.launchpad.net/~cairo-dock-team/cairo-dock-core/ubuntu/+merge/37759
Your team Cairo-Dock Team is requested to review the proposed merge of lp:~cairo-dock-team/cairo-dock-core/ubuntu into lp:ubuntu/cairo-dock.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2010-09-18 12:19:06 +0000
+++ CMakeLists.txt	2010-10-06 16:46:42 +0000
@@ -10,7 +10,7 @@
 ########### project ###############
 
 project ("cairo-dock")
-set (VERSION "2.2.0-2")
+set (VERSION "2.2.0-4")
 
 add_definitions (-std=c99 -Wstrict-prototypes -Wextra -Wwrite-strings -Wuninitialized -Werror-implicit-function-declaration) #-Wunreachable-code -Wno-unused-parameter -Wall 
 if (NOT ${CMAKE_BUILD_TYPE})

=== modified file 'data/default-theme/plug-ins/rendering/rendering.conf'
--- data/default-theme/plug-ins/rendering/rendering.conf	2010-08-07 01:28:23 +0000
+++ data/default-theme/plug-ins/rendering/rendering.conf	2010-10-06 16:46:42 +0000
@@ -84,13 +84,13 @@
 frame_grid=
 
 #i+[30;100] Space between columns:
-simple_iconGapX=40
+simple_iconGapX=50
 
 #i+[30;100] Space between rows:
-simple_iconGapY=30
+simple_iconGapY=50
 
 #e+[1;3] Max icon size:
-simple_fScaleMax=1.6000000000000001
+simple_fScaleMax=1.600000000000000
 
 #i+[50;1000] Sinusoidal wave radius:
 simple_sinW=200

=== modified file 'data/help.conf.in'
--- data/help.conf.in	2010-08-07 01:28:23 +0000
+++ data/help.conf.in	2010-10-06 16:46:42 +0000
@@ -311,10 +311,10 @@
 config_terminal = 
 #X [So then, how can I remove completely the gnome-panel?]
 Xremove=
-#> Open gconf-editor, edit the key /desktop/gnome/session/required_components_list/panel, and replace its content with "cairo-dock".
+#> Open gconf-editor, edit the key /desktop/gnome/session/required_components/panel, and replace its content with "cairo-dock".
 #Then restart your session : the gnome-panel has not been started, and the dock has been started (if not, you can add it to the startup programs).
 remove=
-#G [sh -c "gconftool-2 --type string --set /desktop/gnome/session/required_components_list/panel '(cairo-dock'";sh -c "ps aux | grep -v grep | grep -c 'gnome-settings-daemon'"]If you are on Gnome, you can click on this button in order to automatically modify this key:
+#G [sh -c "gconftool-2 --type string --set /desktop/gnome/session/required_components/panel '(cairo-dock'";sh -c "ps aux | grep -v grep | grep -c 'gnome-settings-daemon'"]If you are on Gnome, you can click on this button in order to automatically modify this key:
 #{Tip: If this line is grayed, it's because this tip is not for you.)
 widget_compiz=
 

=== modified file 'debian/changelog'
--- debian/changelog	2010-09-18 12:19:06 +0000
+++ debian/changelog	2010-10-06 16:46:42 +0000
@@ -1,3 +1,21 @@
+cairo-dock (2.2.0~4-0ubuntu1) UNRELEASED; urgency=low
+
+  * New Upstream Version (LP: #653702)
+  * Fixed a few bugs:
+   - Fixed a random crash if CD is launched much time before the WM
+   - Improved the OpenGL backend.
+   - Some Images paths were wrong
+   - Icon label text was truncated (LP: #611738)
+   - Fixed a bug when the font was too big
+   - Gauges: Add a line return in order to read all Readme file
+   - Dialogues don't respect selected font (LP: #518628)
+  * debian/control:
+   - Updated the description.
+  * data/help.conf.in:
+   - Removed the Gnome-Panel: Used the right gconf key
+
+ -- Matthieu Baerts (matttbe) <matttbe@xxxxxxxxx>  Sat, 02 Oct 2010 20:10:59 +0200
+
 cairo-dock (2.2.0~2-0ubuntu1) maverick; urgency=low
 
   * New Upstream Version (LP: #638527)

=== modified file 'debian/control'
--- debian/control	2010-08-09 23:25:37 +0000
+++ debian/control	2010-10-06 16:46:42 +0000
@@ -30,15 +30,17 @@
 		cairo-dock-plug-ins (>= ${source:Version}),
 		${misc:Depends}
 Description: A light and eye-candy dock to launch your programs (metapackage)
- It uses Cairo / OpenGL to render graphics (many in correlation
- with Compiz) with full hardware acceleration. It's fully configurable and
- fully customisable and can be used as a taskbar too.
- You can easily add applets in the dock or as a desklet.
- It is recommended to install the PLUG-INS package (cairo-dock-plug-ins) to
- have acces to more views, dialogs and many plug-ins and applets.
+ Cairo-Dock is a pretty, light and convenient interface to your desktop,
+  able to replace advantageously your system panel! 
+ It features multi-docks, taskbar, launchers and a lot of useful applets. 
+ Applets can be detached from the dock to act as desktop widgets. 
+ Numerous ready-to-use themes are downloadable in 1 click, and can be easily
+  customized at your convenience.
+ It can use hardware acceleration to be very fast and low on CPU.
+ .
  Some screenshots are available : http://pics.glx-dock.org
- .
- This metapackage provides the components necessary for running Cairo-Dock. It
+ Development site: https://launchpad.net/cairo-dock
+ .sary for running Cairo-Dock. It
  provides the Cairo-Dock core, a set of standard plugins and the files necessary
  to integrate Cairo-Dock with your desktop environment. 
 
@@ -50,15 +52,18 @@
 Depends: 	cairo-dock-data (>= ${source:Version}),
 		${shlibs:Depends}, 
 		${misc:Depends}
-Recommends:	cairo-dock-plug-ins
+Suggests:	cairo-dock-plug-ins
 Description: A light and eye-candy dock to launch your programs (core package)
- It uses Cairo / OpenGL to render graphics (many in correlation
- with Compiz) with full hardware acceleration. It's fully configurable and
- fully customisable and can be used as a taskbar too.
- You can easily add applets in the dock or as a desklet.
- It is recommended to install the PLUG-INS package (cairo-dock-plug-ins) to
- have acces to more views, dialogs and many plug-ins and applets.
+ Cairo-Dock is a pretty, light and convenient interface to your desktop,
+  able to replace advantageously your system panel! 
+ It features multi-docks, taskbar, launchers and a lot of useful applets. 
+ Applets can be detached from the dock to act as desktop widgets. 
+ Numerous ready-to-use themes are downloadable in 1 click, and can be easily
+  customized at your convenience.
+ It can use hardware acceleration to be very fast and low on CPU.
+ .
  Some screenshots are available : http://pics.glx-dock.org
+ Development site: https://launchpad.net/cairo-dock
  .
  This package is the core of Cairo-Dock project.
 
@@ -80,15 +85,18 @@
 		libxinerama-dev,
 		libglib2.0-dev,
 		gawk
-Recommends:	cairo-dock-plug-ins
+Suggests:	cairo-dock-plug-ins
 Description: A light and eye-candy dock to launch your programs (dev package)
- It uses Cairo / OpenGL to render graphics (many in correlation
- with Compiz) with full hardware acceleration. It's fully configurable and
- fully customisable and can be used as a taskbar too.
- You can easily add applets in the dock or as a desklet.
- It is recommended to install the PLUG-INS package (cairo-dock-plug-ins) to
- have acces to more views, dialogs and many plug-ins and applets.
+ Cairo-Dock is a pretty, light and convenient interface to your desktop,
+  able to replace advantageously your system panel! 
+ It features multi-docks, taskbar, launchers and a lot of useful applets. 
+ Applets can be detached from the dock to act as desktop widgets. 
+ Numerous ready-to-use themes are downloadable in 1 click, and can be easily
+  customized at your convenience.
+ It can use hardware acceleration to be very fast and low on CPU.
+ .
  Some screenshots are available : http://pics.glx-dock.org
+ Development site: https://launchpad.net/cairo-dock
  .
  This package provides the include files and static library for cairo-dock 
  functions.
@@ -101,12 +109,15 @@
 Depends: 	${shlibs:Depends}, 
 		${misc:Depends}
 Description: A light and eye-candy dock to launch your programs (common files)
- It uses Cairo / OpenGL to render graphics (many in correlation
- with Compiz) with full hardware acceleration. It's fully configurable and
- fully customisable and can be used as a taskbar too.
- You can easily add applets in the dock or as a desklet.
- It is recommended to install the PLUG-INS package (cairo-dock-plug-ins) to
- have acces to more views, dialogs and many plug-ins and applets.
+ Cairo-Dock is a pretty, light and convenient interface to your desktop,
+  able to replace advantageously your system panel! 
+ It features multi-docks, taskbar, launchers and a lot of useful applets. 
+ Applets can be detached from the dock to act as desktop widgets. 
+ Numerous ready-to-use themes are downloadable in 1 click, and can be easily
+  customized at your convenience.
+ It can use hardware acceleration to be very fast and low on CPU.
+ .
  Some screenshots are available : http://pics.glx-dock.org
+ Development site: https://launchpad.net/cairo-dock
  .
  This package contains default icons and themes for Cairo-Dock.

=== modified file 'src/cairo-dock-gui-launcher.c'
--- src/cairo-dock-gui-launcher.c	2010-09-16 01:04:13 +0000
+++ src/cairo-dock-gui-launcher.c	2010-10-06 16:46:42 +0000
@@ -285,7 +285,7 @@
 			g_free (cImagePath);
 			if (CAIRO_DOCK_IS_SEPARATOR (pIcon))
 			{
-				cImagePath = cairo_dock_generate_file_path (myIcons.cSeparatorImage);
+				cImagePath = cairo_dock_search_image_s_path (myIcons.cSeparatorImage);
 			}
 			else if (CAIRO_DOCK_IS_APPLET (pIcon))
 			{
@@ -293,7 +293,7 @@
 			}
 			else
 			{
-				cImagePath = cairo_dock_generate_file_path (CAIRO_DOCK_DEFAULT_ICON_NAME);
+				cImagePath = cairo_dock_search_image_s_path (CAIRO_DOCK_DEFAULT_ICON_NAME);
 				if (cImagePath == NULL || ! g_file_test (cImagePath, G_FILE_TEST_EXISTS))
 				{
 					g_free (cImagePath);

=== modified file 'src/cairo-dock-gui-simple.c'
--- src/cairo-dock-gui-simple.c	2010-09-16 01:04:13 +0000
+++ src/cairo-dock-gui-simple.c	2010-10-06 16:46:42 +0000
@@ -707,7 +707,8 @@
 static void _make_double_anim_widget (GtkWidget *pSimpleConfigWindow, GKeyFile *pKeyFile, const gchar *cGroupName, const gchar *cKeyName, const gchar *cLabel)
 {
 	CairoDockGroupKeyWidget *myWidget = cairo_dock_gui_find_group_key_widget (pSimpleConfigWindow, cGroupName, cKeyName);
-	g_return_if_fail (myWidget != NULL);
+	if (myWidget == NULL)  // peut arriver vu que en mode cairo on n'a pas "anim_hover"
+		return;
 	
 	gsize length = 0;
 	gchar **cValues = g_key_file_get_string_list (pKeyFile, cGroupName, cKeyName, &length, NULL);

=== modified file 'src/cairo-dock-menu.c'
--- src/cairo-dock-menu.c	2010-09-16 01:04:13 +0000
+++ src/cairo-dock-menu.c	2010-10-06 16:46:42 +0000
@@ -116,11 +116,12 @@
 	cd_message ("%s (%s)", __func__, cDockName);
 	
 	gchar *cConfFilePath = g_strdup_printf ("%s/%s.conf", g_cCurrentThemePath, cDockName);
-	if (! g_file_test (cConfFilePath, G_FILE_TEST_EXISTS))
+	if (! g_file_test (cConfFilePath, G_FILE_TEST_EXISTS))  // ne devrait pas arriver mais au cas ou.
 	{
-		gchar *cCommand = g_strdup_printf ("cp \"%s\" \"%s\"", CAIRO_DOCK_SHARE_DATA_DIR"/"CAIRO_DOCK_MAIN_DOCK_CONF_FILE, cConfFilePath);
+		cairo_dock_add_root_dock_config_for_name (cDockName);
+		/**gchar *cCommand = g_strdup_printf ("cp \"%s\" \"%s\"", CAIRO_DOCK_SHARE_DATA_DIR"/"CAIRO_DOCK_MAIN_DOCK_CONF_FILE, cConfFilePath);
 		int r = system (cCommand);
-		g_free (cCommand);
+		g_free (cCommand);*/
 	}
 	
 	if (s_pRootDockConfigWindow != NULL)

=== modified file 'src/cairo-dock.c'
--- src/cairo-dock.c	2010-09-18 12:19:06 +0000
+++ src/cairo-dock.c	2010-10-06 16:46:42 +0000
@@ -164,12 +164,29 @@
 static gboolean s_bTestComposite = TRUE;
 static gint s_iGuiMode = 0;  // 0 = simple mode, 1 = advanced mode
 
+static inline void _cancel_metacity_composite (void)
+{
+	int r = system ("gconftool-2 -s '/apps/metacity/general/compositing_manager' --type bool false");
+}
 static void _accept_metacity_composition (int iClickedButton, GtkWidget *pInteractiveWidget, gpointer data, CairoDialog *pDialog)
 {
-	if (iClickedButton == 1)  // clic explicite sur "cancel"
-	{
-		int r = system ("gconftool-2 -s '/apps/metacity/general/compositing_manager' --type bool false");
-	}
+	g_print ("%s (%d)\n", __func__, iClickedButton);
+	if (iClickedButton == 1 || iClickedButton == -2)  // clic explicite sur "cancel", ou Echap ou auto-delete.
+	{
+		_cancel_metacity_composite ();
+	}
+	gboolean *bAccepted = data;
+	*bAccepted = TRUE;  // l'utilisateur a valide son choix.
+}
+static void _on_free_metacity_dialog (gpointer data)
+{
+	gboolean *bAccepted = data;
+	g_print ("%s (%d)\n", __func__, *bAccepted);
+	if (! *bAccepted)  // le dialogue s'est detruit sans que l'utilisateur n'ait valide la question => on annule tout.
+	{
+		_cancel_metacity_composite ();
+	}
+	g_free (data);
 }
 static void _toggle_remember_choice (GtkCheckButton *pButton, GtkWidget *pDialog)
 {
@@ -200,17 +217,17 @@
 				g_signal_connect (G_OBJECT (pCheckBox), "toggled", G_CALLBACK(_toggle_remember_choice), pAskBox);
 				int iClickedButton = cairo_dock_show_dialog_and_wait (_("To remove the black rectangle around the dock, you will need to activate a composite manager.\nFor instance, this can be done by activating desktop effects, launching Compiz, or activating the composition in Metacity.\nI can perform this last operation for you. Do you want to proceed ?"), pIcon, CAIRO_CONTAINER (g_pMainDock), 0., NULL, pAskBox);
 				
-				gboolean bRememberChoice = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (pAskBox), "remember"));
-				gtk_widget_destroy (pAskBox);
+				gboolean bRememberChoice = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (pCheckBox));
+				gtk_widget_destroy (pAskBox); // le widget survit a un dialogue bloquant.
 				if (bRememberChoice)
 				{
 					s_bTestComposite = FALSE;
 				}
-				///int iAnswer= cairo_dock_ask_question_and_wait (_("To remove the black rectangle around the dock, you will need to activate a composite manager.\nFor instance, this can be done by activating desktop effects, launching Compiz, or activating the composition in Metacity.\nI can perform this last operation for you. Do you want to proceed ?"), pIcon, CAIRO_CONTAINER (g_pMainDock));
-				if (iClickedButton == 0 || iClickedButton == -1)
+				if (iClickedButton == 0 || iClickedButton == -1)  // ok or Enter.
 				{
 					int r = system ("gconftool-2 -s '/apps/metacity/general/compositing_manager' --type bool true");
-					cairo_dock_show_dialog_with_question (_("Do you want to keep this setting?"), pIcon, CAIRO_CONTAINER (g_pMainDock), NULL, (CairoDockActionOnAnswerFunc) _accept_metacity_composition, NULL, NULL);
+					///cairo_dock_show_dialog_with_question (_("Do you want to keep this setting?"), pIcon, CAIRO_CONTAINER (g_pMainDock), NULL, (CairoDockActionOnAnswerFunc) _accept_metacity_composition, NULL, NULL);
+					cairo_dock_show_dialog_full (_("Do you want to keep this setting?"), pIcon, CAIRO_CONTAINER (g_pMainDock), 10e3, NULL, NULL, (CairoDockActionOnAnswerFunc) _accept_metacity_composition, g_new0 (gboolean, 1), (GFreeFunc)_on_free_metacity_dialog);
 				}
 				
 			}
@@ -393,7 +410,7 @@
 	s_cLaunchCommand = sCommandString->str;
 	g_string_free (sCommandString, FALSE);
 	
-	cd_log_init(FALSE);  // no log by default.
+	cd_log_init(FALSE);  // warnings by default.
 	
 	gtk_init (&argc, &argv);
 	
@@ -543,6 +560,8 @@
 	gchar *cExtraDirPath = g_strconcat (cRootDataDirPath, "/"CAIRO_DOCK_EXTRAS_DIR, NULL);
 	gchar *cThemesDirPath = g_strconcat (cRootDataDirPath, "/"CAIRO_DOCK_THEMES_DIR, NULL);
 	gchar *cCurrentThemeDirPath = g_strconcat (cRootDataDirPath, "/"CAIRO_DOCK_CURRENT_THEME_NAME, NULL);
+	gboolean bFirstLaunch = ! g_file_test (cRootDataDirPath, G_FILE_TEST_IS_DIR);
+	
 	cairo_dock_set_paths (cRootDataDirPath, cExtraDirPath, cThemesDirPath, cCurrentThemeDirPath, cThemeServerAdress ? cThemeServerAdress : g_strdup (CAIRO_DOCK_THEME_SERVER));
 	
 	//\___________________ On initialise le gestionnaire de docks (a faire en 1er).
@@ -803,7 +822,6 @@
 		g_free (cConfFilePath);
 	}
 	
-	gboolean bFirstLaunch = ! g_file_test (cRootDataDirPath, G_FILE_TEST_IS_DIR);
 	if (bFirstLaunch)  // tout premier lancement -> bienvenue !
 	{
 		cairo_dock_show_general_message (_("Welcome in Cairo-Dock2 !\nA default and simple theme has been loaded.\nYou can either familiarize yourself with the dock or choose another theme with right-click -> Cairo-Dock -> Manage themes.\nA useful help is available by right-click -> Cairo-Dock -> Help.\nIf you have any question/request/remark, please pay us a visit at http://glx-dock.org.\nHope you will enjoy this soft !\n  (you can now click on this dialog to close it)"), 0);

=== modified file 'src/gldit/CMakeLists.txt'
--- src/gldit/CMakeLists.txt	2010-08-07 01:28:23 +0000
+++ src/gldit/CMakeLists.txt	2010-10-06 16:46:42 +0000
@@ -88,9 +88,20 @@
 	${CMAKE_SOURCE_DIR}/src/icon-factory
 	${CMAKE_SOURCE_DIR}/src/implementations)
 
+# Define the library
 add_library ("gldi" SHARED ${core_lib_SRCS})
+STRING (REGEX REPLACE "\\..*" "" SOVERSION "${VERSION}")
+set_target_properties ("gldi" PROPERTIES
+	# create *nix style library versions + symbolic links
+	VERSION ${VERSION}
+	SOVERSION ${SOVERSION}
+	# allow creating static and shared libs without conflicts
+	#CLEAN_DIRECT_OUTPUT 1
+	# avoid conflicts between library and binary target names
+	#OUTPUT_NAME ${PROJECT_NAME}
+)
 
-# Link the executable to the librairies.
+# Link the result to the librairies.
 target_link_libraries("gldi"
 	${PACKAGE_LIBRARIES}
 	${XEXTEND_LIBRARIES}
@@ -102,6 +113,8 @@
 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/gldi.pc.in ${CMAKE_CURRENT_BINARY_DIR}/gldi.pc)
 install (FILES  ${CMAKE_CURRENT_BINARY_DIR}/gldi.pc DESTINATION ${libdir}/pkgconfig)
 install (FILES  ${CMAKE_CURRENT_BINARY_DIR}/libgldi.so DESTINATION ${libdir})
+install (FILES  ${CMAKE_CURRENT_BINARY_DIR}/libgldi.so.${VERSION} DESTINATION ${libdir})
+install (FILES  ${CMAKE_CURRENT_BINARY_DIR}/libgldi.so.${SOVERSION} DESTINATION ${libdir})
 
 ########### install files ###############
 

=== modified file 'src/gldit/cairo-dock-applet-manager.c'
--- src/gldit/cairo-dock-applet-manager.c	2010-08-07 01:28:23 +0000
+++ src/gldit/cairo-dock-applet-manager.c	2010-10-06 16:46:42 +0000
@@ -69,18 +69,7 @@
 		icon->pIconBuffer = cairo_dock_create_surface_from_image_simple (icon->pModuleInstance->pModule->pVisitCard->cIconFilePath,
 			iWidth,
 			iHeight);
-	}
-	/*if (icon->pIconBuffer != NULL && icon->pModuleInstance != NULL)
-	{
-		if (icon->pModuleInstance->pDrawContext != NULL)
-			cairo_destroy (icon->pModuleInstance->pDrawContext);
-		icon->pModuleInstance->pDrawContext = cairo_create (icon->pIconBuffer);
-		if (cairo_status (pInstance->pDrawContext) != CAIRO_STATUS_SUCCESS)
-		{
-			cd_warning ("couldn't initialize drawing context, applet won't be reloaded !");
-			icon->pModuleInstance->pDrawContext = NULL;
-		}
-	}*/
+	}  // on ne recharge pas myDrawContext car de toute facon l'icone de l'applet est chargee par le module-manager lors de l'init ou du reload, donc c'est lui qui gere le contexte.
 }
 
 static gboolean _delete_applet (Icon *icon)

=== modified file 'src/gldit/cairo-dock-application-facility.c'
--- src/gldit/cairo-dock-application-facility.c	2010-08-07 01:28:23 +0000
+++ src/gldit/cairo-dock-application-facility.c	2010-10-06 16:46:42 +0000
@@ -141,7 +141,7 @@
 			if (pParentDock != NULL)
 				_cairo_dock_appli_demands_attention (pInhibitorIcon, pParentDock, bForceDemand, NULL);
 		}
-		else if (bForceDemand)  // appli pas affichee, mais on veut tout de même etre notifie.
+		else if (bForceDemand)  // appli pas affichee, mais on veut tout de m�me etre notifie.
 		{
 			Icon *pOneIcon = cairo_dock_get_dialogless_icon ();  // on prend une icone dans le main dock.
 			if (pOneIcon != NULL)
@@ -360,6 +360,7 @@
 			if (pParentDock == NULL)  // alors il faut creer le sous-dock, qu'on associera soit a pSameClassIcon soit a un fake.
 			{
 				cd_message ("  creation du dock pour la classe %s", icon->cClass);
+				pMainDock = cairo_dock_search_dock_from_name (pSameClassIcon->cParentDockName);  // can be NULL (even if in practice will never be).
 				pParentDock = cairo_dock_create_subdock_from_scratch (NULL, icon->cClass, pMainDock);
 			}
 			else
@@ -432,6 +433,8 @@
 
 CairoDock *cairo_dock_insert_appli_in_dock (Icon *icon, CairoDock *pMainDock, gboolean bUpdateSize, gboolean bAnimate)
 {
+	if (! myTaskBar.bShowAppli)
+		return NULL;
 	cd_message ("%s (%s, %d)", __func__, icon->cName, icon->Xid);
 	
 	//\_________________ On gere ses eventuels inhibiteurs.

=== modified file 'src/gldit/cairo-dock-applications-manager.c'
--- src/gldit/cairo-dock-applications-manager.c	2010-09-16 01:04:13 +0000
+++ src/gldit/cairo-dock-applications-manager.c	2010-10-06 16:46:42 +0000
@@ -217,7 +217,7 @@
 		if (!cairo_dock_is_temporary_hidden (pDock))
 			cairo_dock_activate_temporary_auto_hide (pDock);
 	}
-	else
+	else if (pDock->iVisibility != CAIRO_DOCK_VISI_AUTO_HIDE_ON_OVERLAP_ANY)
 	{
 		if (cairo_dock_is_temporary_hidden (pDock))
 			cairo_dock_deactivate_temporary_auto_hide (pDock);
@@ -306,21 +306,24 @@
 			{
 				icon->iLastCheckTime = s_iTime;
 				icon->iStackOrder = iStackOrder ++;
-				if ((! myTaskBar.bAppliOnCurrentDesktopOnly || cairo_dock_appli_is_on_current_desktop (icon)))  // bHideVisibleApplis est gere lors de l'insertion.
-				{
-					cd_message (" insertion de %s ... (%d)", icon->cName, icon->iLastCheckTime);
-					pParentDock = cairo_dock_insert_appli_in_dock (icon, pDock, ! CAIRO_DOCK_UPDATE_DOCK_SIZE, CAIRO_DOCK_ANIMATE_ICON);
-					if (pParentDock != NULL)
-					{
-						if (pParentDock->bIsMainDock)
-							bUpdateMainDockSize = TRUE;
-						else
-							cairo_dock_update_dock_size (pParentDock);
-					}
-				}
-				else if (myTaskBar.bMixLauncherAppli)  // on met tout de meme l'indicateur sur le lanceur.
-				{
-					cairo_dock_prevent_inhibated_class (icon);
+				if (myTaskBar.bShowAppli)
+				{
+					if ((! myTaskBar.bAppliOnCurrentDesktopOnly || cairo_dock_appli_is_on_current_desktop (icon)))  // bHideVisibleApplis est gere lors de l'insertion.
+					{
+						cd_message (" insertion de %s ... (%d)", icon->cName, icon->iLastCheckTime);
+						pParentDock = cairo_dock_insert_appli_in_dock (icon, pDock, ! CAIRO_DOCK_UPDATE_DOCK_SIZE, CAIRO_DOCK_ANIMATE_ICON);
+						if (pParentDock != NULL)
+						{
+							if (pParentDock->bIsMainDock)
+								bUpdateMainDockSize = TRUE;
+							else
+								cairo_dock_update_dock_size (pParentDock);
+						}
+					}
+					else if (myTaskBar.bMixLauncherAppli)  // on met tout de meme l'indicateur sur le lanceur.
+					{
+						cairo_dock_prevent_inhibated_class (icon);
+					}
 				}
 				
 				// visibilite
@@ -419,7 +422,7 @@
 	CairoDock *pDock = g_pMainDock;
 	
 	// applis du bureau courant seulement.
-	if (myTaskBar.bAppliOnCurrentDesktopOnly)
+	if (myTaskBar.bAppliOnCurrentDesktopOnly && myTaskBar.bShowAppli)
 	{
 		g_hash_table_foreach (s_hXWindowTable, (GHFunc) _cairo_dock_hide_show_windows_on_other_desktops, pDock);
 	}
@@ -472,7 +475,7 @@
 		{
 			icon->bIsFullScreen = bIsFullScreen;
 			icon->bIsHidden = bIsHidden;
-			cairo_dock_foreach_root_docks ((GFunc)_hide_show_if_on_our_way, NULL);
+			cairo_dock_foreach_root_docks ((GFunc)_hide_show_if_on_our_way, icon);
 		}
 	}
 	
@@ -509,7 +512,7 @@
 		}
 		
 		// applis minimisees seulement
-		if (myTaskBar.bHideVisibleApplis)  // on insere/detache l'icone selon la visibilite de la fenetre, avec une animation.
+		if (myTaskBar.bHideVisibleApplis && myTaskBar.bShowAppli)  // on insere/detache l'icone selon la visibilite de la fenetre, avec une animation.
 		{
 			if (bIsHidden)  // se cache => on insere son icone.
 			{
@@ -570,7 +573,7 @@
 	icon->iNumDesktop = cairo_dock_get_xwindow_desktop (Xid);
 	
 	// applis du bureau courant seulement.
-	if (myTaskBar.bAppliOnCurrentDesktopOnly)
+	if (myTaskBar.bAppliOnCurrentDesktopOnly && myTaskBar.bShowAppli)
 	{
 		_cairo_dock_hide_show_windows_on_other_desktops (&Xid, icon, g_pMainDock);  // si elle vient sur notre bureau, elle n'est pas forcement sur le meme viewport, donc il faut le verifier.
 	}
@@ -578,7 +581,7 @@
 	// visibilite
 	if (Xid == s_iCurrentActiveWindow)  // c'est la fenetre courante qui a change de bureau.
 	{
-		cairo_dock_foreach_root_docks ((GFunc)_hide_show_if_on_our_way, NULL);
+		cairo_dock_foreach_root_docks ((GFunc)_hide_show_if_on_our_way, icon);
 	}
 	
 	if ((icon->iNumDesktop == -1 || icon->iNumDesktop == g_desktopGeometry.iCurrentDesktop) && icon->iViewPortX == g_desktopGeometry.iCurrentViewportX && icon->iViewPortY == g_desktopGeometry.iCurrentViewportY)  // petite optimisation : si l'appli arrive sur le bureau courant, on peut se contenter de ne verifier qu'elle.
@@ -633,10 +636,10 @@
 	else  // elle est sur le bureau.
 	{
 		// applis du bureau courant seulement.
-		if (myTaskBar.bAppliOnCurrentDesktopOnly && icon->cParentDockName == NULL)
+		if (myTaskBar.bAppliOnCurrentDesktopOnly && icon->cParentDockName == NULL && myTaskBar.bShowAppli)
 		{
 			cd_message ("cette fenetre est sur le bureau courant (%d;%d)", e->x, e->y);
-			gboolean bInsideDock = (icon->cParentDockName != NULL);  // jamais verifie mais ca devrait etre bon.
+			gboolean bInsideDock = (icon->cParentDockName != NULL);
 			if (! bInsideDock)
 				cairo_dock_insert_appli_in_dock (icon, g_pMainDock, CAIRO_DOCK_UPDATE_DOCK_SIZE, ! CAIRO_DOCK_ANIMATE_ICON);
 		}
@@ -853,7 +856,7 @@
 
 void cairo_dock_start_application_manager (CairoDock *pDock)
 {
-	g_return_if_fail (!s_bAppliManagerIsRunning && myTaskBar.bShowAppli);
+	g_return_if_fail (!s_bAppliManagerIsRunning);
 	
 	cairo_dock_set_overwrite_exceptions (myTaskBar.cOverwriteException);
 	cairo_dock_set_group_exceptions (myTaskBar.cGroupException);
@@ -896,21 +899,24 @@
 		{
 			//pIcon->fOrder = iOrder++;
 			pIcon->iLastCheckTime = s_iTime;
-			if (! myTaskBar.bAppliOnCurrentDesktopOnly || cairo_dock_appli_is_on_current_desktop (pIcon))  // le filtre 'bHideVisibleApplis' est gere dans la fonction d'insertion.
-			{
-				pParentDock = cairo_dock_insert_appli_in_dock (pIcon, pDock, ! CAIRO_DOCK_UPDATE_DOCK_SIZE, ! CAIRO_DOCK_ANIMATE_ICON);
-				//g_print (">>>>>>>>>>>> Xid : %d\n", Xid);
-				if (pParentDock != NULL)
-				{
-					if (pParentDock->bIsMainDock)
-						bUpdateMainDockSize = TRUE;
-					else
-						cairo_dock_update_dock_size (pParentDock);
-				}
-			}
-			else if (myTaskBar.bMixLauncherAppli)  // on met tout de meme l'indicateur sur le lanceur.
-			{
-				cairo_dock_prevent_inhibated_class (pIcon);
+			if (myTaskBar.bShowAppli)
+			{
+				if (! myTaskBar.bAppliOnCurrentDesktopOnly || cairo_dock_appli_is_on_current_desktop (pIcon))  // le filtre 'bHideVisibleApplis' est gere dans la fonction d'insertion.
+				{
+					pParentDock = cairo_dock_insert_appli_in_dock (pIcon, pDock, ! CAIRO_DOCK_UPDATE_DOCK_SIZE, ! CAIRO_DOCK_ANIMATE_ICON);
+					//g_print (">>>>>>>>>>>> Xid : %d\n", Xid);
+					if (pParentDock != NULL)
+					{
+						if (pParentDock->bIsMainDock)
+							bUpdateMainDockSize = TRUE;
+						else
+							cairo_dock_update_dock_size (pParentDock);
+					}
+				}
+				else if (myTaskBar.bMixLauncherAppli)  // on met tout de meme l'indicateur sur le lanceur.
+				{
+					cairo_dock_prevent_inhibated_class (pIcon);
+				}
 			}
 		}
 		else
@@ -1347,11 +1353,10 @@
 		icon->pIconBuffer = cairo_dock_create_surface_from_xwindow (icon->Xid, iWidth, iHeight);
 	if (icon->pIconBuffer == NULL)  // certaines applis comme xterm ne definissent pas d'icone, on en met une par defaut.
 	{
-		cd_debug ("%s (%ld) doesn't define any icon, we set the default one.\n", icon->cName, icon->Xid);
-		gchar *cIconPath = cairo_dock_generate_file_path (CAIRO_DOCK_DEFAULT_APPLI_ICON_NAME);
-		if (cIconPath == NULL || ! g_file_test (cIconPath, G_FILE_TEST_EXISTS))
+		cd_debug ("%s (%ld) doesn't define any icon, we set the default one.", icon->cName, icon->Xid);
+		gchar *cIconPath = cairo_dock_search_image_s_path (CAIRO_DOCK_DEFAULT_APPLI_ICON_NAME);
+		if (cIconPath == NULL)  // image non trouvee.
 		{
-			g_free (cIconPath);
 			cIconPath = g_strdup (CAIRO_DOCK_SHARE_DATA_DIR"/"CAIRO_DOCK_DEFAULT_APPLI_ICON_NAME);
 		}
 		icon->pIconBuffer = cairo_dock_create_surface_from_image_simple (cIconPath,
@@ -1405,26 +1410,23 @@
 	icon->bHasIndicator = myIndicators.bDrawIndicatorOnAppli;
 	
 	//\____________ On remplit ses buffers.
-	#ifdef HAVE_XEXTEND
-	if (myTaskBar.iMinimizedWindowRenderType == 1 && ! icon->bIsHidden)
-	{
-		//Display *display = gdk_x11_get_default_xdisplay ();
-		icon->iBackingPixmap = XCompositeNameWindowPixmap (s_XDisplay, Xid);
-		/*icon->iDamageHandle = XDamageCreate (s_XDisplay, Xid, XDamageReportNonEmpty);  // XDamageReportRawRectangles
-		cd_debug ("backing pixmap : %d ; iDamageHandle : %d\n", icon->iBackingPixmap, icon->iDamageHandle);*/
-	}
-	#endif
-	
-	if (pDock)
-	{
-		cairo_dock_trigger_load_icon_buffers (icon, CAIRO_CONTAINER (pDock));
-		/**if (icon->bIsHidden && myTaskBar.iMinimizedWindowRenderType == 2)
-		{
-			cairo_dock_draw_hidden_appli_icon (icon, CAIRO_CONTAINER (pDock), FALSE);
-		}*/
-	}
-	else
-		g_print ("%s is not loaded\n", icon->cName);
+	if (myTaskBar.bShowAppli)
+	{
+		#ifdef HAVE_XEXTEND
+		if (myTaskBar.iMinimizedWindowRenderType == 1 && ! icon->bIsHidden)
+		{
+			//Display *display = gdk_x11_get_default_xdisplay ();
+			icon->iBackingPixmap = XCompositeNameWindowPixmap (s_XDisplay, Xid);
+			/*icon->iDamageHandle = XDamageCreate (s_XDisplay, Xid, XDamageReportNonEmpty);  // XDamageReportRawRectangles
+			cd_debug ("backing pixmap : %d ; iDamageHandle : %d\n", icon->iBackingPixmap, icon->iDamageHandle);*/
+		}
+		#endif
+		
+		if (pDock)
+		{
+			cairo_dock_trigger_load_icon_buffers (icon, CAIRO_CONTAINER (pDock));
+		}
+	}
 	
 	//\____________ On enregistre l'appli et on commence a la surveiller.
 	cairo_dock_register_appli (icon);

=== modified file 'src/gldit/cairo-dock-config.c'
--- src/gldit/cairo-dock-config.c	2010-09-18 12:19:06 +0000
+++ src/gldit/cairo-dock-config.c	2010-10-06 16:46:42 +0000
@@ -450,8 +450,8 @@
 	gchar *cFileName = cairo_dock_get_string_key_value (pKeyFile, cGroupName, cKeyName, bFlushConfFileNeeded, NULL, cDefaultGroupName, cDefaultKeyName);
 	gchar *cFilePath = NULL;
 	if (cFileName != NULL)
-		cFilePath = cairo_dock_generate_file_path (cFileName);
-	else if (cDefaultFileName != NULL && cDefaultDir != NULL)
+		cFilePath = cairo_dock_search_image_s_path (cFileName);
+	if (cFilePath == NULL && cDefaultFileName != NULL && cDefaultDir != NULL)  // pas d'image specifiee, ou image introuvable => on prend l'image par defaut fournie.
 		cFilePath = g_strdup_printf ("%s/%s", cDefaultDir, cDefaultFileName);
 	return cFilePath;
 }
@@ -516,11 +516,9 @@
 	double fTime = time_val.tv_sec + time_val.tv_usec * 1e-6;
 	cairo_dock_activate_modules_from_list (mySystem.cActiveModuleList, fTime);
 	
-	//\___________________ On lance la barre des taches.
-	if (myTaskBar.bShowAppli)
-	{
+	//\___________________ On lance le gestionnaires des applis, meme si on les affiche pas, car il gere aussi le recouvrement des fenetres par le dock et maintient la liste des applications ouvertes.
+	///if (myTaskBar.bShowAppli)
 		cairo_dock_start_application_manager (pMainDock);  // va inserer le separateur si necessaire.
-	}
 	
 	//\___________________ On dessine tout.
 	cairo_dock_draw_subdock_icons ();
@@ -581,13 +579,13 @@
 	//\___________________ On garde une trace de certains parametres.
 	gchar *cRaiseDockShortcutOld = myAccessibility.cRaiseDockShortcut;
 	myAccessibility.cRaiseDockShortcut = NULL;
-	///gboolean bPopUpOld = myAccessibility.bPopUp;  // FALSE initialement.
 	gboolean bUseFakeTransparencyOld = mySystem.bUseFakeTransparency;  // FALSE initialement.
 	gboolean bGroupAppliByClassOld = myTaskBar.bGroupAppliByClass;  // FALSE initialement.
 	gboolean bHideVisibleApplisOld = myTaskBar.bHideVisibleApplis;
 	gboolean bAppliOnCurrentDesktopOnlyOld = myTaskBar.bAppliOnCurrentDesktopOnly;
 	gboolean bMixLauncherAppliOld = myTaskBar.bMixLauncherAppli;
 	gboolean bOverWriteXIconsOld = myTaskBar.bOverWriteXIcons;  // TRUE initialement.
+	gboolean bShowAppliOld = myTaskBar.bShowAppli;
 	gint iMinimizedWindowRenderTypeOld = myTaskBar.iMinimizedWindowRenderType;
 	gchar *cDeskletDecorationsNameOld = myDesklets.cDeskletDecorationsName;
 	myDesklets.cDeskletDecorationsName = NULL;
@@ -682,7 +680,7 @@
 		bMixLauncherAppliOld != myTaskBar.bMixLauncherAppli ||
 		bOverWriteXIconsOld != myTaskBar.bOverWriteXIcons ||
 		iMinimizedWindowRenderTypeOld != myTaskBar.iMinimizedWindowRenderType ||
-		(cairo_dock_application_manager_is_running () && ! myTaskBar.bShowAppli))  // on ne veut plus voir les applis, il faut donc les enlever.
+		(bShowAppliOld != myTaskBar.bShowAppli))
 	{
 		cairo_dock_stop_application_manager ();
 	}
@@ -710,7 +708,7 @@
 	cairo_dock_activate_modules_from_list (mySystem.cActiveModuleList, fTime);
 	cairo_dock_deactivate_old_modules (fTime);
 	
-	if (! cairo_dock_application_manager_is_running () && myTaskBar.bShowAppli)  // maintenant on veut voir les applis !
+	if (! cairo_dock_application_manager_is_running ())  // maintenant on veut voir les applis !
 	{
 		cairo_dock_start_application_manager (pDock);  // va inserer le separateur si necessaire.
 	}

=== modified file 'src/gldit/cairo-dock-container.c'
--- src/gldit/cairo-dock-container.c	2010-09-18 12:19:06 +0000
+++ src/gldit/cairo-dock-container.c	2010-10-06 16:46:42 +0000
@@ -41,6 +41,7 @@
 #include "cairo-dock-notifications.h"
 #include "cairo-dock-animations.h"
 #include "cairo-dock-callbacks.h"
+#include "cairo-dock-X-manager.h"
 #include "cairo-dock-container.h"
 
 static gboolean s_bSticky = TRUE;
@@ -49,6 +50,7 @@
 CairoContainer *g_pPrimaryContainer = NULL;
 extern gboolean g_bUseOpenGL;
 extern CairoDockHidingEffect *g_pHidingBackend;  // cairo_dock_is_hidden
+extern CairoDockDesktopGeometry g_desktopGeometry;
 
 
 static gboolean _cairo_dock_on_delete (GtkWidget *pWidget, GdkEvent *event, gpointer data)
@@ -109,7 +111,7 @@
 	}
 	if (g_pPrimaryContainer == pContainer)
 		g_pPrimaryContainer = NULL;
-	else if (g_pPrimaryContainer != NULL)
+	else if (g_bUseOpenGL && g_pPrimaryContainer != NULL)
 		cairo_dock_set_default_gl_context ();
 }
 
@@ -434,15 +436,15 @@
 	{
 		*x = x0;
 		if (pContainer->bDirectionUp)
-			*y = y0 - h;  /// - h_menu ?...
+			*y = y0 - h;
 		else
 			*y = y0 + pIcon->fHeight * pIcon->fScale;
 	}
 	else
 	{
-		*y = x0;
+		*y = MIN (x0, g_desktopGeometry.iXScreenHeight[CAIRO_DOCK_HORIZONTAL] - h);
 		if (pContainer->bDirectionUp)
-			*x = y0 - w;  /// - w_menu ?...
+			*x = y0 - w;
 		else
 			*x = y0 + pIcon->fHeight * pIcon->fScale;
 	}

=== modified file 'src/gldit/cairo-dock-dialog-manager.c'
--- src/gldit/cairo-dock-dialog-manager.c	2010-09-18 12:19:06 +0000
+++ src/gldit/cairo-dock-dialog-manager.c	2010-10-06 16:46:42 +0000
@@ -928,10 +928,12 @@
 	cd_message ("%s (%d)", __func__, iClickedButton);
 	int *iAnswerBuffer = data[0];
 	GMainLoop *pBlockingLoop = data[1];
-	GtkWidget *pWidgetCatcher = data[2];
+	/**GtkWidget *pWidgetCatcher = data[2];
 	if (pInteractiveWidget != NULL)
-		gtk_widget_reparent (pInteractiveWidget, pWidgetCatcher);  // j'ai rien trouve de mieux pour empecher que le 'pInteractiveWidget' ne soit pas detruit avec le dialogue apres l'appel de la callback (g_object_ref ne marche pas).
-
+		gtk_widget_reparent (pInteractiveWidget, pWidgetCatcher);  // j'ai rien trouve de mieux pour empecher que le 'pInteractiveWidget' ne soit pas detruit avec le dialogue apres l'appel de la callback (g_object_ref ne marche pas).*/
+	
+	cairo_dock_steal_interactive_widget_from_dialog (pDialog);  // le dialogue disparaitra apres cette fonction, mais le widget interactif doit rester.
+	
 	*iAnswerBuffer = iClickedButton;
 
 	if (g_main_loop_is_running (pBlockingLoop))
@@ -940,19 +942,19 @@
 static gboolean _cairo_dock_dialog_destroyed (GtkWidget *pWidget, GdkEvent *event, GMainLoop *pBlockingLoop)
 {
 	cd_debug ("dialogue detruit, on sort de la boucle\n");
-	gtk_window_set_modal (GTK_WINDOW (pWidget), FALSE);
+	gtk_window_set_modal (GTK_WINDOW (pWidget), FALSE);  /// utile ?...
 	if (g_main_loop_is_running (pBlockingLoop))
 		g_main_loop_quit (pBlockingLoop);
 	return FALSE;
 }
 int cairo_dock_show_dialog_and_wait (const gchar *cText, Icon *pIcon, CairoContainer *pContainer, double fTimeLength, const gchar *cIconPath, GtkWidget *pInteractiveWidget)
 {
-	static GtkWidget *pWidgetCatcher = NULL;  // voir l'astuce plus haut.
+	///static GtkWidget *pWidgetCatcher = NULL;  // voir l'astuce plus haut.
 	int iClickedButton = -3;
 	GMainLoop *pBlockingLoop = g_main_loop_new (NULL, FALSE);
-	if (pWidgetCatcher == NULL)
-		pWidgetCatcher = gtk_hbox_new (0, FALSE);
-	gpointer data[3] = {&iClickedButton, pBlockingLoop, pWidgetCatcher};  // inutile d'allouer 'data' puisqu'on va bloquer.
+	/**if (pWidgetCatcher == NULL)
+		pWidgetCatcher = gtk_hbox_new (0, FALSE);*/
+	gpointer data[2/**3*/] = {&iClickedButton, pBlockingLoop/**, pWidgetCatcher*/};  // inutile d'allouer 'data' puisqu'on va bloquer.
 
 	CairoDialog *pDialog = cairo_dock_show_dialog_full (cText,
 		pIcon,
@@ -989,11 +991,7 @@
 			cd_message ("on force a quitter");
 			CairoDock *pDock = CAIRO_DOCK (pContainer);
 			pDock->container.bInside = TRUE;
-			///pDock->bAtBottom = FALSE;
 			cairo_dock_emit_leave_signal (CAIRO_CONTAINER (pDock));
-			/*cairo_dock_on_leave_notify (pDock->container.pWidget,
-				NULL,
-				pDock);*/
 		}
 	}
 

=== modified file 'src/gldit/cairo-dock-dock-facility.c'
--- src/gldit/cairo-dock-dock-facility.c	2010-09-16 01:04:13 +0000
+++ src/gldit/cairo-dock-dock-facility.c	2010-10-06 16:46:42 +0000
@@ -309,8 +309,16 @@
 	else if (iWindowPositionY > g_desktopGeometry.iScreenHeight[pDock->container.bIsHorizontal] - iNewHeight + pDock->iMaxIconHeight)
 		iWindowPositionY = g_desktopGeometry.iScreenHeight[pDock->container.bIsHorizontal] - iNewHeight + pDock->iMaxIconHeight;
 	
-	*iNewPositionX = iWindowPositionX + pDock->iScreenOffsetX;
-	*iNewPositionY = iWindowPositionY + pDock->iScreenOffsetY;
+	if (pDock->container.bIsHorizontal)
+	{
+		*iNewPositionX = iWindowPositionX + pDock->iScreenOffsetX;
+		*iNewPositionY = iWindowPositionY + pDock->iScreenOffsetY;
+	}
+	else
+	{
+		*iNewPositionX = iWindowPositionX + pDock->iScreenOffsetY;
+		*iNewPositionY = iWindowPositionY + pDock->iScreenOffsetX;
+	}
 	//g_print ("POSITION : %d+%d ; %d+%d\n", iWindowPositionX, pDock->iScreenOffsetX, iWindowPositionY, pDock->iScreenOffsetY);
 }
 

=== modified file 'src/gldit/cairo-dock-dock-manager.c'
--- src/gldit/cairo-dock-dock-manager.c	2010-09-18 12:19:06 +0000
+++ src/gldit/cairo-dock-dock-manager.c	2010-10-06 16:46:42 +0000
@@ -543,9 +543,13 @@
 }
 
 
+static void _reload_buffer_in_one_dock (const gchar *cDockName, CairoDock *pDock, gpointer data)
+{
+	cairo_dock_reload_buffers_in_dock (pDock, GPOINTER_TO_INT (data), FALSE);
+}
 void cairo_dock_reload_buffers_in_all_docks (gboolean bReloadAppletsToo)
 {
-	g_hash_table_foreach (s_hDocksTable, (GHFunc) cairo_dock_reload_buffers_in_dock, GINT_TO_POINTER (bReloadAppletsToo));
+	g_hash_table_foreach (s_hDocksTable, (GHFunc) _reload_buffer_in_one_dock, GINT_TO_POINTER (bReloadAppletsToo));
 	
 	cairo_dock_draw_subdock_icons ();
 }
@@ -705,7 +709,7 @@
 			g_free (pDock->cBgImagePath);
 			if (cBgImage != NULL)
 			{
-				pDock->cBgImagePath = cairo_dock_generate_file_path (cBgImage);
+				pDock->cBgImagePath = cairo_dock_search_image_s_path (cBgImage);
 				g_free (cBgImage);
 			}
 			else
@@ -751,7 +755,7 @@
 {
 	// on cree le fichier de conf a partir du template.
 	gchar *cConfFilePath = g_strdup_printf ("%s/%s.conf", g_cCurrentThemePath, cDockName);
-	gchar *cCommand = g_strdup_printf ("cp '%s/%s' '%s'", CAIRO_DOCK_SHARE_DATA_DIR, CAIRO_DOCK_MAIN_DOCK_CONF_FILE, cConfFilePath);
+	gchar *cCommand = g_strdup_printf ("cp '%s' '%s'", CAIRO_DOCK_SHARE_DATA_DIR"/"CAIRO_DOCK_MAIN_DOCK_CONF_FILE, cConfFilePath);
 	int r = system (cCommand);
 	g_free (cCommand);
 	
@@ -784,7 +788,8 @@
 {
 	cairo_dock_read_root_dock_config (cDockName, pDock);
 	
-	cairo_dock_load_buffers_in_one_dock (pDock);  // recharge les icones et les applets.
+	///cairo_dock_load_buffers_in_one_dock (pDock);  // recharge les icones et les applets.
+	cairo_dock_reload_buffers_in_dock (pDock, TRUE, TRUE);  // recharge les icones et les applets, recursivement.
 	
 	pDock->backgroundBuffer.iWidth ++;  // pour forcer le chargement du fond.
 	cairo_dock_set_default_renderer (pDock);
@@ -838,14 +843,14 @@
 	{
 		pSubDock->container.bDirectionUp = pDock->container.bDirectionUp;
 		pSubDock->container.bIsHorizontal = pDock->container.bIsHorizontal;
-		pSubDock->iScreenOffsetX = pDock->iScreenOffsetX;
-		pSubDock->iScreenOffsetY = pDock->iScreenOffsetY;
 		if (bReloadBuffersIfNecessary)
 			cairo_dock_reload_reflects_in_dock (pSubDock);
 		cairo_dock_update_dock_size (pSubDock);
 		
 		cairo_dock_synchronize_sub_docks_orientation (pSubDock, bReloadBuffersIfNecessary);
 	}
+	pSubDock->iScreenOffsetX = pDock->iScreenOffsetX;
+	pSubDock->iScreenOffsetY = pDock->iScreenOffsetY;
 }
 
 void cairo_dock_synchronize_sub_docks_orientation (CairoDock *pDock, gboolean bReloadBuffersIfNecessary)
@@ -911,7 +916,7 @@
 
 static void _cairo_dock_stop_quick_hide_one_root_dock (const gchar *cDockName, CairoDock *pDock, gpointer data)
 {
-	if (pDock->iRefCount == 0 && ! pDock->bTemporaryHidden && pDock->bAutoHide)
+	if (pDock->iRefCount == 0 && ! pDock->bTemporaryHidden && pDock->bAutoHide && pDock->iVisibility != CAIRO_DOCK_VISI_AUTO_HIDE)
 	{
 		pDock->bAutoHide = FALSE;
 		
@@ -949,7 +954,7 @@
 
 void cairo_dock_activate_temporary_auto_hide (CairoDock *pDock)
 {
-	if (pDock->iRefCount == 0 && ! pDock->bTemporaryHidden)
+	if (pDock->iRefCount == 0 && ! pDock->bTemporaryHidden && pDock->iVisibility != CAIRO_DOCK_VISI_AUTO_HIDE)
 	{
 		//g_print ("hide\n");
 		pDock->bTemporaryHidden = TRUE;

=== modified file 'src/gldit/cairo-dock-draw-opengl.c'
--- src/gldit/cairo-dock-draw-opengl.c	2010-09-07 00:38:36 +0000
+++ src/gldit/cairo-dock-draw-opengl.c	2010-10-06 16:46:42 +0000
@@ -422,9 +422,9 @@
 			glTranslatef (floor (fY + icon->fHeight * icon->fScale * (1 - icon->fGlideScale/2)), floor (fX), - icon->fHeight * (1+myIcons.fAmplitude));
 		
 		double fOffsetX = 0.;
-		if (icon->fDrawX + icon->fWidth * icon->fScale/2 - icon->iTextWidth/2 < 0)
+		if (icon->fDrawX + icon->fWidth * icon->fScale/2 - icon->iTextWidth/2 < 0)  // l'etiquette deborde a gauche.
 			fOffsetX = icon->iTextWidth/2 - (icon->fDrawX + icon->fWidth * icon->fScale/2);
-		else if (icon->fDrawX + icon->fWidth * icon->fScale/2 + icon->iTextWidth/2 > pDock->container.iWidth)
+		else if (icon->fDrawX + icon->fWidth * icon->fScale/2 + icon->iTextWidth/2 > pDock->container.iWidth)  // l'etiquette deborde a droite.
 			fOffsetX = pDock->container.iWidth - (icon->fDrawX + icon->fWidth * icon->fScale/2 + icon->iTextWidth/2);
 		if (icon->fOrientation != 0 && ! myLabels.bTextAlwaysHorizontal)
 		{
@@ -435,7 +435,13 @@
 		
 		double dx = .5 * (icon->iTextWidth & 1);  // on decale la texture pour la coller sur la grille des coordonnees entieres.
 		double dy = .5 * (icon->iTextHeight & 1);
-		if (! pDock->container.bIsHorizontal && myLabels.bTextAlwaysHorizontal)
+		if (pDock->container.bIsHorizontal)
+		{
+			glTranslatef (floor (fOffsetX) + dx,
+				floor ((pDock->container.bDirectionUp ? 1:-1) * (icon->fHeight * icon->fScale/2 + myLabels.iLabelSize - icon->iTextHeight / 2)) + dy,
+				0.);
+		}
+		else if (myLabels.bTextAlwaysHorizontal)
 		{
 			fOffsetX = MIN (0, icon->fDrawY + icon->fWidth * icon->fScale/2 - icon->iTextWidth/2);
 			double y = (icon->fWidth * icon->fScale + icon->iTextHeight) / 2;
@@ -445,16 +451,10 @@
 				floor (y) + dy,
 				0.);
 		}
-		else if (pDock->container.bIsHorizontal)
-		{
-			glTranslatef (floor (fOffsetX) + dx,
-				floor ((pDock->container.bDirectionUp ? 1:-1) * (icon->fHeight * icon->fScale/2 + myLabels.iLabelSize - icon->iTextHeight / 2)) + dy,
-				0.);
-		}
 		else
 		{
 			glTranslatef (floor ((pDock->container.bDirectionUp ? -.5:.5) * (icon->fHeight * icon->fScale + icon->iTextHeight)) + dx,
-				floor (fOffsetX) + dy,
+				- floor (fOffsetX) + dy,
 				0.);
 			glRotatef (pDock->container.bDirectionUp ? 90 : -90, 0., 0., 1.);
 		}
@@ -664,7 +664,7 @@
 	if (*cImageFile == '/')
 		cImagePath = (gchar *)cImageFile;
 	else
-		cImagePath = cairo_dock_generate_file_path (cImageFile);
+		cImagePath = cairo_dock_search_image_s_path (cImageFile);
 	
 	cairo_t *pCairoContext = cairo_dock_create_drawing_context_generic (g_pPrimaryContainer);
 	cairo_surface_t *pSurface = cairo_dock_create_surface_from_image (cImagePath,

=== modified file 'src/gldit/cairo-dock-draw.c'
--- src/gldit/cairo-dock-draw.c	2010-09-07 00:38:36 +0000
+++ src/gldit/cairo-dock-draw.c	2010-10-06 16:46:42 +0000
@@ -571,39 +571,38 @@
 		else
 			cairo_translate (pCairoContext, floor (icon->fDrawY), floor (icon->fDrawX + icon->fGlideOffset * icon->fWidth * icon->fScale * (icon->fGlideOffset < 0 ? fGlideScale : 1)));
 		
-		double fOffsetX = (/**icon->fWidthFactor * */icon->fWidth * icon->fScale - icon->iTextWidth) / 2;
-		if (fOffsetX < - icon->fDrawX)
+		double fOffsetX = (icon->fWidth * icon->fScale - icon->iTextWidth) / 2;
+		if (fOffsetX < - icon->fDrawX)  // l'etiquette deborde a gauche.
 			fOffsetX = - icon->fDrawX;
-		else if (icon->fDrawX + fOffsetX + icon->iTextWidth > iWidth)
+		else if (icon->fDrawX + fOffsetX + icon->iTextWidth > iWidth)  // l'etiquette deborde a droite.
 			fOffsetX = iWidth - icon->iTextWidth - icon->fDrawX;
 		
 		if (icon->fOrientation != 0 && ! myLabels.bTextAlwaysHorizontal)
 			cairo_rotate (pCairoContext, icon->fOrientation);
 		
-		if (! bIsHorizontal && myLabels.bTextAlwaysHorizontal)
+		if (bIsHorizontal)
+		{
+			cairo_set_source_surface (pCairoContext,
+				icon->pTextBuffer,
+				floor (fOffsetX),
+				floor (bDirectionUp ? -myLabels.iLabelSize : icon->fHeight * icon->fScale));
+		}
+		else if (myLabels.bTextAlwaysHorizontal)
 		{
 			if (fOffsetX < - icon->fDrawY)
 				fOffsetX = - icon->fDrawY;
 			cairo_set_source_surface (pCairoContext,
 				icon->pTextBuffer,
-				/**floor ((pDock->container.bDirectionUp ? -myLabels.iLabelSize : - (pDock->container.bUseReflect ? myIcons.fReflectSize : 0.)) - myLabels.iconTextDescription.iMargin + 1),*/
 				floor (fOffsetX),
 				0.);
 		}
-		else if (bIsHorizontal)
-			cairo_set_source_surface (pCairoContext,
-				icon->pTextBuffer,
-				floor (fOffsetX),
-				floor (bDirectionUp ? -myLabels.iLabelSize : icon->fHeight * icon->fScale/* - icon->fTextYOffset*/));
 		else
 		{
-			cairo_translate (pCairoContext, icon->iTextWidth/2, icon->iTextHeight/2);
 			cairo_rotate (pCairoContext, bDirectionUp ? - G_PI/2 : G_PI/2);
-			cairo_translate (pCairoContext, -icon->iTextWidth/2, -icon->iTextHeight/2);
 			cairo_set_source_surface (pCairoContext,
 				icon->pTextBuffer,
-				floor (bDirectionUp ? -myLabels.iLabelSize : icon->fHeight * icon->fScale/* - icon->fTextYOffset*/),
-				floor (fOffsetX));
+				floor (bDirectionUp ? fOffsetX - icon->fWidth * icon->fScale : fOffsetX),
+				-floor (bDirectionUp ? myLabels.iLabelSize : icon->fHeight * icon->fScale + myLabels.iLabelSize));
 		}
 		double fMagnitude;
 		if (myLabels.bLabelForPointedIconOnly || pDock->fMagnitudeMax == 0.)

=== modified file 'src/gldit/cairo-dock-gui-factory.c'
--- src/gldit/cairo-dock-gui-factory.c	2010-09-16 01:04:13 +0000
+++ src/gldit/cairo-dock-gui-factory.c	2010-10-06 16:46:42 +0000
@@ -2177,7 +2177,7 @@
 					gchar *cShareThemesDir = NULL, *cUserThemesDir = NULL, *cDistantThemesDir = NULL;
 					if (pAuthorizedValuesList[0] != NULL)
 					{
-						cShareThemesDir = (*pAuthorizedValuesList[0] != '\0' ? cairo_dock_generate_file_path (pAuthorizedValuesList[0]) : NULL);  // on autorise les ~/blabla.
+						cShareThemesDir = (*pAuthorizedValuesList[0] != '\0' ? cairo_dock_search_image_s_path (pAuthorizedValuesList[0]) : NULL);  // on autorise les ~/blabla.
 						if (pAuthorizedValuesList[1] != NULL)
 						{
 							cUserThemesDir = g_strdup_printf ("%s/%s", g_cExtrasDirPath, pAuthorizedValuesList[1]);

=== modified file 'src/gldit/cairo-dock-icon-loader.c'
--- src/gldit/cairo-dock-icon-loader.c	2010-08-07 01:28:23 +0000
+++ src/gldit/cairo-dock-icon-loader.c	2010-10-06 16:46:42 +0000
@@ -249,10 +249,9 @@
 	if ((icon->pIconBuffer == pPrevSurface || icon->pIconBuffer == NULL) &&
 		(icon->iIconTexture == iPrevTexture || icon->iIconTexture == 0))
 	{
-		gchar *cIconPath = cairo_dock_generate_file_path (CAIRO_DOCK_DEFAULT_ICON_NAME);
-		if (cIconPath == NULL || ! g_file_test (cIconPath, G_FILE_TEST_EXISTS))
+		gchar *cIconPath = cairo_dock_search_image_s_path (CAIRO_DOCK_DEFAULT_ICON_NAME);
+		if (cIconPath == NULL)  // fichier non trouve.
 		{
-			g_free (cIconPath);
 			cIconPath = g_strdup (CAIRO_DOCK_SHARE_DATA_DIR"/"CAIRO_DOCK_DEFAULT_ICON_NAME);
 		}
 		icon->pIconBuffer = cairo_dock_create_surface_from_image_simple (cIconPath,
@@ -490,10 +489,9 @@
 }
 
 
-void cairo_dock_reload_buffers_in_dock (gchar *cDockName, CairoDock *pDock, gpointer data)
+void cairo_dock_reload_buffers_in_dock (CairoDock *pDock, gboolean bReloadAppletsToo, gboolean bRecursive)
 {
-	gboolean bReloadAppletsToo = GPOINTER_TO_INT (data);
-	cd_message ("%s (%s, %d)", __func__, cDockName, bReloadAppletsToo);
+	cd_message ("%s (%d, %d)", __func__, bReloadAppletsToo, bRecursive);
 
 	double fFlatDockWidth = - myIcons.iIconGap;
 	pDock->iMaxIconHeight = 0;
@@ -514,6 +512,12 @@
 			cairo_dock_trigger_load_icon_buffers (icon, CAIRO_CONTAINER (pDock));  // fait un set_icon_size
 			icon->fWidth *= pDock->container.fRatio;
 			icon->fHeight *= pDock->container.fRatio;
+			
+			if (bRecursive && icon->pSubDock != NULL)
+			{
+				cairo_dock_synchronize_one_sub_dock_orientation (icon->pSubDock, pDock, FALSE);
+				cairo_dock_reload_buffers_in_dock (icon->pSubDock, bReloadAppletsToo, bRecursive);
+			}
 		}
 		
 		//g_print (" =size <- %.2fx%.2f\n", icon->fWidth, icon->fHeight);

=== modified file 'src/gldit/cairo-dock-icon-loader.h'
--- src/gldit/cairo-dock-icon-loader.h	2010-08-07 01:28:23 +0000
+++ src/gldit/cairo-dock-icon-loader.h	2010-10-06 16:46:42 +0000
@@ -80,8 +80,8 @@
 
 void cairo_dock_trigger_load_icon_buffers (Icon *pIcon, CairoContainer *pContainer);
 
-void cairo_dock_reload_buffers_in_dock (gchar *cDockName, CairoDock *pDock, gpointer data);
-#define cairo_dock_load_buffers_in_one_dock(pDock) cairo_dock_reload_buffers_in_dock (NULL, pDock, GINT_TO_POINTER (TRUE))
+void cairo_dock_reload_buffers_in_dock (CairoDock *pDock, gboolean bReloadAppletsToo, gboolean bRecursive);
+#define cairo_dock_load_buffers_in_one_dock(pDock) cairo_dock_reload_buffers_in_dock (pDock, TRUE, FALSE)
 
 void cairo_dock_reload_icon_image (Icon *icon, CairoContainer *pContainer);
 

=== modified file 'src/gldit/cairo-dock-internal-background.c'
--- src/gldit/cairo-dock-internal-background.c	2010-09-07 00:38:36 +0000
+++ src/gldit/cairo-dock-internal-background.c	2010-10-06 16:46:42 +0000
@@ -53,14 +53,14 @@
 	
 	gchar *cBgImage = cairo_dock_get_string_key_value (pKeyFile, "Background", "background image", &bFlushConfFileNeeded, NULL, NULL, NULL);
 	int iFillBg = cairo_dock_get_integer_key_value (pKeyFile, "Background", "fill bg", &bFlushConfFileNeeded, -1, NULL, NULL);  // -1 pour intercepter le cas ou la cle n'existe pas.
-	if (iFillBg == -1)
+	if (iFillBg == -1)  // nouvelle cle
 	{
-		iFillBg = (cBgImage != NULL ? 0 : 1);
+		iFillBg = (cBgImage != NULL ? 0 : 1);  // si une image etait definie auparavant, on dit qu'on veut le mode "image"
 		g_key_file_set_integer (pKeyFile, "Background", "fill bg", iFillBg);
 	}
 	else
 	{
-		if (iFillBg != 0)
+		if (iFillBg != 0)  // remplissage avec un degrade => on ne veut pas d'image
 		{
 			g_free (cBgImage);
 			cBgImage = NULL;
@@ -68,8 +68,11 @@
 	}
 	
 	// image de fond.
-	pBackground->cBackgroundImageFile = cairo_dock_generate_file_path (cBgImage);
-	g_free (cBgImage);
+	if (cBgImage != NULL)
+	{
+		pBackground->cBackgroundImageFile = cairo_dock_search_image_s_path (cBgImage);
+		g_free (cBgImage);
+	}
 	
 	pBackground->fBackgroundImageAlpha = cairo_dock_get_double_key_value (pKeyFile, "Background", "image alpha", &bFlushConfFileNeeded, 0.5, NULL, NULL);
 

=== modified file 'src/gldit/cairo-dock-internal-dialogs.c'
--- src/gldit/cairo-dock-internal-dialogs.c	2010-08-07 01:28:23 +0000
+++ src/gldit/cairo-dock-internal-dialogs.c	2010-10-06 16:46:42 +0000
@@ -57,6 +57,7 @@
 		pDialogs->dialogTextDescription.iSize *= 1.33;  // c'est pas beau, mais ca evite de casser tous les themes.
 	pDialogs->dialogTextDescription.iWeight = pango_font_description_get_weight (fd);
 	pDialogs->dialogTextDescription.iStyle = pango_font_description_get_style (fd);
+	pDialogs->dialogTextDescription.fMaxRelativeWidth = .5;  // on limite a la moitie de l'ecran.
 	
 	if (g_key_file_has_key (pKeyFile, "Dialogs", "message size", NULL))  // anciens parametres.
 	{

=== modified file 'src/gldit/cairo-dock-internal-icons.c'
--- src/gldit/cairo-dock-internal-icons.c	2010-08-07 01:28:23 +0000
+++ src/gldit/cairo-dock-internal-icons.c	2010-10-06 16:46:42 +0000
@@ -208,7 +208,7 @@
 	gchar *cLauncherBackgroundImageName = cairo_dock_get_string_key_value (pKeyFile, "Icons", "icons bg", &bFlushConfFileNeeded, NULL, NULL, NULL);
 	if (cLauncherBackgroundImageName != NULL)
 	{
-		pIcons->cBackgroundImagePath = cairo_dock_generate_file_path (cLauncherBackgroundImageName);
+		pIcons->cBackgroundImagePath = cairo_dock_search_image_s_path (cLauncherBackgroundImageName);
 		g_free (cLauncherBackgroundImageName);
 	}
 		

=== modified file 'src/gldit/cairo-dock-internal-indicators.c'
--- src/gldit/cairo-dock-internal-indicators.c	2010-08-07 01:28:23 +0000
+++ src/gldit/cairo-dock-internal-indicators.c	2010-10-06 16:46:42 +0000
@@ -41,7 +41,7 @@
 	cIndicatorImageName = cairo_dock_get_string_key_value (pKeyFile, "Indicators", "indicator image", &bFlushConfFileNeeded, NULL, "Icons", NULL);
 	if (cIndicatorImageName != NULL)
 	{
-		pIndicators->cIndicatorImagePath = cairo_dock_generate_file_path (cIndicatorImageName);
+		pIndicators->cIndicatorImagePath = cairo_dock_search_image_s_path (cIndicatorImageName);
 		g_free (cIndicatorImageName);
 	}
 	else
@@ -112,7 +112,7 @@
 	
 	if (cIndicatorImageName != NULL)
 	{
-		pIndicators->cActiveIndicatorImagePath = cairo_dock_generate_file_path (cIndicatorImageName);
+		pIndicators->cActiveIndicatorImagePath = cairo_dock_search_image_s_path (cIndicatorImageName);
 		g_free (cIndicatorImageName);
 	}
 	else
@@ -124,7 +124,7 @@
 		cairo_dock_get_double_list_key_value (pKeyFile, "Indicators", "active color", &bFlushConfFileNeeded, pIndicators->fActiveColor, 4, couleur_active, "Icons", NULL);
 		pIndicators->iActiveLineWidth = cairo_dock_get_integer_key_value (pKeyFile, "Indicators", "active line width", &bFlushConfFileNeeded, 3, "Icons", NULL);
 		pIndicators->iActiveCornerRadius = cairo_dock_get_integer_key_value (pKeyFile, "Indicators", "active corner radius", &bFlushConfFileNeeded, 6, "Icons", NULL);
-	}
+	}  // donc ici si on choisit le mode "image" sans en definir une, le alpha de la couleur reste a 0 => aucun indicateur
 	
 	pIndicators->bActiveIndicatorAbove = cairo_dock_get_boolean_key_value (pKeyFile, "Indicators", "active frame position", &bFlushConfFileNeeded, TRUE, "Icons", NULL);
 	
@@ -135,7 +135,7 @@
 		cIndicatorImageName = cairo_dock_get_string_key_value (pKeyFile, "Indicators", "class indicator", &bFlushConfFileNeeded, NULL, NULL, NULL);
 		if (cIndicatorImageName != NULL)
 		{
-			pIndicators->cClassIndicatorImagePath = cairo_dock_generate_file_path (cIndicatorImageName);
+			pIndicators->cClassIndicatorImagePath = cairo_dock_search_image_s_path (cIndicatorImageName);
 			g_free (cIndicatorImageName);
 		}
 		else

=== modified file 'src/gldit/cairo-dock-internal-taskbar.c'
--- src/gldit/cairo-dock-internal-taskbar.c	2010-08-07 01:28:23 +0000
+++ src/gldit/cairo-dock-internal-taskbar.c	2010-10-06 16:46:42 +0000
@@ -45,70 +45,72 @@
 	// comportement
 	pTaskBar->bShowAppli = cairo_dock_get_boolean_key_value (pKeyFile, "TaskBar", "show applications", &bFlushConfFileNeeded, TRUE, "Applications", NULL);
 	
-	pTaskBar->bAppliOnCurrentDesktopOnly = cairo_dock_get_boolean_key_value (pKeyFile, "TaskBar", "current desktop only", &bFlushConfFileNeeded, FALSE, "Applications", NULL);
-	
-	pTaskBar->bMixLauncherAppli = cairo_dock_get_boolean_key_value (pKeyFile, "TaskBar", "mix launcher appli", &bFlushConfFileNeeded, TRUE, NULL, NULL);
-	
-	pTaskBar->bGroupAppliByClass = cairo_dock_get_boolean_key_value (pKeyFile, "TaskBar", "group by class", &bFlushConfFileNeeded, TRUE, "Applications", NULL);
-	pTaskBar->cGroupException = cairo_dock_get_string_key_value (pKeyFile, "TaskBar", "group exception", &bFlushConfFileNeeded, "pidgin;xchat", NULL, NULL);
-	if (pTaskBar->cGroupException)
-	{
-		int i;
-		for (i = 0; pTaskBar->cGroupException[i] != '\0'; i ++)  // on passe tout en minuscule.
-			pTaskBar->cGroupException[i] = g_ascii_tolower (pTaskBar->cGroupException[i]);
-	}
-	
-	pTaskBar->bHideVisibleApplis = cairo_dock_get_boolean_key_value (pKeyFile, "TaskBar", "hide visible", &bFlushConfFileNeeded, FALSE, "Applications", NULL);
-	
-	
-	// representation
-	pTaskBar->bOverWriteXIcons = cairo_dock_get_boolean_key_value (pKeyFile, "TaskBar", "overwrite xicon", &bFlushConfFileNeeded, TRUE, NULL, NULL);
-	pTaskBar->cOverwriteException = cairo_dock_get_string_key_value (pKeyFile, "TaskBar", "overwrite exception", &bFlushConfFileNeeded, "pidgin;xchat", NULL, NULL);
-	if (pTaskBar->cOverwriteException)
-	{
-		int i;
-		for (i = 0; pTaskBar->cOverwriteException[i] != '\0'; i ++)
-			pTaskBar->cOverwriteException[i] = g_ascii_tolower (pTaskBar->cOverwriteException[i]);
-	}
-	
-	pTaskBar->iMinimizedWindowRenderType = cairo_dock_get_integer_key_value (pKeyFile, "TaskBar", "minimized", &bFlushConfFileNeeded, -1, NULL, NULL);
-	if (pTaskBar->iMinimizedWindowRenderType == -1)  // anciens parametres.
-	{
-		gboolean bShowThumbnail = g_key_file_get_boolean (pKeyFile, "TaskBar", "window thumbnail", NULL);
-		if (bShowThumbnail)
-			pTaskBar->iMinimizedWindowRenderType = 1;
-		else
+	if (pTaskBar->bShowAppli)
+	{
+		pTaskBar->bAppliOnCurrentDesktopOnly = cairo_dock_get_boolean_key_value (pKeyFile, "TaskBar", "current desktop only", &bFlushConfFileNeeded, FALSE, "Applications", NULL);
+		
+		pTaskBar->bMixLauncherAppli = cairo_dock_get_boolean_key_value (pKeyFile, "TaskBar", "mix launcher appli", &bFlushConfFileNeeded, TRUE, NULL, NULL);
+		
+		pTaskBar->bGroupAppliByClass = cairo_dock_get_boolean_key_value (pKeyFile, "TaskBar", "group by class", &bFlushConfFileNeeded, TRUE, "Applications", NULL);
+		pTaskBar->cGroupException = cairo_dock_get_string_key_value (pKeyFile, "TaskBar", "group exception", &bFlushConfFileNeeded, "pidgin;xchat", NULL, NULL);
+		if (pTaskBar->cGroupException)
+		{
+			int i;
+			for (i = 0; pTaskBar->cGroupException[i] != '\0'; i ++)  // on passe tout en minuscule.
+				pTaskBar->cGroupException[i] = g_ascii_tolower (pTaskBar->cGroupException[i]);
+		}
+		
+		pTaskBar->bHideVisibleApplis = cairo_dock_get_boolean_key_value (pKeyFile, "TaskBar", "hide visible", &bFlushConfFileNeeded, FALSE, "Applications", NULL);
+		
+		
+		// representation
+		pTaskBar->bOverWriteXIcons = cairo_dock_get_boolean_key_value (pKeyFile, "TaskBar", "overwrite xicon", &bFlushConfFileNeeded, TRUE, NULL, NULL);
+		pTaskBar->cOverwriteException = cairo_dock_get_string_key_value (pKeyFile, "TaskBar", "overwrite exception", &bFlushConfFileNeeded, "pidgin;xchat", NULL, NULL);
+		if (pTaskBar->cOverwriteException)
+		{
+			int i;
+			for (i = 0; pTaskBar->cOverwriteException[i] != '\0'; i ++)
+				pTaskBar->cOverwriteException[i] = g_ascii_tolower (pTaskBar->cOverwriteException[i]);
+		}
+		
+		pTaskBar->iMinimizedWindowRenderType = cairo_dock_get_integer_key_value (pKeyFile, "TaskBar", "minimized", &bFlushConfFileNeeded, -1, NULL, NULL);
+		if (pTaskBar->iMinimizedWindowRenderType == -1)  // anciens parametres.
+		{
+			gboolean bShowThumbnail = g_key_file_get_boolean (pKeyFile, "TaskBar", "window thumbnail", NULL);
+			if (bShowThumbnail)
+				pTaskBar->iMinimizedWindowRenderType = 1;
+			else
+				pTaskBar->iMinimizedWindowRenderType = 0;
+			g_key_file_set_integer (pKeyFile, "TaskBar", "minimized", pTaskBar->iMinimizedWindowRenderType);
+		}
+		
+		if (pTaskBar->iMinimizedWindowRenderType == 1 && ! cairo_dock_xcomposite_is_available ())
+		{
+			cd_warning ("Sorry but either your X server does not have the XComposite extension, or your version of Cairo-Dock was not built with the support of XComposite.\n You can't have window thumbnails in the dock");
 			pTaskBar->iMinimizedWindowRenderType = 0;
-		g_key_file_set_integer (pKeyFile, "TaskBar", "minimized", pTaskBar->iMinimizedWindowRenderType);
-	}
-	
-	if (pTaskBar->iMinimizedWindowRenderType == 1 && ! cairo_dock_xcomposite_is_available ())
-	{
-		cd_warning ("Sorry but either your X server does not have the XComposite extension, or your version of Cairo-Dock was not built with the support of XComposite.\n You can't have window thumbnails in the dock");
-		pTaskBar->iMinimizedWindowRenderType = 0;
-	}
-	if (pTaskBar->iMinimizedWindowRenderType == 0)
-		pTaskBar->fVisibleAppliAlpha = MIN (.6, cairo_dock_get_double_key_value (pKeyFile, "TaskBar", "visibility alpha", &bFlushConfFileNeeded, .35, "Applications", NULL));
-	
-	pTaskBar->iAppliMaxNameLength = cairo_dock_get_integer_key_value (pKeyFile, "TaskBar", "max name length", &bFlushConfFileNeeded, 15, "Applications", NULL);
-	
-	
-	// interaction
-	pTaskBar->bMinimizeOnClick = cairo_dock_get_boolean_key_value (pKeyFile, "TaskBar", "minimize on click", &bFlushConfFileNeeded, TRUE, "Applications", NULL);
-	pTaskBar->bCloseAppliOnMiddleClick = cairo_dock_get_boolean_key_value (pKeyFile, "TaskBar", "close on middle click", &bFlushConfFileNeeded, TRUE, "Applications", NULL);
-	
-	pTaskBar->bDemandsAttentionWithDialog = cairo_dock_get_boolean_key_value (pKeyFile, "TaskBar", "demands attention with dialog", &bFlushConfFileNeeded, TRUE, "Applications", NULL);
-	pTaskBar->iDialogDuration = cairo_dock_get_integer_key_value (pKeyFile, "TaskBar", "duration", &bFlushConfFileNeeded, 2, NULL, NULL);
-	pTaskBar->cAnimationOnDemandsAttention = cairo_dock_get_string_key_value (pKeyFile, "TaskBar", "animation on demands attention", &bFlushConfFileNeeded, "fire", NULL, NULL);
-	gchar *cForceDemandsAttention = cairo_dock_get_string_key_value (pKeyFile, "TaskBar", "force demands attention", &bFlushConfFileNeeded, "pidgin;xchat", NULL, NULL);
-	if (cForceDemandsAttention != NULL)
-	{
-		pTaskBar->cForceDemandsAttention = g_ascii_strdown (cForceDemandsAttention, -1);
-		g_free (cForceDemandsAttention);
-	}
-	
-	pTaskBar->cAnimationOnActiveWindow = cairo_dock_get_string_key_value (pKeyFile, "TaskBar", "animation on active window", &bFlushConfFileNeeded, "wobbly", NULL, NULL);
-	
+		}
+		if (pTaskBar->iMinimizedWindowRenderType == 0)
+			pTaskBar->fVisibleAppliAlpha = MIN (.6, cairo_dock_get_double_key_value (pKeyFile, "TaskBar", "visibility alpha", &bFlushConfFileNeeded, .35, "Applications", NULL));
+		
+		pTaskBar->iAppliMaxNameLength = cairo_dock_get_integer_key_value (pKeyFile, "TaskBar", "max name length", &bFlushConfFileNeeded, 15, "Applications", NULL);
+		
+		
+		// interaction
+		pTaskBar->bMinimizeOnClick = cairo_dock_get_boolean_key_value (pKeyFile, "TaskBar", "minimize on click", &bFlushConfFileNeeded, TRUE, "Applications", NULL);
+		pTaskBar->bCloseAppliOnMiddleClick = cairo_dock_get_boolean_key_value (pKeyFile, "TaskBar", "close on middle click", &bFlushConfFileNeeded, TRUE, "Applications", NULL);
+		
+		pTaskBar->bDemandsAttentionWithDialog = cairo_dock_get_boolean_key_value (pKeyFile, "TaskBar", "demands attention with dialog", &bFlushConfFileNeeded, TRUE, "Applications", NULL);
+		pTaskBar->iDialogDuration = cairo_dock_get_integer_key_value (pKeyFile, "TaskBar", "duration", &bFlushConfFileNeeded, 2, NULL, NULL);
+		pTaskBar->cAnimationOnDemandsAttention = cairo_dock_get_string_key_value (pKeyFile, "TaskBar", "animation on demands attention", &bFlushConfFileNeeded, "fire", NULL, NULL);
+		gchar *cForceDemandsAttention = cairo_dock_get_string_key_value (pKeyFile, "TaskBar", "force demands attention", &bFlushConfFileNeeded, "pidgin;xchat", NULL, NULL);
+		if (cForceDemandsAttention != NULL)
+		{
+			pTaskBar->cForceDemandsAttention = g_ascii_strdown (cForceDemandsAttention, -1);
+			g_free (cForceDemandsAttention);
+		}
+		
+		pTaskBar->cAnimationOnActiveWindow = cairo_dock_get_string_key_value (pKeyFile, "TaskBar", "animation on active window", &bFlushConfFileNeeded, "wobbly", NULL, NULL);
+	}
 	return bFlushConfFileNeeded;
 }
 
@@ -137,13 +139,13 @@
 		pPrevTaskBar->iAppliMaxNameLength != pTaskBar->iAppliMaxNameLength ||
 		cairo_dock_strings_differ (pPrevTaskBar->cGroupException, pTaskBar->cGroupException) ||
 		cairo_dock_strings_differ (pPrevTaskBar->cOverwriteException, pTaskBar->cOverwriteException) ||
-		(cairo_dock_application_manager_is_running () && ! pTaskBar->bShowAppli))  // on ne veut plus voir les applis, il faut donc les enlever.
+		pPrevTaskBar->bShowAppli != pTaskBar->bShowAppli)
 	{
 		cairo_dock_stop_application_manager ();
 		bUpdateSize = TRUE;
 	}
 	
-	if (! cairo_dock_application_manager_is_running () && pTaskBar->bShowAppli)  // maintenant on veut voir les applis !
+	if (! cairo_dock_application_manager_is_running ())  // maintenant on veut voir les applis !
 	{
 		cairo_dock_start_application_manager (pDock);  // va inserer le separateur si necessaire.
 		bUpdateSize = TRUE;

=== modified file 'src/gldit/cairo-dock-load.c'
--- src/gldit/cairo-dock-load.c	2010-09-07 00:38:36 +0000
+++ src/gldit/cairo-dock-load.c	2010-10-06 16:46:42 +0000
@@ -69,6 +69,8 @@
 extern CairoDockDesktopBackground *g_pFakeTransparencyDesktopBg;
 
 extern gchar *g_cCurrentThemePath;
+extern gchar *g_cCurrentIconsPath;
+extern gchar *g_cCurrentImagesPath;
 
 extern GLuint g_pGradationTexture[2];
 
@@ -99,21 +101,44 @@
 	return pTextDescription;
 }
 
-gchar *cairo_dock_generate_file_path (const gchar *cImageFile)
+gchar *cairo_dock_search_image_s_path (const gchar *cImageFile)
 {
 	g_return_val_if_fail (cImageFile != NULL, NULL);
 	gchar *cImagePath;
 	if (*cImageFile == '~')
 	{
 		cImagePath = g_strdup_printf ("%s%s", getenv("HOME"), cImageFile + 1);
+		if (!g_file_test (cImagePath, G_FILE_TEST_EXISTS))
+		{
+			g_free (cImagePath);
+			cImagePath = NULL;
+		}
 	}
 	else if (*cImageFile == '/')
 	{
-		cImagePath = g_strdup (cImageFile);
+		if (!g_file_test (cImageFile, G_FILE_TEST_EXISTS))
+			cImagePath = NULL;
+		else
+			cImagePath = g_strdup (cImageFile);
 	}
 	else
 	{
-		cImagePath = g_strdup_printf ("%s/%s", g_cCurrentThemePath, cImageFile);
+		cImagePath = g_strdup_printf ("%s/%s", g_cCurrentImagesPath, cImageFile);
+		if (!g_file_test (cImagePath, G_FILE_TEST_EXISTS))
+		{
+			g_free (cImagePath);
+			cImagePath = g_strdup_printf ("%s/%s", g_cCurrentThemePath, cImageFile);
+			if (!g_file_test (cImagePath, G_FILE_TEST_EXISTS))
+			{
+				g_free (cImagePath);
+				cImagePath = g_strdup_printf ("%s/%s", g_cCurrentIconsPath, cImageFile);
+				if (!g_file_test (cImagePath, G_FILE_TEST_EXISTS))
+				{
+					g_free (cImagePath);
+					cImagePath = NULL;
+				}
+			}
+		}
 	}
 	return cImagePath;
 }
@@ -123,7 +148,7 @@
 {
 	if (cImageFile == NULL)
 		return;
-	gchar *cImagePath = cairo_dock_generate_file_path (cImageFile);
+	gchar *cImagePath = cairo_dock_search_image_s_path (cImageFile);
 	double w, h;
 	pImage->pSurface = cairo_dock_create_surface_from_image (
 		cImagePath,

=== modified file 'src/gldit/cairo-dock-load.h'
--- src/gldit/cairo-dock-load.h	2010-08-07 01:28:23 +0000
+++ src/gldit/cairo-dock-load.h	2010-10-06 16:46:42 +0000
@@ -31,7 +31,7 @@
 /**
 *@file cairo-dock-load.h This class defines a simple image loader interface.
 * It also handles the main image buffers of the dock.
-* Use \ref cairo_dock_create_image_buffer to create an immage buffer from a file, or \ref cairo_dock_load_image_buffer to load an image into an existing immage buffer.
+* Use \ref cairo_dock_create_image_buffer to create an image buffer from a file, or \ref cairo_dock_load_image_buffer to load an image into an existing immage buffer.
 * Use \ref cairo_dock_free_image_buffer to destroy it or \ref cairo_dock_unload_image_buffer to unload and reset it to 0.
 * If you just want to load an image into a mere cairo_surface, use the functions of the surface-factory.
 */
@@ -72,8 +72,8 @@
 *@param cImageFile a file name or path. If it's already a path, it will just be duplicated.
 *@return the path of the file.
 */
-gchar *cairo_dock_generate_file_path (const gchar *cImageFile);
-
+gchar *cairo_dock_search_image_s_path (const gchar *cImageFile);
+#define cairo_dock_generate_file_path cairo_dock_search_image_s_path
 
 /** Load an image into an ImageBuffer with a given transparency. If the image is given by its sole name, it is taken in the root folder of the current theme.
 *@param pImage an ImageBuffer.

=== modified file 'src/gldit/cairo-dock-log.c'
--- src/gldit/cairo-dock-log.c	2010-08-07 01:28:23 +0000
+++ src/gldit/cairo-dock-log.c	2010-10-06 16:46:42 +0000
@@ -30,7 +30,7 @@
 #include "cairo-dock-log.h"
 
 static char s_iLogColor = '0';
-static GLogLevelFlags s_gLogLevel = 0;
+static GLogLevelFlags s_gLogLevel = G_LOG_LEVEL_WARNING;
 
 /* #    'default'     => "\033[1m", */
 

=== modified file 'src/gldit/cairo-dock-modules.c'
--- src/gldit/cairo-dock-modules.c	2010-09-07 00:38:36 +0000
+++ src/gldit/cairo-dock-modules.c	2010-10-06 16:46:42 +0000
@@ -644,14 +644,17 @@
 		{
 			cd_warning ("icon's buffer is NULL, applet won't be able to draw to it !");
 			pInstance->pDrawContext = NULL;
+			bCanInit = FALSE;
 		}
 		else
+		{
 			pInstance->pDrawContext = cairo_create (pIcon->pIconBuffer);
-		if (cairo_status (pInstance->pDrawContext) != CAIRO_STATUS_SUCCESS)
-		{
-			cd_warning ("couldn't initialize drawing context, applet won't be able to draw itself !");
-			pInstance->pDrawContext = NULL;
-			bCanInit = FALSE;
+			if (!pInstance->pDrawContext || cairo_status (pInstance->pDrawContext) != CAIRO_STATUS_SUCCESS)
+			{
+				cd_warning ("couldn't initialize drawing context, applet won't be able to draw itself !");
+				pInstance->pDrawContext = NULL;
+				bCanInit = FALSE;
+			}
 		}
 	}
 	
@@ -878,7 +881,7 @@
 	if (pIcon && pIcon->pIconBuffer)  // applet, on lui associe un contexte de dessin avant le reload.
 	{
 		pInstance->pDrawContext = cairo_create (pIcon->pIconBuffer);
-		if (cairo_status (pInstance->pDrawContext) != CAIRO_STATUS_SUCCESS)
+		if (!pInstance->pDrawContext || cairo_status (pInstance->pDrawContext) != CAIRO_STATUS_SUCCESS)
 		{
 			cd_warning ("couldn't initialize drawing context, applet won't be reloaded !");
 			bCanReload = FALSE;
@@ -1385,6 +1388,7 @@
 #define REGISTER_INTERNAL_MODULE(cGroupName) \
 	pModule = g_new0 (CairoDockInternalModule, 1);\
 	cairo_dock_pre_init_##cGroupName (pModule);\
+	memset (pModule->pConfig, 0, pModule->iSizeOfConfig);\
 	g_hash_table_insert (pModuleTable, (gpointer)pModule->cModuleName, pModule)
 void cairo_dock_preload_internal_modules (GHashTable *pModuleTable)
 {

=== modified file 'src/gldit/cairo-dock-separator-manager.c'
--- src/gldit/cairo-dock-separator-manager.c	2010-08-07 01:28:23 +0000
+++ src/gldit/cairo-dock-separator-manager.c	2010-10-06 16:46:42 +0000
@@ -51,7 +51,7 @@
 	}
 	else
 	{
-		gchar *cImagePath = cairo_dock_generate_file_path (myIcons.cSeparatorImage);
+		gchar *cImagePath = cairo_dock_search_image_s_path (myIcons.cSeparatorImage);
 		
 		pNewSurface = cairo_dock_create_surface_from_image_simple (cImagePath,
 			iWidth,

=== modified file 'src/gldit/cairo-dock-surface-factory.c'
--- src/gldit/cairo-dock-surface-factory.c	2010-08-07 01:28:23 +0000
+++ src/gldit/cairo-dock-surface-factory.c	2010-10-06 16:46:42 +0000
@@ -28,10 +28,12 @@
 #include "cairo-dock-launcher-manager.h"
 #include "cairo-dock-container.h"
 #include "cairo-dock-load.h"
+#include "cairo-dock-X-manager.h"
 #include "cairo-dock-surface-factory.h"
 
 extern CairoContainer *g_pPrimaryContainer;
 extern gboolean g_bUseOpenGL;
+extern CairoDockDesktopGeometry g_desktopGeometry;
 
 static cairo_t *s_pSourceContext = NULL;
 
@@ -548,7 +550,7 @@
 	if (*cImageFile == '/')
 		cImagePath = (gchar *)cImageFile;
 	else
-		cImagePath = cairo_dock_generate_file_path (cImageFile);
+		cImagePath = cairo_dock_search_image_s_path (cImageFile);
 		
 	cairo_surface_t *pSurface = cairo_dock_create_surface_from_image (cImagePath,
 		1.,
@@ -594,7 +596,7 @@
 
 	if (cImageFile != NULL)
 	{
-		gchar *cImagePath = cairo_dock_generate_file_path (cImageFile);
+		gchar *cImagePath = cairo_dock_search_image_s_path (cImageFile);
 		double fImageWidth, fImageHeight;
 		cairo_surface_t *pPatternSurface = cairo_dock_create_surface_from_image (cImagePath,
 			1.,
@@ -785,6 +787,79 @@
 }
 
 
+void cairo_dock_limit_string_width (gchar *cLine, PangoLayout *pLayout, gboolean bUseMarkup, int iMaxWidth)
+{
+	// on insere des retours chariot pour tenir dans la largeur donnee.
+	PangoRectangle ink, log;
+	gchar *sp, *last_sp=NULL;
+	double w;
+	int iNbLines = 0;
+	
+	gchar *str = cLine;
+	while (*str == ' ')  // on saute les espaces en debut de ligne.
+		str ++;
+	
+	sp = str;
+	do
+	{
+		sp = strchr (sp+1, ' ');  // on trouve l'espace suivant.
+		if (!sp)  // plus d'espace, on quitte.
+			break ;
+		
+		*sp = '\0';  // on coupe a cet espace.
+		if (bUseMarkup)  // on regarde la taille de str a sp.
+			pango_layout_set_markup (pLayout, str, -1);
+		else
+			pango_layout_set_text (pLayout, str, -1);
+		pango_layout_get_pixel_extents (pLayout, &ink, &log);
+		//g_print ("%s => w:%d/%d, x:%d/%d\n", str, log.width, ink.width, log.x, ink.x);
+		w = log.width + log.x;
+		
+		if (w > iMaxWidth)  // on deborde.
+		{
+			if (last_sp != NULL)  // on coupe au dernier espace connu.
+			{
+				*sp = ' ';  // on remet l'espace.
+				*last_sp = '\n';  // on coupe.
+				iNbLines ++;
+				str = last_sp + 1;  // on place le debut de ligne apres la coupure.
+			}
+			else  // aucun espace, c'est un mot entier.
+			{
+				*sp = '\n';  // on coupe apres le mot.
+				iNbLines ++;
+				str = sp + 1;  // on place le debut de ligne apres la coupure.
+			}
+			
+			while (*str == ' ')  // on saute les espaces en debut de ligne.
+				str ++;
+			sp = str;
+			last_sp = NULL;
+		}
+		else  // ca rentre.
+		{
+			*sp = ' ';  // on remet l'espace.
+			last_sp = sp;  // on memorise la derniere cesure qui fait tenir la ligne en largeur.
+			sp ++;  // on se place apres.
+			while (*sp == ' ')  // on saute tous les espaces.
+				sp ++;
+		}
+	} while (sp);
+	
+	// dernier mot.
+	if (bUseMarkup)  // on regarde la taille de str a sp.
+		pango_layout_set_markup (pLayout, str, -1);
+	else
+		pango_layout_set_text (pLayout, str, -1);
+	pango_layout_get_pixel_extents (pLayout, &ink, &log);
+	w = log.width + log.x;
+	if (w > iMaxWidth)  // on deborde.
+	{
+		if (last_sp != NULL)  // on coupe au dernier espace connu.
+			*last_sp = '\n';
+	}
+}
+
 cairo_surface_t *cairo_dock_create_surface_from_text_full (const gchar *cText, CairoDockLabelDescription *pLabelDescription, double fMaxScale, int iMaxWidth, int *iTextWidth, int *iTextHeight, double *fTextXOffset, double *fTextYOffset)
 {
 	g_return_val_if_fail (cText != NULL && pLabelDescription != NULL, NULL);
@@ -805,20 +880,52 @@
 	
 	pango_layout_set_text (pLayout, "|", -1);  // donne la hauteur max des lettres.
 	pango_layout_get_pixel_extents (pLayout, &ink, &log);
-	int iMaxSize = ink.height;
+	int iMinSize = ink.height;  // hauteur min = au moins la plus grande lettre pour une uniformite des labels.
 	
 	if (pLabelDescription->bUseMarkup)
 		pango_layout_set_markup (pLayout, cText, -1);
 	else
 		pango_layout_set_text (pLayout, cText, -1);
 	
+	//\_________________ On insere des retours chariot si necessaire.
+	pango_layout_get_pixel_extents (pLayout, &ink, &log);
+	
+	if (pLabelDescription->fMaxRelativeWidth != 0)
+	{
+		int iMaxLineWidth = pLabelDescription->fMaxRelativeWidth * g_desktopGeometry.iScreenWidth[CAIRO_DOCK_HORIZONTAL];
+		int w = ink.width;
+		//g_print ("text width : %d / %d\n", w, iMaxLineWidth);
+		if (w > iMaxLineWidth)  // le texte est trop long.
+		{
+			// on decoupe le texte en lignes et on limite chaque ligne trop longue.
+			gchar *sp, *last_sp=NULL;
+			gchar **cLines = g_strsplit (cText, "\n", -1);
+			gchar *cLine;
+			int i;
+			for (i = 0; cLines[i] != NULL; i ++)
+			{
+				cLine = cLines[i];
+				cairo_dock_limit_string_width (cLine, pLayout, pLabelDescription->bUseMarkup, iMaxLineWidth);
+				g_print (" + %s\n", cLine);
+			}
+			
+			// on reforme le texte et on le passe a pango.
+			gchar *cCutText = g_strjoinv ("\n", cLines);
+			if (pLabelDescription->bUseMarkup)
+				pango_layout_set_markup (pLayout, cCutText, -1);
+			else
+				pango_layout_set_text (pLayout, cCutText, -1);
+			pango_layout_get_pixel_extents (pLayout, &ink, &log);
+			g_strfreev (cLines);
+			g_free (cCutText);
+		}
+	}
+	
 	//\_________________ On cree une surface aux dimensions du texte.
-	pango_layout_get_pixel_extents (pLayout, &ink, &log);
-	
 	gboolean bDrawBackground = (pLabelDescription->fBackgroundColor != NULL && pLabelDescription->fBackgroundColor[3] > 0);
 	double fRadius = fMaxScale * MAX (pLabelDescription->iMargin, MIN (6, pLabelDescription->iSize/3));  // permet d'avoir un rayon meme si on n'a pas de marge.
 	int iOutlineMargin = 2*pLabelDescription->iMargin + (pLabelDescription->bOutlined ? 2 : 0);  // outlined => +1 tout autour des lettres.
-	double fZoomX = ((iMaxWidth != 0 && ink.width + iOutlineMargin > iMaxWidth) ? 1.*iMaxWidth / (ink.width + iOutlineMargin) : 1.);
+	double fZoomX = ((iMaxWidth != 0 && ink.width + iOutlineMargin > iMaxWidth) ? (double)iMaxWidth / (ink.width + iOutlineMargin) : 1.);
 	
 	*iTextWidth = (ink.width + iOutlineMargin) * fZoomX;  // le texte + la marge de chaque cote.
 	if (bDrawBackground)  // quand on trace le cadre, on evite qu'avec des petits textes genre "1" on obtienne un fond tout rond.
@@ -827,7 +934,7 @@
 		if (iMaxWidth != 0 && *iTextWidth > iMaxWidth)
 			*iTextWidth = iMaxWidth;
 	}
-	*iTextHeight = MAX (iMaxSize, ink.height) + iOutlineMargin + 0; // +1 car certaines polices "debordent".
+	*iTextHeight = MAX (iMinSize, ink.height) + iOutlineMargin + 0; // +1 car certaines polices "debordent".
 	
 	cairo_surface_t* pNewSurface = cairo_dock_create_blank_surface (
 		*iTextWidth,

=== modified file 'src/gldit/cairo-dock-surface-factory.h'
--- src/gldit/cairo-dock-surface-factory.h	2010-08-07 01:28:23 +0000
+++ src/gldit/cairo-dock-surface-factory.h	2010-10-06 16:46:42 +0000
@@ -38,6 +38,7 @@
 * 
 * To load a text into a surface, describe your text look with a _CairoDockLabelDescription, and pass it to \ref cairo_dock_create_surface_from_text.
 *
+* Note: if you also need to load the image into a texture, it's easier to use the higher level ImageBuffer API (see \ref cairo_dock_create_image_buffer).
 */
 
 /// Types of image loading modifiers.
@@ -90,6 +91,8 @@
 	gint iMargin;
 	/// whether to use Pango markups or not (markups are html-like marks, like <b>...</b>; using markups force you to escape some characters like "&" -> "&amp;")
 	gboolean bUseMarkup;
+	/// maximum width allowed, in ratio of the screen's width. Carriage returns will be inserted if necessary. 0 means no limit.
+	gdouble fMaxRelativeWidth;
 };
 
 

=== modified file 'src/gldit/cairo-dock-themes-manager.c'
--- src/gldit/cairo-dock-themes-manager.c	2010-09-16 01:04:13 +0000
+++ src/gldit/cairo-dock-themes-manager.c	2010-10-06 16:46:42 +0000
@@ -49,6 +49,7 @@
 gchar *g_cThemesDirPath = NULL;  // le chemin vers le repertoire des themes.
 gchar *g_cCurrentLaunchersPath = NULL;  // le chemin vers le repertoire des lanceurs du theme courant.
 gchar *g_cCurrentIconsPath = NULL;  // le chemin vers le repertoire des icones du theme courant.
+gchar *g_cCurrentImagesPath = NULL;  // le chemin vers le repertoire des images ou autre du theme courant.
 gchar *g_cCurrentPlugInsPath = NULL;  // le chemin vers le repertoire des plug-ins du theme courant.
 gchar *g_cConfFile = NULL;  // le chemin du fichier de conf.
 int g_iMajorVersion, g_iMinorVersion, g_iMicroVersion;  // version de la lib.
@@ -59,6 +60,7 @@
 #define CAIRO_DOCK_LAUNCHERS_DIR "launchers"
 #define CAIRO_DOCK_PLUG_INS_DIR "plug-ins"
 #define CAIRO_DOCK_LOCAL_ICONS_DIR "icons"
+#define CAIRO_DOCK_LOCAL_IMAGES_DIR "images"
 
 void cairo_dock_mark_current_theme_as_modified (gboolean bModified)
 {
@@ -547,6 +549,7 @@
 	g_cCurrentLaunchersPath = g_strdup_printf ("%s/%s", g_cCurrentThemePath, CAIRO_DOCK_LAUNCHERS_DIR);
 	_check_dir (g_cCurrentLaunchersPath);
 	g_cCurrentIconsPath = g_strdup_printf ("%s/%s", g_cCurrentThemePath, CAIRO_DOCK_LOCAL_ICONS_DIR);
+	g_cCurrentImagesPath = g_strdup_printf ("%s/%s", g_cCurrentThemePath, CAIRO_DOCK_LOCAL_IMAGES_DIR);
 	_check_dir (g_cCurrentIconsPath);
 	g_cCurrentPlugInsPath = g_strdup_printf ("%s/%s", g_cCurrentThemePath, CAIRO_DOCK_PLUG_INS_DIR);
 	_check_dir (g_cCurrentPlugInsPath);


Follow ups