[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 829
Date       : Mon Apr 17 17:37:21 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/dialogop.h
   M /Trunk/XaraLX/Kernel/sgallery.h
   M /Trunk/XaraLX/Kernel/sgtree.cpp
   M /Trunk/XaraLX/Scripts/barconverter
   M /Trunk/XaraLX/wxOil/dlgmgr.cpp
   M /Trunk/XaraLX/wxOil/xrc/EN/xaralx-bars.xrc

Make Galleries dockable
Give Bars & galleries title bars, help & tool-tips
Make galleries closable
Make galleries resize right
Fix redraw on resize crash


Diff:
Index: Trunk/XaraLX/Kernel/sgtree.cpp
===================================================================
--- Trunk/XaraLX/Kernel/sgtree.cpp	(revision 828)
+++ Trunk/XaraLX/Kernel/sgtree.cpp	(revision 829)
@@ -3184,14 +3184,19 @@
 					pRender->SetFillColour(RedrawInfo->Background);
 					pRender->SetLineColour(COLOUR_TRANS);	//RedrawInfo->Background);
 
-					// Fill entire display window background with bg colour
-					DocRect WindowBG(0, -ScrollExtent, MiscInfo->MaxWidth, 0);
-
+					// Work out height first to avoid ENSURE in DocRect ctor
+					INT32 height=ScrollExtent;
 					// Extend the rect if necessary to ensure entire window bg is filled
 					if (ScrollExtent < MiscInfo->WindowHeight)
-						WindowBG.lo.y = -MiscInfo->WindowHeight;
-					pRender->DrawRect(&WindowBG);
+						height = MiscInfo->WindowHeight;
 
+					if ((height>=0) && (MiscInfo->MaxWidth>=0))
+					{
+						// Fill entire display window background with bg colour
+						DocRect WindowBG(0, -height, MiscInfo->MaxWidth, 0);
+						pRender->DrawRect(&WindowBG);
+					}
+
 					StopRendering(RedrawInfo, MiscInfo);
 				}
 				else
Index: Trunk/XaraLX/Kernel/sgallery.h
===================================================================
--- Trunk/XaraLX/Kernel/sgallery.h	(revision 828)
+++ Trunk/XaraLX/Kernel/sgallery.h	(revision 829)
@@ -638,7 +638,8 @@
 	static INT32		UseFixedColourSet;		// TRUE (default) to override Windows colours
 
 public:
-	virtual BOOL IsABar() {return FALSE; } // For now, claim not to be a bar so we get sized right
+	virtual BOOL IsABar() {return FALSE; } 		// We are not a bar
+	virtual BOOL IsAGallery() {return TRUE; }	// We are a gallery
 };
 
 
Index: Trunk/XaraLX/Kernel/dialogop.h
===================================================================
--- Trunk/XaraLX/Kernel/dialogop.h	(revision 828)
+++ Trunk/XaraLX/Kernel/dialogop.h	(revision 829)
@@ -152,6 +152,7 @@
 			 INT32 OpeningPage = -1, CWindowID ParentWnd = NULL);
 
 	virtual BOOL IsABar() { return FALSE; }
+	virtual BOOL IsAGallery() {return FALSE; }
 	virtual BOOL IsVertical() { return FALSE; }
   			
 	// The create method reserves everything needed to guarantee that the dialog will 
