← Back to team overview

cairo-dock-team team mailing list archive

[Merge] lp:~sqp/cairo-dock-core/gui-flexible-behaviour into lp:cairo-dock-core

 

SQP has proposed merging lp:~sqp/cairo-dock-core/gui-flexible-behaviour into lp:cairo-dock-core.

Requested reviews:
  Cairo-Dock Team (cairo-dock-team)

For more details, see:
https://code.launchpad.net/~sqp/cairo-dock-core/gui-flexible-behaviour/+merge/97093

Big GUI resize patch

Thread : http://glx-dock.org/bg_topic.php?t=5916&pos=0#mess_72389
-- 
https://code.launchpad.net/~sqp/cairo-dock-core/gui-flexible-behaviour/+merge/97093
Your team Cairo-Dock Team is requested to review the proposed merge of lp:~sqp/cairo-dock-core/gui-flexible-behaviour into lp:cairo-dock-core.
=== modified file 'data/cairo-dock-simple.conf.in'
--- data/cairo-dock-simple.conf.in	2012-02-21 00:43:57 +0000
+++ data/cairo-dock-simple.conf.in	2012-03-12 19:47:19 +0000
@@ -91,10 +91,7 @@
 #[gtk-select-font]
 [Shortkeys]
 
-#F[Keyboard shortcuts currently available;gtk-select-font]
-frame_key=
-
-#_ 
+#< 
 #{Many applets provide shortkeys for their actions. As soon as an applet is enabled, its shortkeys become available.
 #Double-click on a line, and press the shortkey you want to use for the corresponding action.}
 shortkeys=
@@ -103,10 +100,7 @@
 #[@pkgdatadir@/icons/icon-plug-ins.svg]
 [Add-ons]
 
-#F[Add or remove any applet;@pkgdatadir@/icons/icon-accessories.svg]
-frame_mod=
-
-#_ 
+#< 
 #{Select a line to get a preview and a description of the applet.
 #Click on the left check-box to (de)activate an applet.
 #Once an applet is active, you can configure it by right clicking on its icon.}
@@ -120,5 +114,5 @@
 #[@pkgdatadir@/icons/icon-controler.svg]
 [Themes]
 
-#_
+#<
 notebook=

=== modified file 'data/cairo-dock.conf.in'
--- data/cairo-dock.conf.in	2012-02-21 00:43:08 +0000
+++ data/cairo-dock.conf.in	2012-03-12 19:47:19 +0000
@@ -195,10 +195,7 @@
 #[gtk-select-font]
 [Shortkeys]
 
-#F[Keyboard shortcuts currently available;gtk-select-font]
-frame_key=
-
-#_ 
+#< 
 #{Many applets provide shortkeys for their actions. As soon as an applet is enabled, its shortkeys become available.
 #Double-click on a line, and press the shortkey you want to use for the corresponding action.}
 shortkeys=
@@ -206,6 +203,48 @@
 
 [System]
 
+#F-[Proxy;gtk-network]
+frame_proxy =
+
+#B-[4] Are you behind a proxy ?
+#{Use this option if you connect to the Internet through a proxy.}
+conn use proxy = false
+
+#s- Proxy name :
+conn proxy =
+
+#i- Port :
+conn port = 0
+
+#s- User :
+#{Let empty if you don't need to log-in to the proxy with a user/password.}
+conn user =
+
+#p- Password :
+#{Let empty if you don't need to log-in to the proxy with a user/password.}
+conn passwd =
+
+#X-[Connection to the Internet;gtk-network]
+frame_conn =
+
+#i-[1;20] Connection timeout :
+#{Maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase,  once the dock has connected this option is of no more use.}
+conn timeout = 10
+
+#i-[10;300] Maximum time to download a file:
+#{Maximum time in seconds that you allow the whole operation to last. Some themes can be up to a few MB.}
+conn max time = 120
+
+#b- Force IPv4 ?
+#{Use this option if you experience problems to connect.}
+force ipv4 = true
+
+#X-[Composition;gtk-clear]
+frame_fake =
+#b- Emulate composition with fake transparency?
+#{Only use this if you don't run a composite manager like Compiz, xcompmgr, etc and have a black background around your dock. For aesthetic reasons, the dock will be kept under other windows.}
+fake transparency = false
+
 #X-[Animations speed;@pkgdatadir@/icons/icon-movment.png]
 frame_mov =
 
@@ -253,44 +292,6 @@
 #{The transparency gradation pattern will then be re-calculated in real time. May need more CPU power.}
 dynamic reflection = false
 
-#X-[Composition;gtk-clear]
-frame_fake =
-#b- Emulate composition with fake transparency?
-#{Only use this if you don't run a composite manager like Compiz, xcompmgr, etc and have a black background around your dock. For aesthetic reasons, the dock will be kept under other windows.}
-fake transparency = false
-
-#X-[Connection to the Internet;gtk-network]
-frame_conn =
-
-#i-[1;20] Connection timeout :
-#{Maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase,  once the dock has connected this option is of no more use.}
-conn timeout = 10
-
-#i-[10;300] Maximum time to download a file:
-#{Maximum time in seconds that you allow the whole operation to last. Some themes can be up to a few MB.}
-conn max time = 120
-
-#b- Force IPv4 ?
-#{Use this option if you experience problems to connect.}
-force ipv4 = true
-
-#B-[4] Are you behind a proxy ?
-#{Use this option if you connect to the Internet through a proxy.}
-conn use proxy = false
-
-#s- Proxy name :
-conn proxy =
-
-#i- Port :
-conn port = 0
-
-#s- User :
-#{Let empty if you don't need to log-in to the proxy with a user/password.}
-conn user =
-
-#p- Password :
-#{Let empty if you don't need to log-in to the proxy with a user/password.}
-conn passwd =
 
 modules=
 
@@ -518,6 +519,10 @@
 #j+[10;128] Icons' size at rest (width x height) :
 launcher size = 40;40
 
+#i+[0;50] Space between icons :
+#{in pixels.}
+icon gap = 0
+
 #F+[Zoom effect;@pkgdatadir@/icons/icon-wave.png]
 frame_shape =
 #f+[1;5] Maximum zoom of the icons :
@@ -528,11 +533,7 @@
 #{in pixels. Outside of this space (centered on the mouse), there is no zoom.}
 sinusoid width = 150
 
-#i+[0;50] Space between icons :
-#{in pixels.}
-icon gap = 0
-
-#X+[Separators]
+#F+[Separators]
 frame_sep =
 
 #j+[4;128] Icon size at rest (width x height) :

=== modified file 'data/themes.conf.in'
--- data/themes.conf.in	2011-09-21 00:00:16 +0000
+++ data/themes.conf.in	2012-03-12 19:47:19 +0000
@@ -1,7 +1,7 @@
 #@VERSION@
 
 #[gtk-open]
-[Themes]
+[Load theme]
 
 #R[@pkgdatadir@/themes;../@CAIRO_DOCK_THEMES_DIR@;themes2.4] /
 chosen theme = 
@@ -24,9 +24,6 @@
 #[gtk-save]
 [Save]
 
-#F[Save current theme]
-frame1=
-
 #H[;../@CAIRO_DOCK_THEMES_DIR@] Save as:
 #{You will then be able to re-open it at any time.}
 theme name = 
