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

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 948
Date       : Wed May  3 17:18:37 BST 2006

Changed paths:
   M /Trunk/XaraLX/wxOil/dlgmgr.cpp
   M /Trunk/XaraLX/wxOil/xrc/EN/bmapprev-strings.xrc

Use <DialogName>_NAME to refer to tab dialog sheet names


Diff:
Index: Trunk/XaraLX/wxOil/xrc/EN/bmapprev-strings.xrc
===================================================================
--- Trunk/XaraLX/wxOil/xrc/EN/bmapprev-strings.xrc	(revision 947)
+++ Trunk/XaraLX/wxOil/xrc/EN/bmapprev-strings.xrc	(revision 948)
@@ -6,25 +6,25 @@
 			<orient>wxVERTICAL</orient>
 			<object class="sizeritem">
 				<flag>wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE</flag>
-				<object class="wxStaticText" name="IDD_TBITMAPSIZE">
+				<object class="wxStaticText" name="IDD_TBITMAPSIZE_NAME">
 					<label>Bitmap Size</label>
 				</object>
 			</object>
 			<object class="sizeritem">
 				<flag>wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE</flag>
-				<object class="wxStaticText" name="IDD_TIMAPOPTIONS">
+				<object class="wxStaticText" name="IDD_TIMAPOPTIONS_NAME">
 					<label>Image Map</label>
 				</object>
 			</object>
 			<object class="sizeritem">
 				<flag>wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE</flag>
-				<object class="wxStaticText" name="IDD_TBROWSER">
+				<object class="wxStaticText" name="IDD_TBROWSER_NAME">
 					<label>Browser Preview</label>
 				</object>
 			</object>
 			<object class="sizeritem">
 				<flag>wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE</flag>
-				<object class="wxStaticText" name="IDD_TBITMAPOPTIONS">
+				<object class="wxStaticText" name="IDD_TBITMAPOPTIONS_NAME">
 					<label>Options</label>
 				</object>
 			</object>
Index: Trunk/XaraLX/wxOil/dlgmgr.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dlgmgr.cpp	(revision 947)
+++ Trunk/XaraLX/wxOil/dlgmgr.cpp	(revision 948)
@@ -6257,12 +6257,14 @@
 
 	// We need to create a page object
 	// Because OurPropShtPage is derived from an MFC object we have to cope with exceptions
-	wxWindow* pNewPage;
+	wxWindow*	pNewPage;
+	wxString	ObjectName;
 	try
 	{
 		const TCHAR* pDialogName=CamResource::GetObjectNameFail( DialogResID );
 		ERROR1IF(pDialogName == NULL, FALSE, _R(IDE_CANNOT_CREATE_DIALOG));
 		TRACEUSER( "jlh92", _T("Cre tab %s
"), pDialogName );
+		ObjectName = pDialogName;
 
 		pNewPage = wxXmlResource::Get()->LoadPanel( pNoteBook, pDialogName );
 		ERROR1IF(pNewPage == NULL, FALSE, _R(IDE_CANNOT_CREATE_DIALOG));
@@ -6283,7 +6285,9 @@
 		Title = pNewPage->GetLabel(); // because wxPanel doesn't seem to support a title
 	if( Title.IsEmpty() )
 	{
-		PCTSTR	pszStringLookup = CamResource::GetTextFail( DialogResID );
+		ObjectName += _T("_NAME");
+		ResourceID	NameResID = CamResource::GetResourceID( PCTSTR(ObjectName) );
+		PCTSTR		pszStringLookup = CamResource::GetTextFail( NameResID );
 		if( NULL != pszStringLookup )
 		{
 			Title = pszStringLookup;


Xara