Index: Trunk/XaraLX/Scripts/barconverter
===================================================================
--- Trunk/XaraLX/Scripts/barconverter	(revision 828)
+++ Trunk/XaraLX/Scripts/barconverter	(revision 829)
@@ -44,17 +44,17 @@
 
     my %tnamemap = (
 
-		   "IDD_BUTTBAR_GENERAL" => "General",
-		   "IDD_BUTTBAR_IMAGESETTING" => "Image Setting",
-		   "IDD_BUTTBAR_WINDOW" => "Window",
-		   "IDD_BUTTBAR_ARRANGE" => "Arrange",
-		   "IDD_BUTTBAR_EDIT" => "Edit",
-		   "IDD_BUTTBAR_FILE" => "File",
-		   "IDD_BUTTBAR_GALLERIES" => "Galleries",
-		   "IDD_BUTTBAR_STANDARD" => "Standard",
-		   "IDD_BUTTBAR_TOOLBAR" => "Toolbar",
-		   "IDD_BUTTBAR_ANIMATION" => "Animation",
-		   "IDD_BUTTBAR_FEATHER" => "Feather",
+		   "IDD_BUTTBAR_GENERAL" => "General Bar",
+		   "IDD_BUTTBAR_IMAGESETTING" => "Image Setting Bar",
+		   "IDD_BUTTBAR_WINDOW" => "Window Bar",
+		   "IDD_BUTTBAR_ARRANGE" => "Arrange Bar",
+		   "IDD_BUTTBAR_EDIT" => "Edit Bar",
+		   "IDD_BUTTBAR_FILE" => "File Bar",
+		   "IDD_BUTTBAR_GALLERIES" => "Galleries Bar",
+		   "IDD_BUTTBAR_STANDARD" => "Standard Bar",
+		   "IDD_BUTTBAR_TOOLBAR" => "Toolbar Bar",
+		   "IDD_BUTTBAR_ANIMATION" => "Animation Bar",
+		   "IDD_BUTTBAR_FEATHER" => "Feather Bar",
 		   "IDD_SELECTORINFO" => "Selector tool info bar",
 		   "IDD_ZOOMINFO" => "Zoom tool info bar",
 		   "IDD_PUSHINFO" => "Push tool info bar",
@@ -188,6 +188,8 @@
     print STDOUT $ddindent. "    <object class=\"wxPanel\" name=\"$name\">
";
     print STDOUT $ddindent. "        <label>$title</label>
";
     print STDOUT $ddindent. "        <title>$title</title>
";
+    print STDOUT $ddindent. "        <tooltip>$title</tooltip>
";
+    print STDOUT $ddindent. "        <help>$title</help>
";
     print STDOUT $ddindent. "        <object class=\"wxBoxSizer\">
";
     printf STDOUT $ddindent."            <orient>wx%s</orient>
", !IsVertical()?"HORIZONTAL":"VERTICAL";
 }