@@ -51,8 +48,5 @@
 #[gtk-delete]
 [Delete]
 
-#F[List of your personal themes]
-frame1=
-
-#_ Delete from the list themes that you don't need anymore :
+#< Delete from the list themes that you don't need anymore :
 deleted themes = 

=== modified file 'po/misc/cairo-dock-extract-message.c'
--- po/misc/cairo-dock-extract-message.c	2011-07-02 23:47:36 +0000
+++ po/misc/cairo-dock-extract-message.c	2012-03-12 19:47:19 +0000
@@ -232,6 +232,7 @@
 					case CAIRO_DOCK_WIDGET_JUMP_TO_MODULE_IF_EXISTS :
 					
 					case CAIRO_DOCK_WIDGET_EMPTY_WIDGET :
+					case CAIRO_DOCK_WIDGET_EMPTY_FULL :
 					case CAIRO_DOCK_WIDGET_TEXT_LABEL :
 					case CAIRO_DOCK_WIDGET_HANDBOOK :
 					case CAIRO_DOCK_WIDGET_SEPARATOR :

=== modified file 'src/cairo-dock-gui-commons.c'
--- src/cairo-dock-gui-commons.c	2012-01-22 02:47:26 +0000
+++ src/cairo-dock-gui-commons.c	2012-03-12 19:47:19 +0000
@@ -679,15 +679,18 @@
 	// demander
 	rend = gtk_cell_renderer_text_new ();
 	col = gtk_tree_view_column_new_with_attributes (_("Origin"), rend, "text", CD_SHORTKEY_MODEL_NAME, NULL);
+	gtk_tree_view_column_set_expand (col, TRUE);
 	gtk_tree_view_column_set_sort_column_id (col, CD_SHORTKEY_MODEL_NAME);
 	gtk_tree_view_append_column (GTK_TREE_VIEW (pOneWidget), col);
 	// action description
 	rend = gtk_cell_renderer_text_new ();
 	col = gtk_tree_view_column_new_with_attributes (_("Action"), rend, "text", CD_SHORTKEY_MODEL_DESCRIPTION, NULL);
+	gtk_tree_view_column_set_expand (col, TRUE);
 	gtk_tree_view_append_column (GTK_TREE_VIEW (pOneWidget), col);
 	// shortkey
 	rend = gtk_cell_renderer_text_new ();
 	col = gtk_tree_view_column_new_with_attributes (_("Shortkey"), rend, "text", CD_SHORTKEY_MODEL_SHORTKEY, NULL);
+	gtk_tree_view_column_set_expand (col, TRUE);
 	gtk_tree_view_column_set_cell_data_func (col, rend, (GtkTreeCellDataFunc)_cairo_dock_render_shortkey, NULL, NULL);
 	gtk_tree_view_column_set_sort_column_id (col, CD_SHORTKEY_MODEL_SHORTKEY);
 	gtk_tree_view_append_column (GTK_TREE_VIEW (pOneWidget), col);

=== modified file 'src/cairo-dock-gui-items.c'
--- src/cairo-dock-gui-items.c	2011-12-03 02:10:56 +0000
+++ src/cairo-dock-gui-items.c	2012-03-12 19:47:19 +0000
@@ -239,7 +239,7 @@
 		else  // main dock, we display a message
 		{
 			pDataGarbage = g_ptr_array_new ();
-			gchar *cDefaultMessage = g_strdup_printf ("<b><span font_desc=\"Sans 14\">%s</span></b>", _("Main dock's parameters are available in the main configuration window."));
+			gchar *cDefaultMessage = g_strdup_printf ("<b><big>%s</big></b>", _("Main dock's parameters are available in the main configuration window."));
 			s_pCurrentLauncherWidget = cairo_dock_gui_make_preview_box (pLauncherWindow,
 				NULL,  // no selection widget
 				FALSE,  // vertical packaging

=== modified file 'src/cairo-dock-gui-simple.c'
--- src/cairo-dock-gui-simple.c	2012-02-27 00:59:35 +0000
+++ src/cairo-dock-gui-simple.c	2012-03-12 19:47:19 +0000
@@ -756,15 +756,6 @@
 		pDataGarbage,
 		NULL);  // les widgets seront ajoutes a la liste deja existante. Donc lors de l'ecriture, ils seront ecrit aussi, dans les cles definies dans le fichier de conf (donc de nouveaux groupes seront ajoutés).
 	
-	// l'onglet du groupe a deja son propre ascenseur.
-	int i, n = gtk_notebook_get_n_pages (GTK_NOTEBOOK (pThemeNotebook));
-	for (i = 0; i < n; i ++)
-	{
-		GtkWidget *pScrolledWindow = gtk_notebook_get_nth_page (GTK_NOTEBOOK (pThemeNotebook), i);
-		gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (pScrolledWindow), GTK_POLICY_NEVER, GTK_POLICY_NEVER);
-	}
-	
-	g_object_set (pThemeNotebook, "height-request", MIN (CAIRO_DOCK_SIMPLE_PANEL_HEIGHT, g_desktopGeometry.iXScreenHeight[CAIRO_DOCK_HORIZONTAL] - 100), NULL);  // sinon le notebook est tout petit :-/
 	gtk_box_pack_start (GTK_BOX (myWidget->pKeyBox),
 		pThemeNotebook,
 		TRUE,
@@ -787,17 +778,16 @@
 	
 	//\_____________ On l'ajoute a la fenetre.
 	GtkWidget *pScrolledWindow = gtk_scrolled_window_new (NULL, NULL);
-	g_object_set (pScrolledWindow, "height-request", MIN (2*CAIRO_DOCK_PREVIEW_HEIGHT, g_desktopGeometry.iXScreenHeight[CAIRO_DOCK_HORIZONTAL] - 175), NULL);
 	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (pScrolledWindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
 	gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (pScrolledWindow), pOneWidget);
 	myWidget->pSubWidgetList = g_slist_append (myWidget->pSubWidgetList, pOneWidget);  // on le met dans la liste, non pas pour recuperer sa valeur, mais pour pouvoir y acceder facilement plus tard.
 	gtk_box_pack_start (GTK_BOX (myWidget->pKeyBox), pScrolledWindow, FALSE, FALSE, 0);
 	
 	//\______________ On construit le widget de prevue et on le rajoute a la suite.
-	gchar *cDefaultMessage = g_strdup_printf ("<b><span font_desc=\"Sans 14\">%s</span></b>", _("Click on an applet in order to have a preview and a description for it."));
+	gchar *cDefaultMessage = g_strdup_printf ("<b><big>%s</big></b>", _("Click on an applet in order to have a preview and a description for it."));
 	GPtrArray *pDataGarbage = g_object_get_data (G_OBJECT (pSimpleConfigWindow), "garbage");
 	GtkWidget *pPreviewBox = cairo_dock_gui_make_preview_box (pSimpleConfigWindow, pOneWidget, FALSE, 1, cDefaultMessage, CAIRO_DOCK_SHARE_DATA_DIR"/images/"CAIRO_DOCK_LOGO, pDataGarbage);  // vertical packaging.
-	gtk_box_pack_start (GTK_BOX (myWidget->pKeyBox), pPreviewBox, FALSE, FALSE, 0);
+	gtk_box_pack_start (GTK_BOX (myWidget->pKeyBox), pPreviewBox, TRUE, TRUE, 0);
 	g_free (cDefaultMessage);
 }
 static void _make_shortkeys_widget (GtkWidget *pSimpleConfigWindow)
