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

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 946
Date       : Wed May  3 16:14:07 BST 2006

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

1) Enable PageID for tabbed dialog messages, 2) Allow retrieval of tab names from string-table, 3) Enable more export dialog functionality


Diff:
Index: Trunk/XaraLX/Kernel/bmapprev.cpp
===================================================================
--- Trunk/XaraLX/Kernel/bmapprev.cpp	(revision 945)
+++ Trunk/XaraLX/Kernel/bmapprev.cpp	(revision 946)
@@ -3056,7 +3056,8 @@
 
 	HandleBitmapSizeDPIChange();
 	
-	if (m_pPreviewDlg )
+PORTNOTE("other", "Remove preview usage" )
+//	if (m_pPreviewDlg )
 	{
 		m_LockSizeUpdates = TRUE;
 		WinRect wr = GetExportSize(m_pExportOptions->GetDPI());
@@ -3105,7 +3106,7 @@
 
 void BmapPrevDlg::HandleBrowserPreviewTabMsg(DialogMsg* Msg)
 {
-PORTNOTETRACE("other","BmapPrevDlg::BrowserPreviewGetOptions - Do nothing");
+PORTNOTETRACE("other","BmapPrevDlg::HandleBrowserPreviewTabMsg - Do nothing");
 #if !defined(EXCLUDE_FROM_XARALX)
 	CDlgResID PageID = GetCurrentPageID();	// Get currently selected Tab id
 	TalkToPage(_R(IDD_TBROWSER));  // The Coords Page identifier
Index: Trunk/XaraLX/wxOil/xrc/EN/bmapprev.xrc
===================================================================
--- Trunk/XaraLX/wxOil/xrc/EN/bmapprev.xrc	(revision 945)
+++ Trunk/XaraLX/wxOil/xrc/EN/bmapprev.xrc	(revision 946)
@@ -76,8 +76,6 @@
 			 <pos>228,39d</pos> <size>99,8d</size>
 			<label>Minimise visible anti-aliasing</label>
 		</object>
-		<title>Bitmap Size</title>
-		<tooltip>Bitmap Size</tooltip>
 	</object>
 	<object class="wxPanel" name="IDD_TIMAPOPTIONS">
 			 <pos>0,0d</pos> <size>370,90d</size>
@@ -148,8 +146,6 @@
 			 <pos>81,72d</pos> <size>98,8d</size>
 			<label>Current drawing must be saved</label>
 		</object>
-		<title>Image Map</title>
-		<tooltip>Image Map</tooltip>
 	</object>
 	<object class="wxPanel" name="IDD_TBROWSER">
 			 <pos>0,0d</pos> <size>370,90d</size>
@@ -194,8 +190,6 @@
 			 <pos>240,30d</pos> <size>112,10d</size>
 			<label>Show all previews in browser</label>
 		</object>
-		<title>Browser Preview</title>
-		<tooltip>Browser Preview</tooltip>
 	</object>
 	<object class="wxPanel" name="IDD_TBITMAPOPTIONS">
 			 <pos>0,0d</pos> <size>370,90d</size>
@@ -227,8 +221,6 @@
 			 <pos>6,34d</pos> <size>178,10d</size>
 			<label>Y</label>
 		</object>
-		<title>Options</title>
-		<tooltip>Options</tooltip>
 	</object>
 	<object class="wxPanel" name="IDD_PALETTE_TAB">
 			 <pos>0,0d</pos> <size>370,90d</size>
Index: Trunk/XaraLX/wxOil/xrc/EN/bmapprev-strings.xrc
===================================================================
--- Trunk/XaraLX/wxOil/xrc/EN/bmapprev-strings.xrc	(revision 945)
+++ Trunk/XaraLX/wxOil/xrc/EN/bmapprev-strings.xrc	(revision 946)
@@ -6,6 +6,30 @@
 			<orient>wxVERTICAL</orient>
 			<object class="sizeritem">
 				<flag>wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE</flag>
+				<object class="wxStaticText" name="IDD_TBITMAPSIZE">
+					<label>Bitmap Size</label>
+				</object>
+			</object>
+			<object class="sizeritem">
+				<flag>wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE</flag>
+				<object class="wxStaticText" name="IDD_TIMAPOPTIONS">
+					<label>Image Map</label>
+				</object>
+			</object>
+			<object class="sizeritem">
+				<flag>wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE</flag>
+				<object class="wxStaticText" name="IDD_TBROWSER">
+					<label>Browser Preview</label>
+				</object>
+			</object>
+			<object class="sizeritem">
+				<flag>wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE</flag>
+				<object class="wxStaticText" name="IDD_TBITMAPOPTIONS">
+					<label>Options</label>
+				</object>
+			</object>
+			<object class="sizeritem">
+				<flag>wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE</flag>
 				<object class="wxStaticText" name="IDS_ADVANCED_OPTIONS">
 					<label>#1%s Options</label>
 				</object>
Index: Trunk/XaraLX/wxOil/dlgmgr.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dlgmgr.cpp	(revision 945)
+++ Trunk/XaraLX/wxOil/dlgmgr.cpp	(revision 946)
@@ -766,6 +766,28 @@
 	wxWindow * pGadget = NULL;
 	if (id) pGadget = GetGadget(pEvtHandler->pwxWindow, id);
 
+	// Try and find-out whether our control is part of a tabbed dialog page
+	if( NULL != pGadget )
+	{
+		// pEvtHandler->pwxWindow maybe our immediate wxPanel\wxDialog, but won't
+		// be in case of tabbed dialog
+		wxWindow*	pDialog = pGadget->GetParent();
+		while( NULL != pDialog && !pDialog->IsKindOf( CLASSINFO(wxDialog) ) && 
+			!pDialog->IsKindOf( CLASSINFO(wxPanel) ) )
+		{
+			pDialog = pDialog->GetParent();
+		}
+
+		// Could this be part of a tabbed dialog?
+		if( NULL != pDialog && pDialog->IsKindOf( CLASSINFO(wxPanel) ) )
+		{
+			// A parent of type wxBookCtrlBase would synch it
+			wxWindow *pDialogParent = pDialog->GetParent();
+			if( NULL != pDialogParent && pDialogParent->IsKindOf( CLASSINFO(wxBookCtrlBase) ) )
+				PageID = pDialog->GetId();
+		}
+	}
+
 	// Make up a default message
 	DialogMsg msg(pEvtHandler->pwxWindow, DIM_NONE, id, DlgMsgParam, PageID);
 
@@ -900,6 +922,13 @@
 		msg.DlgMsgParam = NO_COMMIT;
 		HandleMessage = TRUE;
 	}
+	else
+	if( EventType == wxEVT_COMMAND_TEXT_UPDATED && 	// only with WXWIN_COMPATIBILITY_EVENT_TYPES
+		pGadget == wxWindow::FindFocus() )
+	{
+		msg.DlgMsg = DIM_TEXT_CHANGED;
+		HandleMessage = TRUE;
+	}
 	else if(
 		(EventType == wxEVT_COMMAND_TEXT_ENTER) ||
 		FALSE)
@@ -6250,9 +6279,19 @@
 	ERROR1IF(pNewPage == NULL, FALSE, _R(IDS_OUT_OF_MEMORY));
 
 	wxString Title = pNewPage->GetTitle();
-	if (Title.IsEmpty()) Title = pNewPage->GetLabel(); // because wxPanel doesn't seem to support a title
-	if (Title.IsEmpty())
+	if (Title.IsEmpty()) 
+		Title = pNewPage->GetLabel(); // because wxPanel doesn't seem to support a title
+	if( Title.IsEmpty() )
 	{
+		PCTSTR	pszStringLookup = CamResource::GetTextFail( DialogResID );
+		if( NULL != pszStringLookup )
+		{
+			Title = pszStringLookup;
+			TRACEUSER( "jlh92", _T("Page (FST) = \"%s\"
"), Title.c_str() );
+		}
+	}
+	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 = pNewPage->GetToolTip();


Xara