@@ -202,11 +204,15 @@
 {
     my $name = shift @_;
     my $title = MakeName($name);
-    print STDOUT $ddindent. "    <object class=\"wxDialog\" name=\"$name\">
";
+    print STDOUT $ddindent. "    <object class=\"wxPanel\" name=\"$name\">
";
     print STDOUT $ddindent. "        <label>$title</label>
";
     print STDOUT $ddindent. "        <title>$title</title>
";
-    print STDOUT $ddindent. "        <style>wxRESIZE_BORDER</style>
";
+    print STDOUT $ddindent. "        <tooltip>$title</tooltip>
";
+    print STDOUT $ddindent. "        <help>$title</help>
";
 
+# The following for wxDialog only
+#    print STDOUT $ddindent. "        <style>wxRESIZE_BORDER</style>
"; 
+
     print STDOUT $ddindent. "        <object class=\"wxBoxSizer\">
";
     print STDOUT $ddindent. "            <orient>wxVERTICAL</orient>
";
     print STDOUT $ddindent. "            <object class=\"sizeritem\">
";
Index: Trunk/XaraLX/wxOil/xrc/EN/xaralx-bars.xrc
===================================================================
--- Trunk/XaraLX/wxOil/xrc/EN/xaralx-bars.xrc	(revision 828)
+++ Trunk/XaraLX/wxOil/xrc/EN/xaralx-bars.xrc	(revision 829)
@@ -1,8 +1,10 @@
 <?xml version="1.0" ?>
 <resource>
     <object class="wxPanel" name="IDD_BUTTBAR_GENERAL">
-        <label>General</label>
-        <title>General</title>
+        <label>General Bar</label>
+        <title>General Bar</title>
+        <tooltip>General Bar</tooltip>
+        <help>General Bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -153,8 +155,10 @@
         </object>
     </object>
     <object class="wxPanel" name="IDD_BUTTBAR_IMAGESETTING">
-        <label>Image Setting</label>
-        <title>Image Setting</title>
+        <label>Image Setting Bar</label>
+        <title>Image Setting Bar</title>
+        <tooltip>Image Setting Bar</tooltip>
+        <help>Image Setting Bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -210,8 +214,10 @@
         </object>
     </object>
     <object class="wxPanel" name="IDD_BUTTBAR_WINDOW">
-        <label>Window</label>
-        <title>Window</title>
+        <label>Window Bar</label>
+        <title>Window Bar</title>
+        <tooltip>Window Bar</tooltip>
+        <help>Window Bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -360,8 +366,10 @@
         </object>
     </object>
     <object class="wxPanel" name="IDD_BUTTBAR_ARRANGE">
-        <label>Arrange</label>
-        <title>Arrange</title>
+        <label>Arrange Bar</label>
+        <title>Arrange Bar</title>
+        <tooltip>Arrange Bar</tooltip>
+        <help>Arrange Bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -538,8 +546,10 @@
         </object>
     </object>
     <object class="wxPanel" name="IDD_BUTTBAR_EDIT">
-        <label>Edit</label>
-        <title>Edit</title>
+        <label>Edit Bar</label>
+        <title>Edit Bar</title>
+        <tooltip>Edit Bar</tooltip>
+        <help>Edit Bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -651,8 +661,10 @@
         </object>
     </object>
     <object class="wxPanel" name="IDD_BUTTBAR_FILE">
-        <label>File</label>
-        <title>File</title>
+        <label>File Bar</label>
+        <title>File Bar</title>
+        <tooltip>File Bar</tooltip>
+        <help>File Bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -774,8 +786,10 @@
         </object>
     </object>
     <object class="wxPanel" name="IDD_BUTTBAR_GALLERIES">
-        <label>Galleries</label>
-        <title>Galleries</title>
+        <label>Galleries Bar</label>
+        <title>Galleries Bar</title>
+        <tooltip>Galleries Bar</tooltip>
+        <help>Galleries Bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -853,8 +867,10 @@
         </object>
     </object>
     <object class="wxPanel" name="IDD_BUTTBAR_STANDARD">
-        <label>Standard</label>
-        <title>Standard</title>
+        <label>Standard Bar</label>
+        <title>Standard Bar</title>
+        <tooltip>Standard Bar</tooltip>
+        <help>Standard Bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -1036,8 +1052,10 @@
         </object>
     </object>
     <object class="wxPanel" name="IDD_BUTTBAR_TOOLBAR">
-        <label>Toolbar</label>
-        <title>Toolbar</title>
+        <label>Toolbar Bar</label>
+        <title>Toolbar Bar</title>
+        <tooltip>Toolbar Bar</tooltip>
+        <help>Toolbar Bar</help>
         <object class="wxBoxSizer">
             <orient>wxVERTICAL</orient>
             <object class="sizeritem">
@@ -1187,8 +1205,10 @@
         </object>
     </object>
     <object class="wxPanel" name="IDD_BUTTBAR_ANIMATION">
-        <label>Animation</label>
-        <title>Animation</title>
+        <label>Animation Bar</label>
+        <title>Animation Bar</title>
+        <tooltip>Animation Bar</tooltip>
+        <help>Animation Bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -1292,8 +1312,10 @@
         </object>
     </object>
     <object class="wxPanel" name="IDD_BUTTBAR_FEATHER">
-        <label>Feather</label>
-        <title>Feather</title>
+        <label>Feather Bar</label>
+        <title>Feather Bar</title>
+        <tooltip>Feather Bar</tooltip>
+        <help>Feather Bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -1323,10 +1345,11 @@
             </object>
         </object>
     </object>
-    <object class="wxDialog" name="IDD_COLOURSGALLERY">
+    <object class="wxPanel" name="IDD_COLOURSGALLERY">
         <label>Colour gallery</label>
         <title>Colour gallery</title>
-        <style>wxRESIZE_BORDER</style>
+        <tooltip>Colour gallery</tooltip>
+        <help>Colour gallery</help>
         <object class="wxBoxSizer">
             <orient>wxVERTICAL</orient>
             <object class="sizeritem">
@@ -1562,10 +1585,11 @@
         </object>
         </object>
     </object>
-    <object class="wxDialog" name="IDD_LAYERSGALLERY">
+    <object class="wxPanel" name="IDD_LAYERSGALLERY">
         <label>Layer gallery</label>
         <title>Layer gallery</title>
-        <style>wxRESIZE_BORDER</style>
+        <tooltip>Layer gallery</tooltip>
+        <help>Layer gallery</help>
         <object class="wxBoxSizer">
             <orient>wxVERTICAL</orient>
             <object class="sizeritem">
@@ -1750,10 +1774,11 @@
         </object>
         </object>
     </object>
-    <object class="wxDialog" name="IDD_FRAMESGALLERY">
+    <object class="wxPanel" name="IDD_FRAMESGALLERY">
         <label>Frame gallery</label>
         <title>Frame gallery</title>
-        <style>wxRESIZE_BORDER</style>
+        <tooltip>Frame gallery</tooltip>
+        <help>Frame gallery</help>
         <object class="wxBoxSizer">
             <orient>wxVERTICAL</orient>
             <object class="sizeritem">
@@ -1935,10 +1960,11 @@
         </object>
         </object>
     </object>
-    <object class="wxDialog" name="IDD_BITMAPSGALLERY">
+    <object class="wxPanel" name="IDD_BITMAPSGALLERY">
         <label>Bitmap gallery</label>
         <title>Bitmap gallery</title>
-        <style>wxRESIZE_BORDER</style>
+        <tooltip>Bitmap gallery</tooltip>
+        <help>Bitmap gallery</help>
         <object class="wxBoxSizer">
             <orient>wxVERTICAL</orient>
             <object class="sizeritem">
@@ -2241,10 +2267,11 @@
         </object>
         </object>
     </object>
-    <object class="wxDialog" name="IDD_LINESGALLERY">
+    <object class="wxPanel" name="IDD_LINESGALLERY">
         <label>Line gallery</label>
         <title>Line gallery</title>
-        <style>wxRESIZE_BORDER</style>
+        <tooltip>Line gallery</tooltip>
+        <help>Line gallery</help>
         <object class="wxBoxSizer">
             <orient>wxVERTICAL</orient>
             <object class="sizeritem">
@@ -2355,10 +2382,11 @@
         </object>
         </object>
     </object>
-    <object class="wxDialog" name="IDD_NAMESGALLERY">
+    <object class="wxPanel" name="IDD_NAMESGALLERY">
         <label>Name gallery</label>
         <title>Name gallery</title>
-        <style>wxRESIZE_BORDER</style>
+        <tooltip>Name gallery</tooltip>
+        <help>Name gallery</help>
         <object class="wxBoxSizer">
             <orient>wxVERTICAL</orient>
             <object class="sizeritem">
@@ -2618,10 +2646,11 @@
         </object>
         </object>
     </object>
-    <object class="wxDialog" name="FontsSGallery">
+    <object class="wxPanel" name="FontsSGallery">
         <label>This bar should not be called FontsSGallery</label>
         <title>This bar should not be called FontsSGallery</title>
-        <style>wxRESIZE_BORDER</style>
+        <tooltip>This bar should not be called FontsSGallery</tooltip>
+        <help>This bar should not be called FontsSGallery</help>
         <object class="wxBoxSizer">
             <orient>wxVERTICAL</orient>
             <object class="sizeritem">
@@ -2857,10 +2886,11 @@
         </object>
         </object>
     </object>
-    <object class="wxDialog" name="IDD_LIBCLIPARTSGALLERY">
+    <object class="wxPanel" name="IDD_LIBCLIPARTSGALLERY">
         <label>Clipart gallery</label>
         <title>Clipart gallery</title>
-        <style>wxRESIZE_BORDER</style>
+        <tooltip>Clipart gallery</tooltip>
+        <help>Clipart gallery</help>
         <object class="wxBoxSizer">
             <orient>wxVERTICAL</orient>
             <object class="sizeritem">
@@ -3121,10 +3151,11 @@
         </object>
         </object>
     </object>
-    <object class="wxDialog" name="IDD_LIBFILLSSGALLERY">
+    <object class="wxPanel" name="IDD_LIBFILLSSGALLERY">
         <label>Fills gallery</label>
         <title>Fills gallery</title>
-        <style>wxRESIZE_BORDER</style>
+        <tooltip>Fills gallery</tooltip>
+        <help>Fills gallery</help>
         <object class="wxBoxSizer">
             <orient>wxVERTICAL</orient>
             <object class="sizeritem">
@@ -3383,6 +3414,8 @@
     <object class="wxPanel" name="IDD_PUSHINFO">
         <label>Push tool info bar</label>
         <title>Push tool info bar</title>
+        <tooltip>Push tool info bar</tooltip>
+        <help>Push tool info bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -3444,6 +3477,8 @@
     <object class="wxPanel" name="IDD_ZOOMINFO">
         <label>Zoom tool info bar</label>
         <title>Zoom tool info bar</title>
+        <tooltip>Zoom tool info bar</tooltip>
+        <help>Zoom tool info bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -3505,6 +3540,8 @@
     <object class="wxPanel" name="IDD_REGSHAPETOOLBAR">
         <label>QuickShape tool info bar</label>
         <title>QuickShape tool info bar</title>
+        <tooltip>QuickShape tool info bar</tooltip>
+        <help>QuickShape tool info bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -3772,6 +3809,8 @@
     <object class="wxPanel" name="IDD_RECTTOOLBAR">
         <label>Rectangle tool info bar</label>
         <title>Rectangle tool info bar</title>
+        <tooltip>Rectangle tool info bar</tooltip>
+        <help>Rectangle tool info bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -3970,6 +4009,8 @@
     <object class="wxPanel" name="IDD_ELLIPSETOOLBAR">
         <label>Ellipse tool info bar</label>
         <title>Ellipse tool info bar</title>
+        <tooltip>Ellipse tool info bar</tooltip>
+        <help>Ellipse tool info bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -4154,6 +4195,8 @@
     <object class="wxPanel" name="IDD_GRADFILLDLG">
         <label>Graduated fill tool info bar</label>
         <title>Graduated fill tool info bar</title>
+        <tooltip>Graduated fill tool info bar</tooltip>
+        <help>Graduated fill tool info bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -4283,6 +4326,8 @@
     <object class="wxPanel" name="IDD_TRANFILLDLG">
         <label>Transparent fill tool info bar</label>
         <title>Transparent fill tool info bar</title>
+        <tooltip>Transparent fill tool info bar</tooltip>
+        <help>Transparent fill tool info bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -4425,6 +4470,8 @@
     <object class="wxPanel" name="IDD_BEZTOOLBAR">
         <label>Shape editor tool info bar</label>
         <title>Shape editor tool info bar</title>
+        <tooltip>Shape editor tool info bar</tooltip>
+        <help>Shape editor tool info bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -5035,6 +5082,8 @@
     <object class="wxPanel" name="IDD_SELECTORINFO">
         <label>Selector tool info bar</label>
         <title>Selector tool info bar</title>
+        <tooltip>Selector tool info bar</tooltip>
+        <help>Selector tool info bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -5668,6 +5717,8 @@
     <object class="wxPanel" name="IDD_FREEHANDTOOL">
         <label>Freehand tool info bar</label>
         <title>Freehand tool info bar</title>
+        <tooltip>Freehand tool info bar</tooltip>
+        <help>Freehand tool info bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -5797,6 +5848,8 @@
     <object class="wxPanel" name="IDD_BLENDTOOLBAR">
         <label>Blend tool info bar</label>
         <title>Blend tool info bar</title>
+        <tooltip>Blend tool info bar</tooltip>
+        <help>Blend tool info bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -5958,6 +6011,8 @@
     <object class="wxPanel" name="IDD_MOULDTOOLBAR">
         <label>Mould tool info bar</label>
         <title>Mould tool info bar</title>
+        <tooltip>Mould tool info bar</tooltip>
+        <help>Mould tool info bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -6136,6 +6191,8 @@
     <object class="wxPanel" name="IDD_CONTOURINFOBAR">
         <label>Contour tool info bar</label>
         <title>Contour tool info bar</title>
+        <tooltip>Contour tool info bar</tooltip>
+        <help>Contour tool info bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -6342,6 +6399,8 @@
     <object class="wxPanel" name="IDD_BEVELINFOBAR">
         <label>Bevel tool info bar</label>
         <title>Bevel tool info bar</title>
+        <tooltip>Bevel tool info bar</tooltip>
+        <help>Bevel tool info bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -6471,6 +6530,8 @@
     <object class="wxPanel" name="IDD_TEXT_INFO_BAR">
         <label>Text tool info bar</label>
         <title>Text tool info bar</title>
+        <tooltip>Text tool info bar</tooltip>
+        <help>Text tool info bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
@@ -6837,6 +6898,8 @@
     <object class="wxPanel" name="IDD_PENTOOLBAR">
         <label>Pen tool info bar</label>
         <title>Pen tool info bar</title>
+        <tooltip>Pen tool info bar</tooltip>
+        <help>Pen tool info bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="spacer">
@@ -6849,6 +6912,8 @@
     <object class="wxPanel" name="IDD_SOFTSHADOWTOOLBAR">
         <label>Shadow tool info bar</label>
         <title>Shadow tool info bar</title>
+        <tooltip>Shadow tool info bar</tooltip>
+        <help>Shadow tool info bar</help>
         <object class="wxBoxSizer">
             <orient>wxHORIZONTAL</orient>
             <object class="sizeritem">
Index: Trunk/XaraLX/wxOil/dlgmgr.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dlgmgr.cpp	(revision 828)
+++ Trunk/XaraLX/wxOil/dlgmgr.cpp	(revision 829)
@@ -98,6 +98,8 @@
 
 // Implementation of the DialogManager class (bodge central)
 
+#include <wx/tooltip.h>
+
 // Include files
 #include "camtypes.h"
 #include "dlgmgr.h"
@@ -266,11 +268,11 @@
 	ERRORIF(!DlgOp->pEvtHandler || !DlgOp->pEvtHandler->pDialogOp, FALSE, _R(IDE_CANNOT_CREATE_DIALOG));
 
 	BOOL wxAUImanaged = FALSE;
-	if ( DlgOp->IsABar() )
+	if ( DlgOp->IsABar() || DlgOp->IsAGallery() )
 	{
 		BOOL modal = DlgOp->IsModal();
 		ERROR2IF(modal, FALSE, "Attempting to create a wxAUImanaged Dialog that is modal");
-		// They wanted a bar. Well, the only difference to us is we let wxAUI manage it.
+		// They wanted a bar. Well, the main difference to us is we let wxAUI manage it.
 		wxAUImanaged = TRUE;
 	}
 
@@ -332,14 +334,22 @@
 		// of stuff to be specified. Or try and retrieve it from the DialogBarOp or similar. Anyway, for now
 		// give it some default parameters
 		wxPaneInfo paneinfo;
-		paneinfo.ToolbarPane().Fixed().DestroyOnClose(FALSE);
-		if (DlgOp->IsVertical())
+		if (DlgOp->IsABar())
 		{
-			paneinfo.Left().Layer(0).GripperTop().TopDockable(FALSE).BottomDockable(FALSE);
+			paneinfo.ToolbarPane().Fixed().DestroyOnClose(FALSE);
+			if (DlgOp->IsVertical())
+			{
+				paneinfo.Left().Layer(0).GripperTop().TopDockable(FALSE).BottomDockable(FALSE);
+			}
+			else
+			{
+				paneinfo.Top().Layer(1).Row(2).LeftDockable(FALSE).RightDockable(FALSE);
+			}
 		}
 		else
 		{
-			paneinfo.Top().Layer(1).Row(2).LeftDockable(FALSE).RightDockable(FALSE);
+			paneinfo.DestroyOnClose(FALSE);
+			paneinfo.Layer(3).GripperTop().TopDockable(FALSE).BottomDockable(FALSE).Float();
 		}
 
 		if (DlgOp->IsKindOf(CC_RUNTIME_CLASS(InformationBarOp)))
@@ -351,7 +361,15 @@
 
 		wxString Title = pDialogWnd->GetTitle();
 		if (Title.IsEmpty()) Title = pDialogWnd->GetLabel(); // because wxPanel doesn't seem to support a title
-		if (Title.IsEmpty()) Title = wxString(CamResource::GetText(_R(IDS_ANONYMOUSBARTITLE)));
+		if (Title.IsEmpty())
+		{
+			// Finally, in desperation, we (mis-)use the tooltip string because now the wx folks have removed
+			// the label, even though it's needed for accessibility. Aarrghh
+			wxToolTip* pTip = pDialogWnd->GetToolTip();
+			if (pTip) Title=pTip->GetTip();
+		}
+		if (Title.IsEmpty())
+			 Title = wxString(CamResource::GetText(_R(IDS_ANONYMOUSBARTITLE)));
 		CCamFrame::GetFrameManager()->AddPane(pDialogWnd, paneinfo.
 			Name(pDialogName).Caption(Title).
 			PinButton(TRUE));


Xara