@@ -810,12 +800,8 @@
 	GtkWidget *pOneWidget = cairo_dock_build_shortkeys_widget ();
 	
 	//\_____________ On l'ajoute a la fenetre.
-	GtkWidget *pScrolledWindow = gtk_scrolled_window_new (NULL, NULL);
-	g_object_set (pScrolledWindow, "height-request", MIN (2*CAIRO_DOCK_PREVIEW_HEIGHT, g_desktopGeometry.iXScreenHeight[CAIRO_DOCK_HORIZONTAL] - 175), NULL);
-	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (pScrolledWindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
-	gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (pScrolledWindow), pOneWidget);
+	gtk_box_pack_start (GTK_BOX (myWidget->pKeyBox), pOneWidget, TRUE, TRUE, 0);
 	myWidget->pSubWidgetList = g_slist_append (myWidget->pSubWidgetList, pOneWidget);  // on le met dans la liste, non pas pour recuperer sa valeur, mais pour pouvoir y acceder facilement plus tard.
-	gtk_box_pack_start (GTK_BOX (myWidget->pKeyBox), pScrolledWindow, FALSE, FALSE, 0);
 }
 static void _make_widgets (GtkWidget *pSimpleConfigWindow, GKeyFile *pKeyFile)
 {

=== modified file 'src/gldit/cairo-dock-gui-factory.c'
--- src/gldit/cairo-dock-gui-factory.c	2012-02-26 03:00:49 +0000
+++ src/gldit/cairo-dock-gui-factory.c	2012-03-12 19:47:19 +0000
@@ -24,6 +24,7 @@
 #include <glib/gstdio.h>
 #include <glib/gi18n.h>
 
+#include "../config.h"
 #include "gldi-config.h"
 #include "cairo-dock-struct.h"
 #include "cairo-dock-module-factory.h"
@@ -242,7 +243,7 @@
 	if (cAuthor == NULL)
 		return NULL;
 	gchar *cBy = g_strdup_printf (_("by %s"), cAuthor);
-	gchar *cThemed = g_strdup_printf ("<small><i>%s </i></small>", cBy);  // need space after to prevent italic display bug (top right text truncated)
+	gchar *cThemed = g_strdup_printf ("<small><tt>%s</tt></small>", cBy);
 	g_free (cBy);
 	return cThemed;
 }
@@ -304,7 +305,7 @@
 	return FALSE;  // propagate event
 }
 
-static inline void _set_preview_image (const gchar *cPreviewFilePath, GtkImage *pPreviewImage)
+static inline void _set_preview_image (const gchar *cPreviewFilePath, GtkImage *pPreviewImage, GtkWidget *pPreviewImageFrame)
 {
 	int iPreviewWidth, iPreviewHeight;
 	GtkRequisition requisition;
@@ -334,6 +335,9 @@
 			1,
 			1);
 	}
+	else if (pPreviewImageFrame) // We have an image, display border.
+		gtk_frame_set_shadow_type (GTK_FRAME (pPreviewImageFrame), GTK_SHADOW_ETCHED_IN);
+
 	gtk_image_set_from_pixbuf (pPreviewImage, pPreviewPixbuf);
 	gdk_pixbuf_unref (pPreviewPixbuf);
 }
@@ -353,11 +357,15 @@
 		g_object_set_data (G_OBJECT (pDescriptionLabel), "cd-task", NULL);
 	}
 }
-static void _on_got_preview_file (const gchar *cPreviewFilePath, GtkWidget *pPreviewImage)
+
+static void _on_got_preview_file (const gchar *cPreviewFilePath, gpointer *data)
 {
+	GtkImage *pPreviewImage = data[1];
+	GtkWidget *pImageFrame = data[7];
+	
 	if (cPreviewFilePath != NULL)
 	{
-		_set_preview_image (cPreviewFilePath, GTK_IMAGE (pPreviewImage));
+		_set_preview_image (cPreviewFilePath, GTK_IMAGE (pPreviewImage), pImageFrame);
 		g_remove (cPreviewFilePath);
 	}
 	CairoDockTask *pTask = g_object_get_data (G_OBJECT (pPreviewImage), "cd-task");
@@ -367,6 +375,18 @@
 		g_object_set_data (G_OBJECT (pPreviewImage), "cd-task", NULL);
 	}
 }
+
+static void cairo_dock_label_set_label_show (GtkLabel *pLabel, const gchar *cLabel)
+{
+	if (cLabel == NULL)
+		gtk_widget_hide (GTK_WIDGET (pLabel));
+	else
+	{
+		gtk_label_set_label(GTK_LABEL (pLabel), cLabel);
+		gtk_widget_show (GTK_WIDGET (pLabel));
+	}
+}
+
 static void _cairo_dock_selection_changed (GtkTreeModel *model, GtkTreeIter iter, gpointer *data)
 {
 	static gchar *cPrevPath = NULL;
@@ -393,6 +413,7 @@
 	GtkLabel* pState = data[4];
 	GtkImage* pStateIcon = data[5];
 	GtkLabel* pSize = data[6];
+	GtkWidget *pImageFrame = data[7];
 	
 	gtk_label_set_justify (GTK_LABEL (pDescriptionLabel), GTK_JUSTIFY_FILL);
 	gtk_label_set_line_wrap (pDescriptionLabel, TRUE);
@@ -416,24 +437,24 @@
 	if (pTitle)
 	{
 		gchar *cTitle = _cairo_dock_gui_get_package_title (cName, NULL);
-		gtk_label_set_label(GTK_LABEL (pTitle), cTitle);
+		cairo_dock_label_set_label_show (GTK_LABEL (pTitle), cTitle);
 		g_free (cTitle);
 	}
 	if (pAuthor)
 	{
 		gchar *cBy = _cairo_dock_gui_get_package_author (cAuthor);
-		gtk_label_set_label(GTK_LABEL (pAuthor), cBy);
+		cairo_dock_label_set_label_show (GTK_LABEL (pAuthor), cBy);
 		g_free (cBy);
 	}
 	if (pState)
 	{
 		const gchar *cState = _cairo_dock_gui_get_package_state (iState);
-		gtk_label_set_label(GTK_LABEL (pState), cState);
+		cairo_dock_label_set_label_show (GTK_LABEL (pState), cState);
 	}
 	if (pSize)
 	{
 		gchar *cSize = _cairo_dock_gui_get_package_size (fSize);
-		gtk_label_set_label (GTK_LABEL (pSize), cSize);
+		cairo_dock_label_set_label_show (GTK_LABEL (pSize), cSize);
 		g_free (cSize);
 	}
 	if (pStateIcon)
@@ -478,6 +499,10 @@
 			gtk_label_set_markup (pDescriptionLabel, NULL);
 	}
 
+	// Hide image frame until we display the image (which can fail).
+	if (pImageFrame)
+		gtk_frame_set_shadow_type (GTK_FRAME (pImageFrame), GTK_SHADOW_NONE);
+
 	// get or fill the preview image.
 	if (cPreviewFilePath != NULL)
 	{
@@ -494,11 +519,11 @@
 			cd_debug ("fichier preview distant (%s)", cPreviewFilePath);
 			gtk_image_set_from_pixbuf (pPreviewImage, NULL);  // set blank image while downloading.
 			
-			pTask = cairo_dock_download_file_async (cPreviewFilePath, NULL, (GFunc) _on_got_preview_file, pPreviewImage);  // NULL <=> as a temporary file
+			pTask = cairo_dock_download_file_async (cPreviewFilePath, NULL, (GFunc) _on_got_preview_file, data);  // NULL <=> as a temporary file
 			g_object_set_data (G_OBJECT (pPreviewImage), "cd-task", pTask);
 		}
 		else  // fichier local ou rien.
-			_set_preview_image (cPreviewFilePath, pPreviewImage);
+			_set_preview_image (cPreviewFilePath, pPreviewImage, pImageFrame);
 	}
 
 	g_free (cDescriptionFilePath);
@@ -1562,59 +1587,87 @@
 }
 
 #define _allocate_new_buffer\
-	data = g_new0 (gconstpointer, 7); \
+	data = g_new0 (gconstpointer, 8); \
 	if (pDataGarbage) g_ptr_array_add (pDataGarbage, data);
 
+
+GtkWidget *cairo_dock_widget_image_frame_new (GtkWidget *pWidget)
+{
+	// ImageFrame : Display the visible border around the image.
+	GtkWidget *pImageFrame = gtk_frame_new (NULL);
+	gtk_frame_set_shadow_type (GTK_FRAME (pImageFrame), GTK_SHADOW_ETCHED_IN);
+	
+	// ImagePadding : Get some space between the visible border and the image.
+	GtkWidget *pImagePadding = gtk_frame_new (NULL);
+	gtk_frame_set_shadow_type (GTK_FRAME (pImagePadding), GTK_SHADOW_NONE);
+	gtk_container_set_border_width (GTK_CONTAINER (pImagePadding), CAIRO_DOCK_GUI_MARGIN);
+	gtk_container_add (GTK_CONTAINER (pImageFrame), pImagePadding);
+	
+	// Return with content widget inside.
+	gtk_container_add (GTK_CONTAINER (pImagePadding), pWidget);
+	return pImageFrame;
+}
+
 GtkWidget *cairo_dock_gui_make_preview_box (GtkWidget *pMainWindow, GtkWidget *pOneWidget, gboolean bHorizontalPackaging, int iAddInfoBar, const gchar *cInitialDescription, const gchar *cInitialImage, GPtrArray *pDataGarbage)
 {
 	gconstpointer *data;
 	_allocate_new_buffer;
 	
-	// min size
-	int iFrameWidth = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (pMainWindow), "frame-width"));
-	
 	// readme label.
-	GtkWidget *pDescriptionLabel = gtk_label_new (NULL);
-	
-	g_signal_connect (G_OBJECT (pDescriptionLabel), "destroy", G_CALLBACK (on_delete_async_widget), NULL);
-	
-	int iMinSize = (g_desktopGeometry.iXScreenWidth[CAIRO_DOCK_HORIZONTAL] - iFrameWidth) /2.5;
+	GtkWidget *pDescriptionLabel = gtk_label_new (cInitialDescription);
 	gtk_label_set_use_markup  (GTK_LABEL (pDescriptionLabel), TRUE);
-	if (bHorizontalPackaging)
-	{
-		gtk_widget_set_size_request (pDescriptionLabel, MIN (iMinSize * 1.5, CAIRO_DOCK_README_WIDTH_MIN), CAIRO_DOCK_PREVIEW_HEIGHT);
-	}
-	else
-		gtk_widget_set_size_request (pDescriptionLabel, CAIRO_DOCK_README_WIDTH, -1);
 	gtk_label_set_justify (GTK_LABEL (pDescriptionLabel), GTK_JUSTIFY_LEFT);
 	gtk_label_set_line_wrap (GTK_LABEL (pDescriptionLabel), TRUE);
+	gtk_label_set_selectable (GTK_LABEL (pDescriptionLabel), TRUE);
+	g_signal_connect (G_OBJECT (pDescriptionLabel), "destroy", G_CALLBACK (on_delete_async_widget), NULL);
+
+	// min size
+	int iFrameWidth = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (pMainWindow), "frame-width"));
+	int iMinSize = (g_desktopGeometry.iXScreenWidth[CAIRO_DOCK_HORIZONTAL] - iFrameWidth) /2.5;
+	#if (GTK_MAJOR_VERSION < 3)
+		int iLabelWidth = bHorizontalPackaging ? MIN (iMinSize * 1.5, CAIRO_DOCK_README_WIDTH_MIN) : CAIRO_DOCK_README_WIDTH;
+		gtk_widget_set_size_request (pDescriptionLabel, iLabelWidth, -1);
+	#endif
 	
 	// preview image
 	GtkWidget *pPreviewImage = gtk_image_new_from_pixbuf (NULL);
-	
 	g_signal_connect (G_OBJECT (pPreviewImage), "destroy", G_CALLBACK (on_delete_async_widget), NULL);
 	
-	gtk_widget_set_size_request (pPreviewImage,
-		bHorizontalPackaging ? MIN (iMinSize, CAIRO_DOCK_PREVIEW_WIDTH) : CAIRO_DOCK_PREVIEW_WIDTH,
-		bHorizontalPackaging ? CAIRO_DOCK_PREVIEW_HEIGHT : -1);
-	
+	// Test if can be removed
+	if (bHorizontalPackaging)
+		gtk_widget_set_size_request (pPreviewImage, MIN (iMinSize, CAIRO_DOCK_PREVIEW_WIDTH), CAIRO_DOCK_PREVIEW_HEIGHT);
+
+	// Add a frame around the image.
+	GtkWidget *pImageFrame = cairo_dock_widget_image_frame_new (pPreviewImage);
+	// and load it.
+	if (cInitialImage)
+		_set_preview_image (cInitialImage, GTK_IMAGE (pPreviewImage), pImageFrame);
+	else
+		gtk_frame_set_shadow_type (GTK_FRAME (pImageFrame), GTK_SHADOW_NONE);
+
+	GtkWidget *pPreviewBox;
+	GtkWidget* pDescriptionFrame = NULL;
+	GtkWidget* pTextVBox = _gtk_vbox_new (CAIRO_DOCK_GUI_MARGIN);
+
 	// info bar
-	GtkWidget* pDescriptionFrame = NULL;
 	if (iAddInfoBar)
 	{
 		// vertical frame.
 		pDescriptionFrame = gtk_frame_new (NULL);
 		gtk_frame_set_shadow_type(GTK_FRAME(pDescriptionFrame), GTK_SHADOW_OUT);
-		GtkWidget* pFrameVBox = _gtk_vbox_new (CAIRO_DOCK_GUI_MARGIN);
-		gtk_container_add (GTK_CONTAINER(pDescriptionFrame), pFrameVBox);
+
+		pPreviewBox = pDescriptionFrame;
 		
 		// title
 		GtkWidget* pTitle = gtk_label_new (NULL);
 		gtk_label_set_use_markup (GTK_LABEL (pTitle), TRUE);
+		gtk_widget_set_name (pTitle, "pTitle");
 		
 		// author
 		GtkWidget* pAuthor = gtk_label_new (NULL);
 		gtk_label_set_use_markup (GTK_LABEL (pAuthor), TRUE);
+		gtk_widget_set_name (pAuthor, "pAuthor");
+		gtk_widget_hide (pAuthor);
 		
 		data[2] = pTitle;
 		data[3] = pAuthor;
@@ -1623,7 +1676,13 @@
 		GtkWidget* pFirstLine = _gtk_hbox_new (CAIRO_DOCK_GUI_MARGIN);
 		GtkWidget *pSecondLine = NULL;
 		
-		gtk_box_pack_start (GTK_BOX (pFirstLine), pTitle, FALSE, FALSE, CAIRO_DOCK_ICON_MARGIN);
+		if (bHorizontalPackaging)
+		{
+			// Use the frame border for the title. 
+			gtk_frame_set_label_widget (GTK_FRAME (pDescriptionFrame), pTitle);
+		}
+		else
+			gtk_box_pack_start (GTK_BOX (pFirstLine), pTitle, FALSE, FALSE, CAIRO_DOCK_ICON_MARGIN);
 		
 		if (iAddInfoBar == 1)
 		{
@@ -1634,9 +1693,11 @@
 			GtkWidget* pState = gtk_label_new (NULL);
 			gtk_label_set_use_markup (GTK_LABEL (pState), TRUE);
 			gtk_box_pack_end (GTK_BOX (pFirstLine), pState, FALSE, FALSE, CAIRO_DOCK_ICON_MARGIN);  // state on the right.
+			gtk_widget_set_name (pState, "pState");
 			
 			GtkWidget* pStateIcon = gtk_image_new_from_pixbuf (NULL);
 			gtk_box_pack_end (GTK_BOX (pFirstLine), pStateIcon, FALSE, FALSE, CAIRO_DOCK_ICON_MARGIN);  // icon next to state.
+			gtk_widget_set_name (pStateIcon, "pStateIcon");
 
 			pSecondLine = _gtk_hbox_new (CAIRO_DOCK_GUI_MARGIN);
 			
@@ -1645,21 +1706,31 @@
 			GtkWidget* pSize = gtk_label_new (NULL);
 			gtk_label_set_use_markup (GTK_LABEL (pSize), TRUE);
 			gtk_box_pack_end (GTK_BOX (pSecondLine), pSize, FALSE, FALSE, CAIRO_DOCK_ICON_MARGIN);  // size below state.
+			gtk_widget_set_name (pSize, "pSize");
 			
 			data[4] = pState;
 			data[5] = pStateIcon;
 			data[6] = pSize;
 		}
 		// pack everything in the frame vbox.
-		gtk_box_pack_start (GTK_BOX (pFrameVBox), pFirstLine, FALSE, FALSE, CAIRO_DOCK_GUI_MARGIN);
+		gtk_box_pack_start (GTK_BOX (pTextVBox), pFirstLine, FALSE, FALSE, CAIRO_DOCK_GUI_MARGIN);
 		if (pSecondLine)
-			gtk_box_pack_start (GTK_BOX (pFrameVBox), pSecondLine, FALSE, FALSE, CAIRO_DOCK_GUI_MARGIN);
-		gtk_box_pack_start (GTK_BOX (pFrameVBox), pDescriptionLabel, TRUE, TRUE, 0);
+			gtk_box_pack_start (GTK_BOX (pTextVBox), pSecondLine, FALSE, FALSE, CAIRO_DOCK_GUI_MARGIN);
+		GtkWidget* pDescriptionBox = _gtk_hbox_new (CAIRO_DOCK_GUI_MARGIN); // align text data on the left
+		gtk_box_pack_start (GTK_BOX (pDescriptionBox), pDescriptionLabel, FALSE, FALSE, CAIRO_DOCK_GUI_MARGIN); // Maybe TRUE pour GTK3 & horiz
+		gtk_box_pack_start (GTK_BOX (pTextVBox), pDescriptionBox, FALSE, FALSE, CAIRO_DOCK_GUI_MARGIN);
+	}
+	else
+	{
+		pPreviewBox = pTextVBox;
+		gtk_box_pack_start (GTK_BOX (pPreviewBox), pDescriptionLabel, FALSE, FALSE, CAIRO_DOCK_GUI_MARGIN);
 	}
 	
 	// connect to the widget.
 	data[0] = pDescriptionLabel;
 	data[1] = pPreviewImage;
+	data[7] = pImageFrame;
+	
 	if (GTK_IS_COMBO_BOX (pOneWidget))
 	{
 		g_signal_connect (G_OBJECT (pOneWidget),
@@ -1675,20 +1746,128 @@
 			data,
 			NULL);
 	}
-	
-	// pack eveything in a box.
-	GtkWidget *pPreviewBox = (bHorizontalPackaging ? _gtk_hbox_new (CAIRO_DOCK_GUI_MARGIN) : _gtk_vbox_new (CAIRO_DOCK_GUI_MARGIN));
-	gtk_box_pack_start (GTK_BOX (pPreviewBox), pDescriptionFrame ? pDescriptionFrame : pDescriptionLabel, FALSE, FALSE, 0);
-	gtk_box_pack_start (GTK_BOX (pPreviewBox), pPreviewImage, FALSE, FALSE, 0);
-	
-	// initial values
-	if (cInitialDescription)
-		gtk_label_set_markup (GTK_LABEL (pDescriptionLabel), cInitialDescription);
-	if (cInitialImage)
-		_set_preview_image (cInitialImage, GTK_IMAGE (pPreviewImage));
+
+	// Build boxes fieldset.
+	if (bHorizontalPackaging)
+	{
+		// FrameHBox will set the frame border full size to the right.
+		GtkWidget *pFrameHBox = _gtk_hbox_new (CAIRO_DOCK_GUI_MARGIN);
+		gtk_container_add (GTK_CONTAINER(pDescriptionFrame), pFrameHBox);
+		gtk_box_pack_start (GTK_BOX (pFrameHBox), pTextVBox, TRUE, TRUE, 0);
+
+		GtkWidget *pPreviewImageBox = _gtk_vbox_new (CAIRO_DOCK_GUI_MARGIN);
+
+		GtkWidget *pPreviewImageSubBox = _gtk_hbox_new (CAIRO_DOCK_GUI_MARGIN);
+		gtk_box_pack_start (GTK_BOX (pPreviewImageSubBox), pImageFrame, FALSE, FALSE, 2 * CAIRO_DOCK_GUI_MARGIN);
+		gtk_box_pack_start (GTK_BOX (pPreviewImageBox), pPreviewImageSubBox, FALSE, FALSE, 0);
+		
+		gtk_box_pack_end (GTK_BOX (pFrameHBox), pPreviewImageBox, FALSE, FALSE, 2 * CAIRO_DOCK_GUI_MARGIN);
+	}
+	else
+	{
+		// Add TextVBox to the main frame if created. (iAddInfoBar > 0)
+		gtk_container_add (GTK_CONTAINER(pDescriptionFrame), pTextVBox);
+		
+		// pPreviewImageBox : center image on x axis.
+		GtkWidget *pPreviewImageBox = _gtk_vbox_new (CAIRO_DOCK_GUI_MARGIN);
+		// pPreviewImageBox : prevent image frame from using full width.
+		GtkWidget *pPreviewImageSubBox = _gtk_hbox_new (CAIRO_DOCK_GUI_MARGIN);
+		gtk_box_pack_start (GTK_BOX (pPreviewImageSubBox), pImageFrame, TRUE, FALSE, 0);
+		gtk_box_pack_start (GTK_BOX (pPreviewImageBox), pPreviewImageSubBox, FALSE, FALSE, 0);
+		gtk_box_pack_start (GTK_BOX (pTextVBox), pPreviewImageBox, FALSE, FALSE, 2 * CAIRO_DOCK_GUI_MARGIN);
+	}
+	
 	return pPreviewBox;
 }
 
+
+GtkWidget *cairo_dock_widget_handbook_new (CairoDockModule *pModule)
+{
+	g_return_val_if_fail (pModule != NULL, NULL);
+	
+	// Frame with label
+	GtkWidget *pFrame = gtk_frame_new (NULL);
+	gtk_container_set_border_width (GTK_CONTAINER (pFrame), CAIRO_DOCK_GUI_MARGIN);
+	gchar *cLabel = g_strdup_printf ("<big><b>%s </b></big>v%s",
+		pModule->pVisitCard->cModuleName,
+		pModule->pVisitCard->cModuleVersion);
+	GtkWidget *pLabel = gtk_label_new (cLabel);
+	g_free (cLabel);
+	gtk_label_set_use_markup (GTK_LABEL (pLabel), TRUE);
+	gtk_frame_set_label_widget (GTK_FRAME (pFrame), pLabel);
+	
+	// TopHBox : Will align widgets on top.
+	GtkWidget *pTopHBox = _gtk_hbox_new (CAIRO_DOCK_GUI_MARGIN);
+	gtk_container_add (GTK_CONTAINER (pFrame), pTopHBox);
+
+	// TextBox : Align text widgets on the left from top to bottom.
+	GtkWidget *pTextBox = _gtk_vbox_new (0);
+	gtk_box_pack_start (GTK_BOX (pTopHBox), pTextBox, FALSE, FALSE, 0);
+
+	// Author(s) text
+	gchar *cDescription = g_strdup_printf ("<small><tt>by %s</tt></small>", pModule->pVisitCard->cAuthor);
+	pLabel = gtk_label_new (cDescription);
+	g_free (cDescription);
+	gtk_label_set_use_markup (GTK_LABEL (pLabel), TRUE);
+	gtk_label_set_line_wrap (GTK_LABEL (pLabel), TRUE);
+	gtk_label_set_justify (GTK_LABEL (pLabel), GTK_JUSTIFY_LEFT);
+	GtkWidget *pAlignLeft = _gtk_hbox_new (CAIRO_DOCK_GUI_MARGIN);
+	gtk_container_set_border_width (GTK_CONTAINER (pAlignLeft), CAIRO_DOCK_GUI_MARGIN);
+	gtk_box_pack_start (GTK_BOX (pAlignLeft), pLabel, FALSE, FALSE, 0);
+	gtk_box_pack_start (GTK_BOX (pTextBox), pAlignLeft, FALSE, FALSE, 0);
+	
+	// Description Text
+	cDescription = g_strdup_printf ("<span rise='8000'>%s</span>",
+		dgettext (pModule->pVisitCard->cGettextDomain, pModule->pVisitCard->cDescription));
+	pLabel = gtk_label_new (cDescription);
+	g_free (cDescription);
+	gtk_label_set_use_markup (GTK_LABEL (pLabel), TRUE);
+	gtk_label_set_selectable (GTK_LABEL (pLabel), TRUE);
+	gtk_label_set_line_wrap (GTK_LABEL (pLabel), TRUE);
+	gtk_label_set_justify (GTK_LABEL (pLabel), GTK_JUSTIFY_LEFT);
+	#if (GTK_MAJOR_VERSION < 3)
+		g_object_set (pLabel, "width-request", CAIRO_DOCK_README_WIDTH, NULL);
+	#endif
+	gtk_box_pack_start (GTK_BOX (pTextBox), pLabel, FALSE, FALSE, 0);
+
+	// ModuleImage
+	int iPreviewWidth, iPreviewHeight;
+	GdkPixbuf *pPreviewPixbuf = NULL;
+	int w=200, h=200;
+	if (gdk_pixbuf_get_file_info (pModule->pVisitCard->cPreviewFilePath, &iPreviewWidth, &iPreviewHeight) != NULL)  // The return value is owned by GdkPixbuf and should not be freed.
+	{
+		if (iPreviewWidth > w)
+		{
+			iPreviewHeight *= 1.*w/iPreviewWidth;
+			iPreviewWidth = w;
+		}
+		if (iPreviewHeight > h)
+		{
+			iPreviewWidth *= 1.*h/iPreviewHeight;
+			iPreviewHeight = h;
+		}
+		pPreviewPixbuf = gdk_pixbuf_new_from_file_at_size (pModule->pVisitCard->cPreviewFilePath, iPreviewWidth, iPreviewHeight, NULL);
+		if (pPreviewPixbuf != NULL)
+		{
+			// ImageBox : Align the image on top.
+			GtkWidget *pImageBox = _gtk_vbox_new (CAIRO_DOCK_GUI_MARGIN);
+			gtk_box_pack_end (GTK_BOX (pTopHBox), pImageBox, FALSE, FALSE, CAIRO_DOCK_GUI_MARGIN);
+			
+			// Image Widget.
+			GtkWidget *pModuleImage = gtk_image_new_from_pixbuf (NULL);
+			gtk_image_set_from_pixbuf (GTK_IMAGE (pModuleImage), pPreviewPixbuf);
+			gdk_pixbuf_unref (pPreviewPixbuf);
+			
+			// Add a frame around the image.
+			GtkWidget *pImageFrame = cairo_dock_widget_image_frame_new (pModuleImage);
+			gtk_box_pack_start (GTK_BOX (pImageBox), pImageFrame, FALSE, FALSE, 0);
+		}
+	}
+	
+	return pFrame;
+}
+
+
 #define _pack_in_widget_box(pSubWidget) gtk_box_pack_start (GTK_BOX (pWidgetBox), pSubWidget, FALSE, FALSE, 0)
 #define _pack_subwidget(pSubWidget) do {\
 	pSubWidgetList = g_slist_append (pSubWidgetList, pSubWidget);\
@@ -1725,7 +1904,7 @@
 }
 #endif
 
-#define _add_combo_from_modele(modele, bAddPreviewWidgets, bWithEntry) do {\
+#define _add_combo_from_modele(modele, bAddPreviewWidgets, bWithEntry, bHorizontalPackaging) do {\
 	if (modele == NULL) { \
 		pOneWidget = _combo_box_entry_new ();\
 		_pack_subwidget (pOneWidget); }\
@@ -1739,8 +1918,9 @@
 			gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (pOneWidget), rend, FALSE);\
 			gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (pOneWidget), rend, "text", CAIRO_DOCK_MODEL_NAME, NULL);}\
 		if (bAddPreviewWidgets) {\
-			pPreviewBox = cairo_dock_gui_make_preview_box (pMainWindow, pOneWidget, TRUE, 1, NULL, NULL, pDataGarbage);\
-			gtk_box_pack_start (GTK_BOX (pAdditionalItemsVBox ? pAdditionalItemsVBox : pKeyBox), pPreviewBox, FALSE, FALSE, 0);}\
+			pPreviewBox = cairo_dock_gui_make_preview_box (pMainWindow, pOneWidget, bHorizontalPackaging, 1, NULL, NULL, pDataGarbage);\
+			gboolean bFullSize = bWithEntry || bHorizontalPackaging;\
+			gtk_box_pack_start (GTK_BOX (pAdditionalItemsVBox ? pAdditionalItemsVBox : pKeyBox), pPreviewBox, bFullSize, bFullSize, 0);}\
 		if (_cairo_dock_find_iter_from_name (modele, cValue, &iter))\
 			gtk_combo_box_set_active_iter (GTK_COMBO_BOX (pOneWidget), &iter);\
 		_pack_subwidget (pOneWidget);\
@@ -1907,6 +2087,7 @@
 	GtkWidget *pAdditionalItemsVBox;
 	gboolean bIsAligned;
 	gboolean bInsert;
+	gboolean bFullSize;
 	
 	pGroupBox = NULL;
 	pFrame = NULL;
@@ -1946,16 +2127,31 @@
 		pLabel = NULL;
 		pWidgetBox = NULL;
 		pAdditionalItemsVBox = NULL;
-		if (iElementType != CAIRO_DOCK_WIDGET_FRAME && iElementType != CAIRO_DOCK_WIDGET_EXPANDER && iElementType != CAIRO_DOCK_WIDGET_SEPARATOR)
+		bFullSize = (iElementType == CAIRO_DOCK_WIDGET_THEME_SELECTOR
+			|| iElementType == CAIRO_DOCK_WIDGET_THEME_LIST
+			|| iElementType == CAIRO_DOCK_WIDGET_VIEW_LIST
+			|| iElementType == CAIRO_DOCK_WIDGET_EMPTY_FULL);
+
+		if (iElementType == CAIRO_DOCK_WIDGET_HANDBOOK)
+		{
+			cValue = g_key_file_get_string (pKeyFile, cGroupName, cKeyName, NULL);
+			CairoDockModule *pModule = cairo_dock_find_module_from_name (cValue);
+			g_free (cValue);
+			GtkWidget *pHandbook = cairo_dock_widget_handbook_new (pModule);
+			if (pHandbook != NULL)
+				gtk_box_pack_start (GTK_BOX (pGroupBox), pHandbook, TRUE, TRUE, 0);
+		}
+		else if (iElementType != CAIRO_DOCK_WIDGET_FRAME && iElementType != CAIRO_DOCK_WIDGET_EXPANDER && iElementType != CAIRO_DOCK_WIDGET_SEPARATOR)
 		{
 			//\______________ On cree la boite de la cle.
 			if (iElementType == CAIRO_DOCK_WIDGET_THEME_LIST || iElementType == CAIRO_DOCK_WIDGET_THEME_LIST_ENTRY || iElementType == CAIRO_DOCK_WIDGET_VIEW_LIST)
 			{
+				bFullSize = TRUE;
 				pAdditionalItemsVBox = _gtk_vbox_new (0);
 				gtk_box_pack_start (pFrameVBox != NULL ? GTK_BOX (pFrameVBox) :  GTK_BOX (pGroupBox),
 					pAdditionalItemsVBox,
-					FALSE,
-					FALSE,
+					bFullSize,
+					bFullSize,
 					0);
 				pKeyBox = _gtk_hbox_new (CAIRO_DOCK_GUI_MARGIN);
 				gtk_box_pack_start (GTK_BOX (pAdditionalItemsVBox),
@@ -1969,8 +2165,8 @@
 				pKeyBox = (bIsAligned ? _gtk_hbox_new (CAIRO_DOCK_GUI_MARGIN) : _gtk_vbox_new (CAIRO_DOCK_GUI_MARGIN));
 				gtk_box_pack_start (pFrameVBox != NULL ? GTK_BOX (pFrameVBox) : GTK_BOX (pGroupBox),
 					pKeyBox,
-					FALSE,
-					FALSE,
+					bFullSize,
+					bFullSize,
 					0);
 				
 			}
@@ -2012,28 +2208,7 @@
 			}
 			
 			//\______________ On cree le label descriptif et la boite du widget.
-			if (iElementType == CAIRO_DOCK_WIDGET_HANDBOOK)
-			{
-				cValue = g_key_file_get_string (pKeyFile, cGroupName, cKeyName, NULL);
-				CairoDockModule *pModule = cairo_dock_find_module_from_name (cValue);
-				if (pModule != NULL)
-				{
-					gchar *cDescription = g_strdup_printf ("<i>%s (v%s) by %s</i>\n%s",
-						pModule->pVisitCard->cModuleName,
-						pModule->pVisitCard->cModuleVersion,
-						pModule->pVisitCard->cAuthor,
-						dgettext (pModule->pVisitCard->cGettextDomain,
-							pModule->pVisitCard->cDescription));
-					pLabel = gtk_label_new (cDescription);
-					gtk_label_set_use_markup (GTK_LABEL (pLabel), TRUE);
-					g_object_set (pLabel, "width-request", CAIRO_DOCK_README_WIDTH, NULL);
-					gtk_label_set_justify (GTK_LABEL (pLabel), GTK_JUSTIFY_LEFT);
-					gtk_label_set_line_wrap (GTK_LABEL (pLabel), TRUE);
-					g_free (cDescription);
-				}
-				g_free (cValue);
-			}
-			else if (*cUsefulComment != '\0' && strcmp (cUsefulComment, "loading...") != 0)
+			if (*cUsefulComment != '\0' && strcmp (cUsefulComment, "loading...") != 0)
 			{
 				pLabel = gtk_label_new (NULL);
 				gtk_label_set_use_markup  (GTK_LABEL (pLabel), TRUE);
@@ -2052,11 +2227,12 @@
 			
 			if (iElementType != CAIRO_DOCK_WIDGET_EMPTY_WIDGET)  // inutile si rien dans dedans.
 			{	// cette boite permet d'empiler les widgets a droite, mais en les rangeant de gauche a droite normalement.
+				bFullSize = (iElementType == CAIRO_DOCK_WIDGET_THEME_SELECTOR || iElementType == CAIRO_DOCK_WIDGET_THEME_LIST_ENTRY || iElementType == CAIRO_DOCK_WIDGET_SHORTKEY_SELECTOR);
 				pWidgetBox = _gtk_hbox_new (CAIRO_DOCK_GUI_MARGIN);
 				gtk_box_pack_end (GTK_BOX (pKeyBox),
 					pWidgetBox,
-					FALSE,
-					FALSE,
+					bFullSize,
+					bFullSize,
 					0);
 			}
 		}
@@ -2282,7 +2458,7 @@
 			case CAIRO_DOCK_WIDGET_VIEW_LIST :  // liste des vues.
 			{
 				GtkListStore *pRendererListStore = _cairo_dock_build_renderer_list_for_gui ();
-				_add_combo_from_modele (pRendererListStore, TRUE, FALSE);
+				_add_combo_from_modele (pRendererListStore, TRUE, FALSE, TRUE);
 				g_object_unref (pRendererListStore);
 			}
 			break ;
@@ -2293,7 +2469,7 @@
 				modele = _cairo_dock_gui_allocate_new_model ();
 				gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (modele), CAIRO_DOCK_MODEL_NAME, GTK_SORT_ASCENDING);
 				
-				_add_combo_from_modele (modele, TRUE, iElementType == CAIRO_DOCK_WIDGET_THEME_LIST_ENTRY);
+				_add_combo_from_modele (modele, TRUE, iElementType == CAIRO_DOCK_WIDGET_THEME_LIST_ENTRY, iElementType == CAIRO_DOCK_WIDGET_THEME_LIST);
 				
 				if (iElementType == CAIRO_DOCK_WIDGET_THEME_LIST)  // add the state icon.
 				{
@@ -2356,7 +2532,7 @@
 			case CAIRO_DOCK_WIDGET_ANIMATION_LIST :  // liste des animations.
 			{
 				GtkListStore *pAnimationsListStore = _cairo_dock_build_animations_list_for_gui ();
-				_add_combo_from_modele (pAnimationsListStore, FALSE, FALSE);
+				_add_combo_from_modele (pAnimationsListStore, FALSE, FALSE, FALSE);
 				g_object_unref (pAnimationsListStore);
 			}
 			break ;
@@ -2364,7 +2540,7 @@
 			case CAIRO_DOCK_WIDGET_DIALOG_DECORATOR_LIST :  // liste des decorateurs de dialogue.
 			{
 				GtkListStore *pDialogDecoratorListStore = _cairo_dock_build_dialog_decorator_list_for_gui ();
-				_add_combo_from_modele (pDialogDecoratorListStore, FALSE, FALSE);
+				_add_combo_from_modele (pDialogDecoratorListStore, FALSE, FALSE, FALSE);
 				g_object_unref (pDialogDecoratorListStore);
 			}
 			break ;
@@ -2375,7 +2551,7 @@
 				GtkListStore *pDecorationsListStore = ( iElementType == CAIRO_DOCK_WIDGET_DESKLET_DECORATION_LIST ?
 					_cairo_dock_build_desklet_decorations_list_for_gui () :
 					_cairo_dock_build_desklet_decorations_list_for_applet_gui () );
-				_add_combo_from_modele (pDecorationsListStore, FALSE, FALSE);
+				_add_combo_from_modele (pDecorationsListStore, FALSE, FALSE, FALSE);
 				g_object_unref (pDecorationsListStore);
 				
 				_allocate_new_buffer;
@@ -2444,7 +2620,7 @@
 				
 				GtkListStore *pIconThemeListStore = _cairo_dock_build_icon_theme_list_for_gui (pHashTable);
 				
-				_add_combo_from_modele (pIconThemeListStore, FALSE, FALSE);
+				_add_combo_from_modele (pIconThemeListStore, FALSE, FALSE, FALSE);
 				
 				g_object_unref (pIconThemeListStore);
 				g_free (cUserPath);
@@ -2990,15 +3166,14 @@
 				gtk_scrollable_set_vadjustment (GTK_SCROLLABLE (pOneWidget), GTK_ADJUSTMENT (adj));
 				#endif
 				pScrolledWindow = gtk_scrolled_window_new (NULL, NULL);
-				g_object_set (pScrolledWindow, "height-request", CAIRO_DOCK_PREVIEW_HEIGHT+60, NULL);  // prevue + readme.
 				gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (pScrolledWindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
 				gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (pScrolledWindow), pOneWidget);
 				pSubWidgetList = g_slist_append (pSubWidgetList, pOneWidget);
 				_pack_in_widget_box (pScrolledWindow);
 				
 				//\______________ On construit le widget de prevue et on le rajoute a la suite.
-				pPreviewBox = cairo_dock_gui_make_preview_box (pMainWindow, pOneWidget, FALSE, 2, NULL, NULL, pDataGarbage);  // vertical packaging.
-				_pack_in_widget_box (pPreviewBox);
+				pPreviewBox = cairo_dock_gui_make_preview_box (pMainWindow, pOneWidget, FALSE, 2, NULL, CAIRO_DOCK_SHARE_DATA_DIR"/images/"CAIRO_DOCK_LOGO, pDataGarbage);  // vertical packaging.
+				gtk_box_pack_start (GTK_BOX (pWidgetBox), pPreviewBox, TRUE, TRUE, 0);
 				
 				//\______________ On recupere les themes.
 				if (pAuthorizedValuesList != NULL)
@@ -3158,6 +3333,7 @@
 			break;
 
 			case CAIRO_DOCK_WIDGET_EMPTY_WIDGET :  // container pour widget personnalise.
+			case CAIRO_DOCK_WIDGET_EMPTY_FULL :
 				
 			break ;
 			
@@ -3170,38 +3346,6 @@
 			}
 			break ;
 			
-			case CAIRO_DOCK_WIDGET_HANDBOOK :  // le label contenant le manuel de l'applet, il a ete place avant.
-				cValue = g_key_file_get_string (pKeyFile, cGroupName, cKeyName, NULL);
-				CairoDockModule *pModule = cairo_dock_find_module_from_name (cValue);
-				if (pModule == NULL)
-					break;	
-				
-				int iPreviewWidth, iPreviewHeight;
-				GdkPixbuf *pPreviewPixbuf = NULL;
-				int w=200, h=200;
-				if (gdk_pixbuf_get_file_info (pModule->pVisitCard->cPreviewFilePath, &iPreviewWidth, &iPreviewHeight) != NULL)  // The return value is owned by GdkPixbuf and should not be freed.
-				{
-					if (iPreviewWidth > w)
-					{
-						iPreviewHeight *= 1.*w/iPreviewWidth;
-						iPreviewWidth = w;
-					}
-					if (iPreviewHeight > h)
-					{
-						iPreviewWidth *= 1.*h/iPreviewHeight;
-						iPreviewHeight = h;
-					}
-					pPreviewPixbuf = gdk_pixbuf_new_from_file_at_size (pModule->pVisitCard->cPreviewFilePath, iPreviewWidth, iPreviewHeight, NULL);
-				}
-				if (pPreviewPixbuf != NULL)
-				{
-					pPreviewImage = gtk_image_new_from_pixbuf (NULL);
-					gtk_image_set_from_pixbuf (GTK_IMAGE (pPreviewImage), pPreviewPixbuf);
-					gdk_pixbuf_unref (pPreviewPixbuf);
-					_pack_in_widget_box (pPreviewImage);
-				}
-			break ;
-			
 			case CAIRO_DOCK_WIDGET_FRAME :  // frame.
 			case CAIRO_DOCK_WIDGET_EXPANDER :  // frame dans un expander.
 				if (pAuthorizedValuesList == NULL)

=== modified file 'src/gldit/cairo-dock-gui-factory.h'
--- src/gldit/cairo-dock-gui-factory.h	2012-02-21 00:43:57 +0000
+++ src/gldit/cairo-dock-gui-factory.h	2012-03-12 19:47:19 +0000
@@ -142,6 +142,8 @@
 	
 	/// an empty GtkContainer, in case you need to build custom widgets.
 	CAIRO_DOCK_WIDGET_EMPTY_WIDGET='_',
+	/// an empty GtkContainer, the same but using full available space.
+	CAIRO_DOCK_WIDGET_EMPTY_FULL='<',
 	/// a simple text label.
 	CAIRO_DOCK_WIDGET_TEXT_LABEL='>',
 	/// a simple text label.


Follow ups