[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : alex
Repository : xara
Revision : 930
Date : Tue May 2 13:25:59 BST 2006
Changed paths:
M /Trunk/XaraLX/Kernel/app.h
M /Trunk/XaraLX/Kernel/appprefs.cpp
M /Trunk/XaraLX/Kernel/appprefs.h
M /Trunk/XaraLX/Kernel/htmlexp.cpp
M /Trunk/XaraLX/Kernel/ngscan.cpp
M /Trunk/XaraLX/Kernel/optsedit.cpp
M /Trunk/XaraLX/Kernel/optsgrid.cpp
M /Trunk/XaraLX/Kernel/optsgrid.h
M /Trunk/XaraLX/Kernel/optsmisc.cpp
M /Trunk/XaraLX/Kernel/optspage.cpp
M /Trunk/XaraLX/Kernel/optspntr.cpp
M /Trunk/XaraLX/Kernel/optstune.cpp
M /Trunk/XaraLX/Kernel/optsundo.cpp
M /Trunk/XaraLX/Kernel/optsunit.cpp
M /Trunk/XaraLX/Kernel/optsview.cpp
M /Trunk/XaraLX/Kernel/pagesize.cpp
M /Trunk/XaraLX/Kernel/pagesize.h
M /Trunk/XaraLX/Kernel/prefs.cpp
M /Trunk/XaraLX/Kernel/prefs.h
M /Trunk/XaraLX/Kernel/radio.cpp
M /Trunk/XaraLX/Scripts/rc2xml.pl
Initial check-in of options stuff. Not compiled in yet.
Diff:
Index: Trunk/XaraLX/Kernel/optspage.cpp
===================================================================
--- Trunk/XaraLX/Kernel/optspage.cpp (revision 929)
+++ Trunk/XaraLX/Kernel/optspage.cpp (revision 930)
@@ -304,8 +304,8 @@
// Ok has been pressed so take the values from this section of the dialog box
BOOL Valid=0; // Flag for validity of value
- BOOL State=0; // Flag for state of button/switch
- BOOL SetOk=0; // Preference value set ok
+// BOOL State=0; // Flag for state of button/switch
+// BOOL SetOk=0; // Preference value set ok
@@ -402,7 +402,7 @@
MILLIPOINT MaxPageMargin = MaxPageDimension;
Margin = pPrefsDlg->GetUnitGadgetValue(_R(IDC_OPTS_MARGIN), CurrentPageUnits,
MinPageDimension, MaxPageMargin,
- NULL, &Valid);
+ 0, &Valid);
if (Margin < 0 || Margin >= MaxPageDimension) // ignore valid as it will be false
{
InformError(_R(IDE_OPTS_INVALIDMARGIN));
@@ -545,7 +545,7 @@
// is correct.
String_256 DocumentName(_R(IDT_OPTS_PAGE_INFO));
DocumentName += *GetDocumentName();
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), &DocumentName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), DocumentName);
// Only update if we are not already grey
if (GreyStatus == TRUE)
@@ -587,7 +587,7 @@
// is correct.
String_256 DocumentName(_R(IDT_OPTS_PAGE_INFO));
DocumentName += *GetDocumentName();
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), &DocumentName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), DocumentName);
// Only update if we are not already ungrey
if (GreyStatus == FALSE)
@@ -684,7 +684,7 @@
// is correct.
String_256 DocName(_R(IDT_OPTS_PAGE_INFO));
DocName += *DocumentName;
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), &DocName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), DocName);
// All units work off the selected document and so we must do nothing if there is no
@@ -806,55 +806,50 @@
OptionsTabs::SetApplyNowState(TRUE);
// WEBSTER-ranbirr-13/11/96
#ifndef WEBSTER
- switch (Msg->GadgetID)
+ if (Msg->GadgetID == _R(IDC_OPTS_SIZELIST))
{
- case _R(IDC_OPTS_SIZELIST):
- // Get the currently selected item and set up the other fields accordingly
- INT32 PageSizeSelected;
- PageSizeSelected = pPrefsDlg->GetSelectedValueIndex(_R(IDC_OPTS_SIZELIST));
- // Get whether we are in Portrait or Landscape mode
- BOOL Portrait;
- BOOL Valid;
- Portrait = pPrefsDlg->GetLongGadgetValue(_R(IDC_OPTS_PORTRAIT), 0, 1, 0, &Valid);
- HandlePageList(PageSizeSelected, Portrait);
- break;
+ // Get the currently selected item and set up the other fields accordingly
+ INT32 PageSizeSelected;
+ PageSizeSelected = pPrefsDlg->GetSelectedValueIndex(_R(IDC_OPTS_SIZELIST));
+ // Get whether we are in Portrait or Landscape mode
+ BOOL Portrait;
+ BOOL Valid;
+ Portrait = pPrefsDlg->GetLongGadgetValue(_R(IDC_OPTS_PORTRAIT), 0, 1, 0, &Valid);
+ HandlePageList(PageSizeSelected, Portrait);
+ break;
}
- break;
case DIM_LFT_BN_CLICKED:
OptionsTabs::SetApplyNowState(TRUE);
- switch (Msg->GadgetID)
- {
+ if (FALSE) {}
// WEBSTER-ranbirr-13/11/96
#ifndef WEBSTER
- case _R(IDC_OPTS_PORTRAIT):
- case _R(IDC_OPTS_LANDSCAPE):
- // Portrait landscape buttons toggle the width/height fields
- HandlePortraitLandscape();
- break;
+ else if ((Msg->GadgetID == _R(IDC_OPTS_PORTRAIT)) || (Msg->GadgetID == _R(IDC_OPTS_LANDSCAPE)))
+ // Portrait landscape buttons toggle the width/height fields
+ HandlePortraitLandscape();
#endif // Webster
-
- case _R(IDC_OPTS_BLEEDSWITCH):
- // Bleed switch enables or disables the bleed size field
- BOOL BleedEnabled;
- BOOL Valid;
- BleedEnabled = pPrefsDlg->GetLongGadgetValue(_R(IDC_OPTS_BLEEDSWITCH), 0, 1, 0, &Valid);
- if (BleedEnabled)
- {
- pPrefsDlg->EnableGadget(_R(IDC_OPTS_BLEED), TRUE);
- pPrefsDlg->EnableGadget(_R(IDC_OPTS_BLEEDTXT), TRUE);
- }
- else
- {
- pPrefsDlg->EnableGadget(_R(IDC_OPTS_BLEED), FALSE);
- pPrefsDlg->EnableGadget(_R(IDC_OPTS_BLEEDTXT), FALSE);
- }
- break;
+ else if (Msg->GadgetID == _R(IDC_OPTS_BLEEDSWITCH))
+ {
+ // Bleed switch enables or disables the bleed size field
+ BOOL BleedEnabled;
+ BOOL Valid;
+ BleedEnabled = pPrefsDlg->GetLongGadgetValue(_R(IDC_OPTS_BLEEDSWITCH), 0, 1, 0, &Valid);
+ if (BleedEnabled)
+ {
+ pPrefsDlg->EnableGadget(_R(IDC_OPTS_BLEED), TRUE);
+ pPrefsDlg->EnableGadget(_R(IDC_OPTS_BLEEDTXT), TRUE);
+ }
+ else
+ {
+ pPrefsDlg->EnableGadget(_R(IDC_OPTS_BLEED), FALSE);
+ pPrefsDlg->EnableGadget(_R(IDC_OPTS_BLEEDTXT), FALSE);
+ }
}
- break;
#endif //webster
case DIM_TEXT_CHANGED:
OptionsTabs::SetApplyNowState(TRUE);
break;
+ default:
+ break;
}
return TRUE;
@@ -883,7 +878,7 @@
ERROR2IF(pPrefsDlg == NULL,FALSE,"PageTab::InitSection called with no dialog pointer");
ERROR2IF(AppPrefsDlg::pPageSizesList == NULL,FALSE,"PageTab::InitSection called with list of page sizes");
- BOOL ok = TRUE; // Flag for whether value set up ok
+// BOOL ok = TRUE; // Flag for whether value set up ok
// We have an uninitialised page sizes list, so flag that before we have a chance to exit
pPrefsDlg->DeleteAllValues(_R(IDC_OPTS_SIZELIST));
@@ -896,7 +891,7 @@
// is correct.
String_256 DocumentName(_R(IDT_OPTS_PAGE_INFO));
DocumentName += *GetDocumentName();
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), &DocumentName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), DocumentName);
// All units work off the selected document and so we must do nothing if there is no
@@ -946,7 +941,7 @@
// Handle everything that we do not know as a CUSTOM setting.
// WEBSTER-ranbirr-13/11/96
#ifndef WEBSTER
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_SIZELIST), &String_32(_R(IDN_PAGESIZE_CUSTOM)));
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_SIZELIST), String_32(_R(IDN_PAGESIZE_CUSTOM)));
#endif //webster
// Now go through the defined list
@@ -958,7 +953,7 @@
String_32 *pPageName = pPageSize->GetPageName();
// WEBSTER-ranbirr-13/11/96
#ifndef WEBSTER
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_SIZELIST), pPageName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_SIZELIST), *pPageName);
#endif //webster
// skip to the next item, if there is one
pPageSize = (PageSize*) AppPrefsDlg::pPageSizesList->GetNextPageSize(pPageSize);
@@ -1315,8 +1310,8 @@
// The dialog handler should have already set up the class variables pDocument and pSpread.
// We will check that they are not null.
// For now, get details on 1st page of spread 1
- ERROR2IF(pDocument == NULL,FALSE,"PageTab::GetSizeOfPage no selected document")
- ERROR2IF(pSpread == NULL,FALSE,"PageTab::GetSizeOfPage no spread to work on")
+ ERROR2IF(pDocument == NULL,FALSE,"PageTab::GetSizeOfPage no selected document");
+ ERROR2IF(pSpread == NULL,FALSE,"PageTab::GetSizeOfPage no spread to work on");
// Set up some interim variables
MILLIPOINT PageWidth = *Width;
@@ -1458,13 +1453,13 @@
BOOL PageTab::InvokeResize(PageResizeInfo *pParam)
{
- ERROR2IF(pParam==NULL,FALSE,"PageTab::InvokeResize() no pParam supplied")
+ ERROR2IF(pParam==NULL,FALSE,"PageTab::InvokeResize() no pParam supplied");
// For now, get details on 1st page of spread 1
// The dialog handler should have already set up the class variables pDocument and pSpread.
// We will check that they are not null.
- ERROR2IF(pDocument==NULL,FALSE,"PageTab::InvokeResize() no selected document")
- ERROR2IF( pSpread==NULL,FALSE,"PageTab::InvokeResize() no spread to work on")
+ ERROR2IF(pDocument==NULL,FALSE,"PageTab::InvokeResize() no selected document");
+ ERROR2IF( pSpread==NULL,FALSE,"PageTab::InvokeResize() no spread to work on");
// Only change the page size/layout if something has changed
// If the user has changed anything then warn them that nothing will happen
@@ -1544,15 +1539,15 @@
BOOL PageTab::InvokeResizeAndCentre(PageResizeInfo *pParam)
{
- ERROR2IF(pParam==NULL,FALSE,"PageTab::InvokeResizeAndCentre() no pParam supplied")
+ ERROR2IF(pParam==NULL,FALSE,"PageTab::InvokeResizeAndCentre() no pParam supplied");
// The dialog handler should have already set up the class variables pDocument and pSpread.
// We will check that they are not null.
- ERROR2IF(pDocument==NULL,FALSE,"PageTab::InvokeResizeAndCentre() no selected document")
- ERROR2IF( pSpread==NULL,FALSE,"PageTab::InvokeResizeAndCentre() no spread to work on")
+ ERROR2IF(pDocument==NULL,FALSE,"PageTab::InvokeResizeAndCentre() no selected document");
+ ERROR2IF( pSpread==NULL,FALSE,"PageTab::InvokeResizeAndCentre() no spread to work on");
// Flag we need to make a change
- BOOL ChangeRequired = TRUE;
+// BOOL ChangeRequired = TRUE;
// Make these the new defaults
OldPageWidth = pParam->Width;
@@ -1860,7 +1855,7 @@
// page tab.
pParentDoc->ForceRedraw();
BROADCAST_TO_ALL(OptionsChangingMsg(pParentDoc,
- OptionsChangingMsg::OptionsState::PAGESIZEHASCHANGED));
+ OptionsChangingMsg::PAGESIZEHASCHANGED));
}
// If we reached here then everything has happened ok and we can just end the
@@ -2093,7 +2088,7 @@
BROADCAST_TO_ALL(OptionsChangingMsg(
pParentDoc,
- OptionsChangingMsg::OptionsState::NEWPAGESIZE
+ OptionsChangingMsg::NEWPAGESIZE
)
);
}
Index: Trunk/XaraLX/Kernel/appprefs.cpp
===================================================================
--- Trunk/XaraLX/Kernel/appprefs.cpp (revision 929)
+++ Trunk/XaraLX/Kernel/appprefs.cpp (revision 930)
@@ -193,7 +193,7 @@
DialogTabOp *OptionsTabs::pPrefsDlg = NULL; // link to application options dialog class
List OptionsTabs::OptionsTabsList; // The global list of installed options tabs.
UnitType OptionsTabs::CurrentPageUnits = NOTYPE; // The units used to display page measurements in
-//UnitType OptionsTabs::CurrentScaledUnits = NOTYPE; // The units used to display scaled measurements in
+UnitType OptionsTabs::CurrentScaledUnits = NOTYPE; // The units used to display scaled measurements in
UnitType OptionsTabs::CurrentFontUnits = NOTYPE; // The units used to display font measurements in
BOOL OptionsTabs::ApplyNow = FALSE;// True if Apply now should be ungreyed
BOOL OptionsTabs::InitMessage = FALSE;// True if sending init message
@@ -454,9 +454,7 @@
MsgResult AppPrefsDlg::Message(Msg* Message)
{
-#pragma message( __LOCMSG__ "AppPrefsDlg::Message - do nothing" )
- TRACE( _T("Warning - AppPrefsDlg::Message called") );
-/*#ifndef STANDALONE
+#ifndef STANDALONE
#ifndef REMOVE_PRINT_TABS
// Jason - This is a message-loop lock which is used in the DIM_CREATE code to
@@ -479,13 +477,13 @@
switch ( TheMsg->State )
{
- case DocChangingMsg::DocState::TITLECHANGED:
- case DocChangingMsg::DocState::SELCHANGED:
+ case DocChangingMsg::TITLECHANGED:
+ case DocChangingMsg::SELCHANGED:
{
// In the different cases there are different document pointers that
// we must use.
Document *pDocument = NULL;
- if (TheMsg->State == DocChangingMsg::DocState::TITLECHANGED)
+ if (TheMsg->State == DocChangingMsg::TITLECHANGED)
{
// Document title has changed message.
pDocument = TheMsg->pChangingDoc;
@@ -553,7 +551,7 @@
// the same document and hence the selected document/spread/view does
// not change and so we do not get the last update.
// Could cache all messages from BORN to this and only update on this.
- case DocChangingMsg::DocState::BORNANDSTABLE:
+ case DocChangingMsg::BORNANDSTABLE:
{
// In the different cases there are different document pointers that
// we must use, in this case the changing doc is relevent.
@@ -587,6 +585,10 @@
}
}
break;
+
+ default:
+ break;
+
}
}
#ifndef REMOVE_PRINT_TABS
@@ -628,7 +630,7 @@
switch ( TheMsg->State )
{
- case DocViewMsg::DocViewState::SELCHANGED:
+ case DocViewMsg::SELCHANGED:
{
if (TheMsg->pNewDocView != NULL)
{
@@ -659,6 +661,9 @@
}
}
break;
+
+ default:
+ break;
}
}
else if (MESSAGE_IS_A(Message, OptionsChangingMsg))
@@ -677,7 +682,7 @@
switch ( TheMsg->State )
{
- case OptionsChangingMsg::OptionsState::NEWUNITS:
+ case OptionsChangingMsg::NEWUNITS:
{
// Current display units may have changed changed so may need to update
// any display fields on other tabs which are using units.
@@ -701,7 +706,7 @@
}
// WEBSTER-ranbirr-13/11/96
#ifndef WEBSTER
- case OptionsChangingMsg::OptionsState::ASKBEFORESETTINGATTR:
+ case OptionsChangingMsg::ASKBEFORESETTINGATTR:
{
// Tell the Misc tab about the change in state of ask before setting
// the attribute
@@ -719,7 +724,7 @@
}
break;
}
- case OptionsChangingMsg::OptionsState::IMPORTWITHLAYERS:
+ case OptionsChangingMsg::IMPORTWITHLAYERS:
{
// Tell the Misc tab about the change in state of Import with layers
OptionsTabs *pOptionsTabs = OptionsTabs::GetFirst();
@@ -737,8 +742,8 @@
break;
}
#endif //webster
- case OptionsChangingMsg::OptionsState::NEWPAGESIZE:
- case OptionsChangingMsg::OptionsState::PAGESIZEHASCHANGED:
+ case OptionsChangingMsg::NEWPAGESIZE:
+ case OptionsChangingMsg::PAGESIZEHASCHANGED:
{
// Current page size may have changed changed so may need to update
// any display fields on other tabs which are showing pages.
@@ -753,7 +758,7 @@
// If we are the page tab then call its special function but only if it
// did not send the message.
if (pOptionsTabs->GetPageID() == _R(IDD_OPTSTAB_PAGE) &&
- TheMsg->State == OptionsChangingMsg::OptionsState::NEWPAGESIZE )
+ TheMsg->State == OptionsChangingMsg::NEWPAGESIZE )
{
PageTab *pPageTab = (PageTab *) pOptionsTabs;
pPageTab->UpdatePageSection();
@@ -770,7 +775,7 @@
}
break;
}
- case OptionsChangingMsg::OptionsState::NEWDEFAULTGRID:
+ case OptionsChangingMsg::NEWDEFAULTGRID:
{
// Current default grid may have changed changed
// so may need to update any display fields on other tabs which
@@ -932,6 +937,9 @@
EndDialog = TRUE;
}
break;
+
+ default:
+ break;
}
}
@@ -1046,9 +1054,8 @@
#endif
// return OK;
- return DialogTabOp::Message(Message); */
+ return DialogTabOp::Message(Message);
- return OK;
}
/******************************************************************************************
@@ -1100,9 +1107,6 @@
{
BOOL InitOK = TRUE;
-#pragma message( __LOCMSG__ "AppPrefsDlg::Init - do nothing" )
- TRACE( _T("Warning - AppPrefsDlg::Init called") );
-/*#ifndef STANDALONE
// Declare any preferences that we require.
if ( Camelot.DeclareSection(TEXT("Preferences"), 3) )
{
@@ -1248,8 +1252,8 @@
#ifndef WEBSTER
// InitOK = InitOK && PrintPrefsDlg::Init();
#endif //webster
-#endif */
+
return (InitOK);
}
@@ -1271,9 +1275,7 @@
void AppPrefsDlg::Deinit()
{
-#pragma message( __LOCMSG__ "AppPrefsDlg::Deinit - do nothing" )
- TRACE( _T("Warning - AppPrefsDlg::Deinit called") );
-/* BOOL ok;
+ BOOL ok;
// Remove any options tabs that have been declared to the system.
ok = OptionsTabs::DeinitOptionsTabs();
@@ -1285,8 +1287,8 @@
ok = pPageSizesList->DeinitPageSizes(); // delete all list items
delete pPageSizesList; // delete list item object
pPageSizesList = NULL; // set item pointer to null
- } */
}
+}
@@ -1636,9 +1638,7 @@
BOOL OptionsTabs::InitOptionsTabs()
{
-#pragma message( __LOCMSG__ "AppPrefsDlg::InitOptionsTabs - do nothing" )
- TRACE( _T("Warning - AppPrefsDlg::InitOptionsTabs called") );
-/* // Find the OptionsTabs - the kernel ones are hard-wired.
+ // Find the OptionsTabs - the kernel ones are hard-wired.
OptionsTabs *pOptionsTab = NULL;
#ifndef STANDALONE
@@ -1657,11 +1657,17 @@
ADD_OPTIONSTAB(PrintImagesetterTab) // Imagesetting
#endif
#endif //webster
+PORTNOTE("other", "Disabled internet tab")
+#ifndef EXCLUDE_FROM_XARALX
ADD_OPTIONSTAB(InternetTab) // Internet options
+#endif
// WEBSTER-ranbirr-13/11/96
#ifndef WEBSTER
ADD_OPTIONSTAB(PointersTab) // Mouse
+PORTNOTE("other", "Disabled print general tab")
+#ifndef EXCLUDE_FROM_XARALX
ADD_OPTIONSTAB(PrintGeneralTab) // Output
+#endif
#endif //webster
ADD_OPTIONSTAB(PageTab) // Page
#ifdef PHOTOSHOPPLUGINS
@@ -1670,11 +1676,17 @@
#endif
// WEBSTER-ranbirr-13/11/96
#ifndef WEBSTER
+PORTNOTE("other", "Disabled print layout tab")
+#ifndef EXCLUDE_FROM_XARALX
ADD_OPTIONSTAB(PrintLayoutTab) // Print layout
+#endif
ADD_OPTIONSTAB(ScaleTab) // Scaling
#ifdef BUILD_SEPARATIONS
+PORTNOTE("other", "Disabled print separations tab")
+#ifndef EXCLUDE_FROM_XARALX
ADD_OPTIONSTAB(PrintSepsTab) // Separation (Colour)
#endif
+#endif
ADD_OPTIONSTAB(TuneTab) // Tune ups
// ADD_OPTIONSTAB(UndoTab)
ADD_OPTIONSTAB(UnitsTab) // Units
@@ -1736,7 +1748,7 @@
TRACEUSER( "Neville", _T("OptionsTabs::GridAppTabNumber = %d
"),OptionsTabs::GridAppTabNumber);
TRACEUSER( "Neville", _T("OptionsTabs::PrintTabNumber = %d
"),OptionsTabs::PrintTabNumber);
-#endif */
+#endif
// All ok
return TRUE;
@@ -1885,7 +1897,7 @@
{
// Just to be on the safe side set up some default values
CurrentPageUnits = MILLIMETRES; // Set up random default units.
- //CurrentScaledUnits = MILLIMETRES; // Set up random default units.
+ CurrentScaledUnits = MILLIMETRES; // Set up random default units.
CurrentFontUnits = COMP_POINTS; // Set up random default units.
}
@@ -1918,7 +1930,7 @@
{
// Just to be on the safe side set up some default values
CurrentPageUnits = MILLIMETRES;
- //CurrentScaledUnits = CurrentPageUnits;
+ CurrentScaledUnits = CurrentPageUnits;
CurrentFontUnits = COMP_POINTS;
}
else
@@ -1932,10 +1944,10 @@
{
CurrentPageUnits = pDocUnitList->GetPageUnits(); // Set to the page units.
-// CurrentScaledUnits = pDocUnitList->GetScaleUnits(); // Set to the scale units.
-// // If set to automatic then use the current page units
-// if (CurrentScaledUnits == AUTOMATIC)
-// CurrentScaledUnits = CurrentPageUnits;
+ CurrentScaledUnits = pDocUnitList->GetScaleUnits(); // Set to the scale units.
+ // If set to automatic then use the current page units
+ if (CurrentScaledUnits == AUTOMATIC)
+ CurrentScaledUnits = CurrentPageUnits;
CurrentFontUnits = pDocUnitList->GetFontUnits(); // Set to the font units.
@@ -1946,7 +1958,7 @@
{
// Just to be on the safe side set up some default values
CurrentPageUnits = MILLIMETRES; // Set up random default units.
- //CurrentScaledUnits = MILLIMETRES; // Set up random default units.
+ CurrentScaledUnits = MILLIMETRES; // Set up random default units.
CurrentFontUnits = COMP_POINTS; // Set up random default units.
}
}
@@ -2075,9 +2087,7 @@
BOOL OptionsTabs::GreyApplyNow()
{
-#pragma message( __LOCMSG__ "OptionsTabs::GreyApplyNow - do nothing" )
- TRACE( _T("Warning - OptionsTabs::GreyApplyNow called") );
-/* ERROR2IF(pPrefsDlg == NULL,FALSE,"OptionsTabs::GreyApplyNow called with no dialog pointer");
+ ERROR2IF(pPrefsDlg == NULL,FALSE,"OptionsTabs::GreyApplyNow called with no dialog pointer");
// Grey out the apply now button on the main page
// Must restore the state of the currently selected tab as otherwise you might start
@@ -2085,9 +2095,9 @@
// on one of the pages and hence give rise to unknown controls messages when we try to
// talk to the pages controls again.
CDlgResID PageID = pPrefsDlg->GetCurrentPageID(); // Get currently selected Tab id
- pPrefsDlg->TalkToPage(NULL);
+ pPrefsDlg->TalkToPage(0);
pPrefsDlg->EnableGadget(_R(ID_APPLY_NOW), FALSE);
- pPrefsDlg->TalkToPage(PageID); */ // Select the originally selected tab
+ pPrefsDlg->TalkToPage(PageID); // Select the originally selected tab
return TRUE;
}
@@ -2109,9 +2119,7 @@
BOOL OptionsTabs::UngreyApplyNow()
{
-#pragma message( __LOCMSG__ "OptionsTabs::UngreyApplyNow - do nothing" )
- TRACE( _T("Warning - OptionsTabs::UngreyApplyNow called") );
-/* ERROR2IF(pPrefsDlg == NULL,FALSE,"OptionsTabs::UngreyApplyNow called with no dialog pointer");
+ ERROR2IF(pPrefsDlg == NULL,FALSE,"OptionsTabs::UngreyApplyNow called with no dialog pointer");
// Ungrey the apply now button on the main page
// Must restore the state of the currently selected tab as otherwise you might start
@@ -2119,12 +2127,12 @@
// on one of the pages and hence give rise to unknown controls messages when we try to
// talk to the pages controls again.
CDlgResID PageID = pPrefsDlg->GetCurrentPageID(); // Get currently selected Tab id
- pPrefsDlg->TalkToPage(NULL); // Select the main tab
+ pPrefsDlg->TalkToPage(0); // Select the main tab
pPrefsDlg->EnableGadget(_R(ID_APPLY_NOW), TRUE); // ungrey button on main tab
//// Do these two just in case
//pPrefsDlg->EnableGadget(IDOK, TRUE); // ungrey button on main tab
//pPrefsDlg->EnableGadget(IDCANCEL, TRUE); // ungrey button on main tab
- pPrefsDlg->TalkToPage(PageID); */ // Select the originally selected tab
+ pPrefsDlg->TalkToPage(PageID); // Select the originally selected tab
return TRUE;
}
Index: Trunk/XaraLX/Kernel/optsundo.cpp
===================================================================
--- Trunk/XaraLX/Kernel/optsundo.cpp (revision 929)
+++ Trunk/XaraLX/Kernel/optsundo.cpp (revision 930)
@@ -107,6 +107,7 @@
#include "optsundo.h"
#include "app.h" // Camelot object
#include "convert.h" // StringToBytes and BytesToString
+#include "ophist.h"
CC_IMPLEMENT_DYNAMIC(UndoTab, OptionsTabs)
@@ -268,8 +269,8 @@
// Ok has been pressed so take the values from this section of the dialog box
BOOL Valid=TRUE; // Flag for validity of value
- BOOL State=FALSE; // Flag for state of button/switch
- BOOL SetOk=TRUE; // Preference value set ok
+// BOOL State=FALSE; // Flag for state of button/switch
+// BOOL SetOk=TRUE; // Preference value set ok
// Section = Undo settings
@@ -531,36 +532,33 @@
break;
case DIM_LFT_BN_CLICKED:
OptionsTabs::SetApplyNowState(TRUE);
- switch (Msg->GadgetID)
+ if (Msg->GadgetID == _R(IDC_OPTS_UNLIMITEDUNDO))
{
- case _R(IDC_OPTS_UNLIMITEDUNDO):
- {
- BOOL Valid;
- BOOL Unlimited = pPrefsDlg->GetLongGadgetValue(_R(IDC_OPTS_UNLIMITEDUNDO), 0, 1, 0, &Valid);
- // If set then grey the editable field and its name text otherwise ungrey
- pPrefsDlg->EnableGadget(_R(IDC_OPTS_MAXUNDOTXT), !Unlimited);
- pPrefsDlg->EnableGadget(_R(IDC_OPTS_MAXUNDOSIZE), !Unlimited);
- }
- break;
+ BOOL Valid;
+ BOOL Unlimited = pPrefsDlg->GetLongGadgetValue(_R(IDC_OPTS_UNLIMITEDUNDO), 0, 1, 0, &Valid);
+ // If set then grey the editable field and its name text otherwise ungrey
+ pPrefsDlg->EnableGadget(_R(IDC_OPTS_MAXUNDOTXT), !Unlimited);
+ pPrefsDlg->EnableGadget(_R(IDC_OPTS_MAXUNDOSIZE), !Unlimited);
+ }
#if 0
- case _R(IDC_OPTS_DEFAULTUNDO):
- {
- // Set the MaxSize in the dialog field to a default value
- String_256 String;
- UINT32 MaxUndoSize = UINT32_MAX; //40*1024*1024; // 40 Mbytes
- // Put that size in a string formatted as a memory size value
- BytesToString(&String, MaxUndoSize);
- // Show that on the dialog box
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_MAXUNDOSIZE), &String);
- }
- break;
-#endif
+ else if (Msg->GadgetID == _R(IDC_OPTS_DEFAULTUNDO))
+ {
+ // Set the MaxSize in the dialog field to a default value
+ String_256 String;
+ UINT32 MaxUndoSize = UINT32_MAX; //40*1024*1024; // 40 Mbytes
+ // Put that size in a string formatted as a memory size value
+ BytesToString(&String, MaxUndoSize);
+ // Show that on the dialog box
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_MAXUNDOSIZE), &String);
}
+#endif
break;
case DIM_SELECTION_CHANGED:
case DIM_TEXT_CHANGED:
OptionsTabs::SetApplyNowState(TRUE);
break;
+ default:
+ break;
}
return TRUE;
@@ -590,12 +588,12 @@
TRACEUSER( "Neville", _T("InitUndoSection
"));
ERROR2IF(pPrefsDlg == NULL,FALSE,"UndoTab::InitSection called with no dialog pointer");
- BOOL ReadOk = FALSE; // Flag to say whether the preference value was read ok
+// BOOL ReadOk = FALSE; // Flag to say whether the preference value was read ok
// Make sure the information field displaying the name of the current document
// is correct.
String_256 *DocumentName = GetDocumentName();
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_DOCUMENT), DocumentName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_DOCUMENT), *DocumentName);
// Section = Undo settings
Index: Trunk/XaraLX/Kernel/optsedit.cpp
===================================================================
--- Trunk/XaraLX/Kernel/optsedit.cpp (revision 929)
+++ Trunk/XaraLX/Kernel/optsedit.cpp (revision 930)
@@ -411,14 +411,14 @@
const INT32 Maxxy = INT_MAX; // maximum value allowed as the distance
x = pPrefsDlg->GetUnitGadgetValue(_R(IDC_OPTS_XDUPLICATE), CurrentScaledUnits,
- -Maxxy, Maxxy, NULL, &Valid);
+ -Maxxy, Maxxy, 0, &Valid);
if (Valid)
{
ok = pPrefsDlg->SetUnitGadgetValue(_R(IDC_OPTS_XDUPLICATE), CurrentScaledUnits, x, FALSE, -1);
}
y = pPrefsDlg->GetUnitGadgetValue(_R(IDC_OPTS_YDUPLICATE), CurrentScaledUnits,
- -Maxxy, Maxxy, NULL, &Valid);
+ -Maxxy, Maxxy, 0, &Valid);
if (Valid)
{
ok = pPrefsDlg->SetUnitGadgetValue(_R(IDC_OPTS_YDUPLICATE), CurrentScaledUnits, y, FALSE, -1);
@@ -427,7 +427,7 @@
// Now the nudge size distance
UINT32 Nudge = 0;
Nudge = pPrefsDlg->GetUnitGadgetValue(_R(IDC_OPTS_NUDGESIZE), CurrentScaledUnits,
- 0, INT_MAX, NULL, &Valid);
+ 0, INT_MAX, 0, &Valid);
if (Valid)
{
ok = pPrefsDlg->SetUnitGadgetValue(_R(IDC_OPTS_NUDGESIZE), CurrentScaledUnits, Nudge, FALSE, -1);
@@ -655,6 +655,8 @@
case DIM_TEXT_CHANGED:
OptionsTabs::SetApplyNowState(TRUE);
break;
+ default:
+ break;
}
return TRUE;
}
@@ -730,8 +732,8 @@
ERROR2IF(!ReadOk,FALSE,_R(IDE_OPTS_READPREF_EDIT));
// Now the duplicate distance
- INT32 x = 0;
- INT32 y = 0;
+// INT32 x = 0;
+// INT32 y = 0;
DocCoord offset = pDocument->GetDuplicationOffset();
// ReadOk = Camelot.GetPrefValue(TEXT("Duplicate"), TEXT("DuplicatePlacementX"), &x);
ok = pPrefsDlg->SetUnitGadgetValue(_R(IDC_OPTS_XDUPLICATE), CurrentScaledUnits, offset.x, FALSE, -1);
Index: Trunk/XaraLX/Kernel/pagesize.cpp
===================================================================
--- Trunk/XaraLX/Kernel/pagesize.cpp (revision 929)
+++ Trunk/XaraLX/Kernel/pagesize.cpp (revision 930)
@@ -147,10 +147,10 @@
TCHAR* Token;
} TokenTable[] =
{
- "PageSize",
- "PageSizeEnd",
- "MILLIMETRES",
- "INCHES",
+ {_T("PageSize")},
+ {_T("PageSizeEnd")},
+ {_T("MILLIMETRES")},
+ {_T("INCHES")}
};
@@ -202,8 +202,8 @@
{
// Guard against floating point exceptions by checking the input values
// 0.1" or 0.1mm should be a good enough minimim
- ERROR2IF(Width < 0.1 || Width > (double)INT32_MAX, FALSE, "PageSize::Init bad width")
- ERROR2IF(Height < 0.1 || Height > (double)INT32_MAX, FALSE, "PageSize::Init bad width")
+ ERROR2IF(Width < 0.1 || Width > (double)INT32_MAX, FALSE, "PageSize::Init bad width");
+ ERROR2IF(Height < 0.1 || Height > (double)INT32_MAX, FALSE, "PageSize::Init bad width");
Id = NewId; // Copy the page id across
PageName = *Name; // Copy the page name across
@@ -397,16 +397,16 @@
PageSize *pPageSize;
// First size is implied to be custom i.e. if unknown size.
- DeclarePageSize(A0, &String_32(_R(IDS_K_PAGESIZE_A0)), 840.0, 1188.0, MILLIMETRES, &pPageSize);
- DeclarePageSize(A1, &String_32(_R(IDS_K_PAGESIZE_A1)), 594.0, 840.0, MILLIMETRES, &pPageSize);
- DeclarePageSize(A2, &String_32(_R(IDS_K_PAGESIZE_A2)), 420.0, 594.0, MILLIMETRES, &pPageSize);
- DeclarePageSize(A3, &String_32(_R(IDS_K_PAGESIZE_A3)), 297.0, 420.0, MILLIMETRES, &pPageSize);
- DeclarePageSize(A4, &String_32(_R(IDS_K_PAGESIZE_A4)), 210.0, 297.0, MILLIMETRES, &pPageSize);
- DeclarePageSize(A5, &String_32(_R(IDS_K_PAGESIZE_A5)), 148.5, 210.0, MILLIMETRES, &pPageSize);
- DeclarePageSize(A6, &String_32(_R(IDS_K_PAGESIZE_A6)), 105.0, 148.5, MILLIMETRES, &pPageSize);
- DeclarePageSize(USLEGAL, &String_32(_R(IDS_K_PAGESIZE_USLEGAL)), 8.5, 14, INCHES, &pPageSize);
- DeclarePageSize(USLETTER, &String_32(_R(IDS_K_PAGESIZE_USLETTER)), 8.5, 11, INCHES, &pPageSize);
- DeclarePageSize(FANFOLD, &String_32(_R(IDS_K_PAGESIZE_FANFOLD)), 8.25, 12, INCHES, &pPageSize);
+ DeclarePageSize(A0, _R(IDS_K_PAGESIZE_A0), 840.0, 1188.0, MILLIMETRES, &pPageSize);
+ DeclarePageSize(A1, _R(IDS_K_PAGESIZE_A1), 594.0, 840.0, MILLIMETRES, &pPageSize);
+ DeclarePageSize(A2, _R(IDS_K_PAGESIZE_A2), 420.0, 594.0, MILLIMETRES, &pPageSize);
+ DeclarePageSize(A3, _R(IDS_K_PAGESIZE_A3), 297.0, 420.0, MILLIMETRES, &pPageSize);
+ DeclarePageSize(A4, _R(IDS_K_PAGESIZE_A4), 210.0, 297.0, MILLIMETRES, &pPageSize);
+ DeclarePageSize(A5, _R(IDS_K_PAGESIZE_A5), 148.5, 210.0, MILLIMETRES, &pPageSize);
+ DeclarePageSize(A6, _R(IDS_K_PAGESIZE_A6), 105.0, 148.5, MILLIMETRES, &pPageSize);
+ DeclarePageSize(USLEGAL, _R(IDS_K_PAGESIZE_USLEGAL), 8.5, 14, INCHES, &pPageSize);
+ DeclarePageSize(USLETTER,_R(IDS_K_PAGESIZE_USLETTER), 8.5, 11, INCHES, &pPageSize);
+ DeclarePageSize(FANFOLD, _R(IDS_K_PAGESIZE_FANFOLD), 8.25, 12, INCHES, &pPageSize);
}
// All ok
@@ -753,7 +753,7 @@
break;
default:
- TRACEUSER( "Neville, _T(""PageSizesList: Unexpected token - %s
"),TokenBuf);
+ TRACEUSER("Neville", _T("PageSizesList: Unexpected token - %s
"),TokenBuf);
ErrorId = _R(IDW_PAGES_UNEXPECTEDMAINTOKEN);
ok = FALSE;
break;
@@ -860,7 +860,7 @@
ERROR2IF(pUnits == NULL, FALSE,"PageSizesList::ReadPageSizeDef pUnits is NULL");
// Fill in some useful default values
- *pPageName = "";
+ *pPageName = _T("");
*pWidth = 0.0;
*pHeight = 0.0;
*pUnits = MILLIMETRES; // default to reading in measurements in millimetres
@@ -870,7 +870,7 @@
// This set of parameters will combine to form a key press object that represents
// the hot key combination
- String_32* pTextDesc = NULL;
+// String_32* pTextDesc = NULL;
// This is FALSE until we have read the text that describes the page size
BOOL TextDescRead = FALSE;
@@ -935,7 +935,7 @@
finished = TRUE;
break;
- case TOKEN_NONE:
+ case PsTOKEN_NONE:
{
double Number;
// Could use this but the routine requires a valid doc!
@@ -944,7 +944,7 @@
//ok = Convert::StringToDouble( &Value, &Number);
// Could use this but is not unicode compliant!
//Number = atof((char *)TokenBuf);
- ok = (camSscanf(TokenBuf,"%lg",&Number) == 1);
+ ok = (camSscanf(TokenBuf,_T("%lg"),&Number) == 1);
if (ok)
{
if (!ReadWidth)
Index: Trunk/XaraLX/Kernel/htmlexp.cpp
===================================================================
--- Trunk/XaraLX/Kernel/htmlexp.cpp (revision 929)
+++ Trunk/XaraLX/Kernel/htmlexp.cpp (revision 930)
@@ -772,7 +772,7 @@
//And get its coordinate and verb arrays
DocCoord* pdcCoords=ppthToWrite->GetCoordArray();
- PathVerb* ppvVerbs=ppthToWrite->GetVerbArray();
+// PathVerb* ppvVerbs=ppthToWrite->GetVerbArray();
//Keep a copy of the last coordinate written, to make sure
//we don't write out two consecutive identical coordinates
Index: Trunk/XaraLX/Kernel/optsview.cpp
===================================================================
--- Trunk/XaraLX/Kernel/optsview.cpp (revision 929)
+++ Trunk/XaraLX/Kernel/optsview.cpp (revision 930)
@@ -105,7 +105,6 @@
//WEBSTER-ranbirr-13/11/96
#ifndef WEBSTER
#include "app.h" // Camelot object
-#include "scrcamvw.h"
#include "docview.h"
#include "appprefs.h"
//#include "prefsdlg.h" // dialog/gadget ids
@@ -118,7 +117,7 @@
//#include "jason.h" // _R(IDS_COLCONTEXTNAME)
#include "colcontx.h" // For ColourContexts
#include "palman.h"
-#include "coldlog.h"
+//#include "coldlog.h"
#include "bmpcomp.h" // for BitmapList
CC_IMPLEMENT_DYNAMIC(ViewTab, OptionsTabs)
@@ -360,7 +359,7 @@
return(TRUE);
// Invalidate any affected bitmaps.
- BOOL bOldSetting = pDocument->GetBitmapSmoothing();
+ /* BOOL bOldSetting =*/ pDocument->GetBitmapSmoothing();
// Enable the new setting
pDocument->SetBitmapSmoothing(bNewSetting);
@@ -461,7 +460,7 @@
// Now tell other users that there is a possibly new colour bar display mode
// in operation and so update any necessary items.
- BROADCAST_TO_ALL(OptionsChangingMsg(pDocument, OptionsChangingMsg::OptionsState::NEWCOLOURBARMODE));
+ BROADCAST_TO_ALL(OptionsChangingMsg(pDocument, OptionsChangingMsg::NEWCOLOURBARMODE));
// Now set up the other preference values according to the switches
@@ -475,6 +474,8 @@
// we now need to force it from in here as well (otherwise the colour editor will save the one
// that it is currently using - and NOT the one that we have just applied here!
+PORTNOTE("other", "Disabled Colour Editor dialog")
+#ifndef EXCLUDE_FROM_XARALX
OpDescriptor* pOpDescriptor = (OpDescriptor*) OpDescriptor::FindOpDescriptor( OPTOKEN_COLOUREDITDLG );
String_256 Dummy;
@@ -487,6 +488,7 @@
pColourEditDlg->SetDefaultDisplayModel (DisplayModel);
}
+#endif
SetOk = Camelot.SetPrefValue(TEXT("Displays"), TEXT("ColourEditorAutoModel"), &AutoColourModel);
INT32 DisplayModelPref = (INT32)DisplayModel;
@@ -496,22 +498,11 @@
// Error diffused view option
BOOL ViewDither = 2;
ViewDither = GetSelectedDither();
- SetOk = Camelot.SetPrefValue("Screen", "ViewDither", &ViewDither);
+ SetOk = Camelot.SetPrefValue(_T("Screen"), _T("ViewDither"), &ViewDither);
ERROR2IF(!SetOk,2,_R(IDE_OPTS_SETPREF_VIEW));
- if (ViewDither != OldViewDither)
- {
- CMainFrame *MainFrame = GetMainFrame();
- if (MainFrame != NULL)
- {
- HWND hWnd = MainFrame->m_hWndMDIClient;
- if (hWnd != NULL)
- PaletteManager::RedrawAllPalettedWindows(hWnd);
- }
- OldViewDither = ViewDither;
- }
+ PaletteManager::RedrawAllPalettedWindows(NULL);
-
// Section = Bitmaps
// The 'allow bitmap smoothing when scaled up' setting has changed.
@@ -663,7 +654,7 @@
// is correct.
String_256 DocumentName(_R(IDT_OPTS_VIEW_INFO));
DocumentName += *GetDocumentName();
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), &DocumentName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), DocumentName);
// Only update if we are not already grey
if (GreyStatus == TRUE)
@@ -705,7 +696,7 @@
// is correct.
String_256 DocumentName(_R(IDT_OPTS_VIEW_INFO));
DocumentName += *GetDocumentName();
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), &DocumentName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), DocumentName);
BOOL bSmoothing = TRUE;
if (pDocument)
@@ -805,7 +796,7 @@
// Set up the information field to reflect the current document name
String_256 DocName(_R(IDT_OPTS_VIEW_INFO));
DocName += *DocumentName;
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), &DocName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), DocName);
BOOL bSmoothing = TRUE;
if (pDocument)
@@ -917,6 +908,8 @@
case DIM_TEXT_CHANGED:
OptionsTabs::SetApplyNowState(TRUE);
break;
+ default:
+ break;
}
return TRUE;
@@ -1025,7 +1018,7 @@
// First item in the list is an automatic.
ModelName = String(_R(IDT_OPTS_AUTOMATIC)); // automatic colour model
NameString.MakeMsg(_R(IDS_COLCONTEXTNAME), (TCHAR *) ModelName);
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_AUTOCOLOUR), &NameString, FALSE, Index);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_AUTOCOLOUR), NameString, FALSE, Index);
for (INT32 i = 0; i < MAX_COLOURMODELS; i++)
{
@@ -1034,7 +1027,7 @@
ColContexts.Context[i]->GetModelName(&ModelName);
NameString.MakeMsg(_R(IDS_COLCONTEXTNAME), (TCHAR *) ModelName);
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_AUTOCOLOUR), &NameString, FALSE, Index + 1);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_AUTOCOLOUR), NameString, FALSE, Index + 1);
// If the colour model is equal to the entry model then note the index for this item.
if (i == (INT32)DisplayModel)
@@ -1084,7 +1077,7 @@
// is correct.
String_256 DocumentName(_R(IDT_OPTS_VIEW_INFO));
DocumentName += *GetDocumentName();
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), &DocumentName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), DocumentName);
// Section = Display
@@ -1094,10 +1087,10 @@
TRACEUSER( "Neville", _T("set colour bar mode '%d'
"),ColourBarMode);
// Set up the list of available options
pPrefsDlg->DeleteAllValues(_R(IDC_OPTS_COLOURBAR));
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_COLOURBAR), &String_32(_R(IDN_COLBAR_SMALL)));
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_COLOURBAR), &String_32(_R(IDN_COLBAR_MEDIUM)));
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_COLOURBAR), &String_32(_R(IDN_COLBAR_MEDSCROLL)));
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_COLOURBAR), &String_32(_R(IDN_COLBAR_LARGE)));
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_COLOURBAR), String_32(_R(IDN_COLBAR_SMALL)));
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_COLOURBAR), String_32(_R(IDN_COLBAR_MEDIUM)));
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_COLOURBAR), String_32(_R(IDN_COLBAR_MEDSCROLL)));
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_COLOURBAR), String_32(_R(IDN_COLBAR_LARGE)));
pPrefsDlg->SetComboListLength(_R(IDC_OPTS_COLOURBAR));
// Set up the default option displayed
BOOL ok = pPrefsDlg->SetSelectedValueIndex(_R(IDC_OPTS_COLOURBAR),ColourBarMode);
@@ -1194,7 +1187,7 @@
ERROR2IF(!ReadOk,FALSE,_R(IDE_OPTS_READPREF_VIEW));
INT32 ViewDither = 2;
- ReadOk = Camelot.GetPrefValue("Screen", "ViewDither", &ViewDither);
+ ReadOk = Camelot.GetPrefValue(_T("Screen"), _T("ViewDither"), &ViewDither);
SetSelectedDither(ViewDither);
ERROR2IF(!ReadOk,FALSE,_R(IDE_OPTS_READPREF_VIEW));
@@ -1210,7 +1203,7 @@
static CGadgetID DitherGadgets[] = {_R(IDC_OPTS_DITHER_NONE),
_R(IDC_OPTS_DITHER_ORDERED),
_R(IDC_OPTS_DITHER_DIFFUSED),
- NULL};
+ 0};
@@ -1236,21 +1229,13 @@
CGadgetID Gadget = pPrefsDlg->GetRadioGroupSelected(DitherGadgets);
- switch(Gadget)
- {
- case _R(IDC_OPTS_DITHER_NONE):
- DitherStyle = 4;
- break;
+ if (Gadget == _R(IDC_OPTS_DITHER_NONE))
+ DitherStyle = 4;
+ else if (Gadget == _R(IDC_OPTS_DITHER_ORDERED))
+ DitherStyle = 2;
+ else if (Gadget == _R(IDC_OPTS_DITHER_DIFFUSED))
+ DitherStyle = 3;
- case _R(IDC_OPTS_DITHER_ORDERED):
- DitherStyle = 2;
- break;
-
- case _R(IDC_OPTS_DITHER_DIFFUSED):
- DitherStyle = 3;
- break;
- }
-
return(DitherStyle);
}
Index: Trunk/XaraLX/Kernel/optsgrid.h
===================================================================
--- Trunk/XaraLX/Kernel/optsgrid.h (revision 929)
+++ Trunk/XaraLX/Kernel/optsgrid.h (revision 930)
@@ -128,8 +128,6 @@
} GridResizeInfo;
-PORTNOTE("other", "Removed GridTab because it relies on dialog manager functionality")
-#if !defined(EXCLUDE_FROM_XARALX)
/********************************************************************************************
> class GridTab : public OptionsTabs
@@ -201,7 +199,6 @@
BOOL GreyStatus; // Remember the state that we are currently in
};
-#endif
/****************************************************************************
Index: Trunk/XaraLX/Kernel/prefs.cpp
===================================================================
--- Trunk/XaraLX/Kernel/prefs.cpp (revision 929)
+++ Trunk/XaraLX/Kernel/prefs.cpp (revision 930)
@@ -1789,7 +1789,7 @@
/********************************************************************************************
-> BOOL Preferences::SetPrefDirect(LPTCHAR Section, LPTCHAR Pref, const char *pValue, BOOL Force)
+> BOOL Preferences::SetPrefDirect(LPTCHAR Section, LPTCHAR Pref, const TCHAR *pValue, BOOL Force)
Author: Tim_Browse (Xara Group Ltd) <camelotdev@xxxxxxxx>
Created: 06/01/95
@@ -1807,7 +1807,7 @@
********************************************************************************************/
-BOOL Preferences::SetPrefDirect(LPTCHAR Section, LPTCHAR Pref, const char *pValue, BOOL Force)
+BOOL Preferences::SetPrefDirect(LPTCHAR Section, LPTCHAR Pref, const TCHAR *pValue, BOOL Force)
{
#if !defined(EXCLUDE_FROM_RALPH)
// First check if there is a valid OILPrefs, as if there was a problem on start up such as
Index: Trunk/XaraLX/Kernel/optspntr.cpp
===================================================================
--- Trunk/XaraLX/Kernel/optspntr.cpp (revision 929)
+++ Trunk/XaraLX/Kernel/optspntr.cpp (revision 930)
@@ -278,7 +278,7 @@
// Ok has been pressed so take the values from this section of the dialog box
BOOL Valid=FALSE; // Flag for validity of value
- BOOL State=FALSE; // Flag for state of button/switch
+// BOOL State=FALSE; // Flag for state of button/switch
BOOL SetOk=TRUE; // Preference value set ok
// Middle button removed for now as nothing seems to use it.
@@ -352,7 +352,7 @@
return TRUE; // Talk to page failed to return now
// Set up the common variables
- BOOL Valid=FALSE; // Flag for validity of value
+// BOOL Valid=FALSE; // Flag for validity of value
// We will not error on any of the conversions as this might mean double errors
// when say an apply is used but instead just ignore the conversion. This also means
@@ -577,23 +577,21 @@
case DIM_LFT_BN_CLICKED:
OptionsTabs::SetApplyNowState(TRUE);
// A control on the dialog box has been clicked...
- switch (Msg->GadgetID)
+ if (Msg->GadgetID == _R(IDC_OPTS_RESET))
{
- case _R(IDC_OPTS_RESET):
- // Somebody has pressed the reset defaults button
- // Go and call the nice function which resets the values and then
- // update our values again.
- ClickModifiers::RestoreDefaults();
- InitClickLists();
- break;
- default:
- break;
+ // Somebody has pressed the reset defaults button
+ // Go and call the nice function which resets the values and then
+ // update our values again.
+ ClickModifiers::RestoreDefaults();
+ InitClickLists();
}
break;
case DIM_SELECTION_CHANGED:
case DIM_TEXT_CHANGED:
OptionsTabs::SetApplyNowState(TRUE);
break;
+ default:
+ break;
}
return TRUE;
}
@@ -622,7 +620,7 @@
TRACEUSER( "Neville", _T("PointersTab::InitSection
"));
ERROR2IF(pPrefsDlg == NULL,FALSE,"PointersTab::InitSection called with no dialog pointer");
- BOOL ReadOk = FALSE; // Flag to say whether the preference value was read ok
+// BOOL ReadOk = FALSE; // Flag to say whether the preference value was read ok
BOOL ok = TRUE; // Flag for whether value set up ok
// Set up the click lists for the left, right and middle mouse buttons
@@ -684,9 +682,9 @@
{
bf = (ButtonFunction)i;
ClickModifiers::GetButtonFuncName(bf, &FunctionName);
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_LEFTBUTTON), &FunctionName);
-// pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_MIDDLEBUTTON), &FunctionName);
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_RIGHTBUTTON), &FunctionName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_LEFTBUTTON), FunctionName);
+// pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_MIDDLEBUTTON), FunctionName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_RIGHTBUTTON), FunctionName);
}
// Set the length of the list
pPrefsDlg->SetComboListLength(_R(IDC_OPTS_LEFTBUTTON));
Index: Trunk/XaraLX/Kernel/ngscan.cpp
===================================================================
--- Trunk/XaraLX/Kernel/ngscan.cpp (revision 929)
+++ Trunk/XaraLX/Kernel/ngscan.cpp (revision 930)
@@ -897,10 +897,10 @@
ERRORIF(psp == 0, _R(IDE_NOMORE_MEMORY), 0);
// Try to make a bunch of default or copied properties for it.
- BOOL fOK;
- ALLOC_WITH_FAIL(fOK,
- (pCopyPropNode != 0 ? psp->CopyProperties(pCopyPropNode)
- : psp->CreateDefaults()),
+ NodeSetProperty * fOK=psp; // we use this as a boolean flag
+ ALLOC_WITH_FAIL(psp,
+ ((pCopyPropNode != 0 ? psp->CopyProperties(pCopyPropNode)
+ : psp->CreateDefaults())?psp:NULL),
pOp);
if (!fOK)
{
Index: Trunk/XaraLX/Kernel/prefs.h
===================================================================
--- Trunk/XaraLX/Kernel/prefs.h (revision 929)
+++ Trunk/XaraLX/Kernel/prefs.h (revision 930)
@@ -188,7 +188,7 @@
BOOL SetPrefValue(TCHAR *Section, TCHAR *Pref, UINT32 *PrefVar);
BOOL SetPrefValue(TCHAR *Section, TCHAR *Pref, double *PrefVar);
- BOOL SetPrefDirect(TCHAR *Section, TCHAR *Pref, const char *pValue, BOOL Force = FALSE);
+ BOOL SetPrefDirect(TCHAR *Section, TCHAR *Pref, const TCHAR *pValue, BOOL Force = FALSE);
BOOL SetPrefDirect(TCHAR *Section, TCHAR *Pref, PreferenceType Type, PrefData Data);
BOOL SetPrefDirect(TCHAR *Section, TCHAR *Pref, INT32 *pValue);
BOOL SetPrefDirect(TCHAR *Section, TCHAR *Pref, UINT32 *pValue);
Index: Trunk/XaraLX/Kernel/appprefs.h
===================================================================
--- Trunk/XaraLX/Kernel/appprefs.h (revision 929)
+++ Trunk/XaraLX/Kernel/appprefs.h (revision 930)
@@ -403,7 +403,7 @@
static Spread *pSpread; // The spread we are working on
static UnitType CurrentPageUnits; // The units used to display page measurements
- //static UnitType CurrentScaledUnits; // The units to display scaled measurements
+ static UnitType CurrentScaledUnits; // The units to display scaled measurements
static UnitType CurrentFontUnits; // The units used to display font measurements
private:
Index: Trunk/XaraLX/Kernel/pagesize.h
===================================================================
--- Trunk/XaraLX/Kernel/pagesize.h (revision 929)
+++ Trunk/XaraLX/Kernel/pagesize.h (revision 930)
@@ -182,7 +182,11 @@
// Function to declare a page size to the PageSizes system
BOOL DeclarePageSize(PageId NewId, String_32 *Name, double Width, double Height,
UnitType Units, PageSize **pPageSize);
-
+
+ BOOL DeclarePageSize(PageId NewId, ResourceID r, double Width, double Height,
+ UnitType Units, PageSize **pPageSize)
+ { String_32 Name(r); return DeclarePageSize(NewId, &Name, Width, Height, Units, pPageSize); }
+
// Useful functions which are supplied by each page size in the list
String_32* GetTextualDescription(PageId ThisId);
PageId GetPageIdFromSize(INT32 Width, INT32 Height);
Index: Trunk/XaraLX/Kernel/app.h
===================================================================
--- Trunk/XaraLX/Kernel/app.h (revision 929)
+++ Trunk/XaraLX/Kernel/app.h (revision 930)
@@ -509,7 +509,7 @@
// Used for direct partying on the preference file - mainly used for 'dynamic'
// preferences that are interrogated on the fly as and when required.
- BOOL SetPrefDirect(LPTCHAR Section, LPTCHAR Pref, const char *pValue, BOOL Force = FALSE)
+ BOOL SetPrefDirect(LPTCHAR Section, LPTCHAR Pref, const TCHAR *pValue, BOOL Force = FALSE)
{ return CamelotPrefs->SetPrefDirect(Section, Pref, pValue, Force); }
BOOL SetPrefDirect(LPTCHAR Section, LPTCHAR Pref, INT32 *pValue)
{ return CamelotPrefs->SetPrefDirect(Section, Pref, pValue); }
Index: Trunk/XaraLX/Kernel/optsgrid.cpp
===================================================================
--- Trunk/XaraLX/Kernel/optsgrid.cpp (revision 929)
+++ Trunk/XaraLX/Kernel/optsgrid.cpp (revision 930)
@@ -139,9 +139,6 @@
const MILLIPOINT MinPageDimension = 72000/2; // minimum = 0.5inch
-PORTNOTE("other", "Removed GridTab because it relies on dialog manager functionality")
-#if !defined(EXCLUDE_FROM_XARALX)
-
CC_IMPLEMENT_DYNAMIC(GridTab, OptionsTabs)
/********************************************************************************************
@@ -456,7 +453,7 @@
// is correct.
String_256 DocumentName(_R(IDT_OPTS_GRID_INFO));
DocumentName += *GetDocumentName();
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), &DocumentName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), DocumentName);
// Only update if we are not already grey
if (GreyStatus == TRUE)
@@ -498,7 +495,7 @@
// is correct.
String_256 DocumentName(_R(IDT_OPTS_GRID_INFO));
DocumentName += *GetDocumentName();
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), &DocumentName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), DocumentName);
// Only update if we are not already ungrey
if (GreyStatus == FALSE)
@@ -589,7 +586,7 @@
// Make sure the information field displaying the name of the current document is correct.
String_256 DocName(_R(IDT_OPTS_GRID_INFO));
DocName += *DocumentName;
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), &DocName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), DocName);
// All units work off the selected document and so we must do nothing if there is no
// selected document. Check our clas variable to see if this is true or not.
@@ -684,6 +681,8 @@
case DIM_TEXT_CHANGED:
OptionsTabs::SetApplyNowState(TRUE);
break;
+ default:
+ break;
}
return TRUE;
@@ -711,13 +710,13 @@
TRACEUSER( "Neville", _T("InitPageSection
"));
ERROR2IF(pPrefsDlg == NULL,FALSE,"GridTab::InitSection called with no dialog pointer");
- BOOL ok = TRUE; // Flag for whether value set up ok
+// BOOL ok = TRUE; // Flag for whether value set up ok
// Make sure the information field displaying the name of the current document
// is correct.
String_256 DocumentName(_R(IDT_OPTS_GRID_INFO));
DocumentName += *GetDocumentName();
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), &DocumentName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), DocumentName);
// All units work off the selected document and so we must do nothing if there is no
// selected document. Check our clas variable to see if this is true or not.
@@ -754,7 +753,7 @@
// get a pointer to the default grid
NodeGrid* pDefaultGrid = pSpread->FindFirstDefaultGridInSpread();
- ERROR2IF(pDefaultGrid==NULL,FALSE,"GridTab::GetDefaultGridDetails() - pDefaultGrid==NULL")
+ ERROR2IF(pDefaultGrid==NULL,FALSE,"GridTab::GetDefaultGridDetails() - pDefaultGrid==NULL");
// read current grid settings
double GridSpacing = pDefaultGrid->GetMainStep(); // seems to be equivalent
@@ -815,8 +814,8 @@
// The dialog handler should have already set up the class variables pDocument and pSpread.
// We will check that they are not null.
- ERROR2IF(pDocument==NULL,FALSE,"GridTab::InvokeResize() no selected document")
- ERROR2IF( pSpread==NULL,FALSE,"GridTab::InvokeResize() no spread to work on")
+ ERROR2IF(pDocument==NULL,FALSE,"GridTab::InvokeResize() no selected document");
+ ERROR2IF( pSpread==NULL,FALSE,"GridTab::InvokeResize() no spread to work on");
// Only change the page size/layout if something has changed
// If the user has changed anything then warn them that nothing will happen
@@ -865,7 +864,6 @@
return TRUE;
}
-#endif
Index: Trunk/XaraLX/Kernel/radio.cpp
===================================================================
--- Trunk/XaraLX/Kernel/radio.cpp (revision 929)
+++ Trunk/XaraLX/Kernel/radio.cpp (revision 930)
@@ -133,9 +133,9 @@
********************************************************************************************/
BOOL RadioGroup::SetAssociations(DialogOp* pDialog, CGadgetAssociation* AssocArray, UINT32 NumGadgets)
{
- ERROR2IF(pDialog == NULL, FALSE, "RadioGroup::SetAssociations() - pDialog NULL")
- ERROR2IF(AssocArray == NULL, FALSE, "RadioGroup::SetAssociations() - AssocArray NULL")
- ERROR2IF(NumGadgets == 0, FALSE, "RadioGroup::SetAssociations() - NumGadgets is zero")
+ ERROR2IF(pDialog == NULL, FALSE, "RadioGroup::SetAssociations() - pDialog NULL");
+ ERROR2IF(AssocArray == NULL, FALSE, "RadioGroup::SetAssociations() - AssocArray NULL");
+ ERROR2IF(NumGadgets == 0, FALSE, "RadioGroup::SetAssociations() - NumGadgets is zero");
m_pDialog = pDialog;
m_Associations = AssocArray;
@@ -160,7 +160,7 @@
********************************************************************************************/
CCObject* RadioGroup::GetDefault()
{
- ERROR3IF(TRUE, "RadioGroup::GetDefault() - not implemented")
+ ERROR3IF(TRUE, "RadioGroup::GetDefault() - not implemented");
return NULL;
}
@@ -183,7 +183,7 @@
********************************************************************************************/
BOOL RadioGroup::Disable()
{
- ERROR2IF(m_pDialog == NULL, FALSE, "RadioGroup::Disable - m_pDialog not set")
+ ERROR2IF(m_pDialog == NULL, FALSE, "RadioGroup::Disable - m_pDialog not set");
for (UINT32 i = 0; i < GetRadioBoxCount(); i++)
{
@@ -210,7 +210,7 @@
********************************************************************************************/
BOOL RadioGroup::Enable()
{
- ERROR2IF(m_pDialog == NULL, FALSE, "RadioGroup::Disable - m_pDialog not set")
+ ERROR2IF(m_pDialog == NULL, FALSE, "RadioGroup::Disable - m_pDialog not set");
for (UINT32 i = 0; i < GetRadioBoxCount(); i++)
{
@@ -239,7 +239,7 @@
********************************************************************************************/
BOOL RadioGroup::SetDefault(CCObject* pDefaultObject)
{
- ERROR2IF(m_pDialog == NULL, FALSE, "RadioGroup::SetDefault - m_pDialog not set")
+ ERROR2IF(m_pDialog == NULL, FALSE, "RadioGroup::SetDefault - m_pDialog not set");
for (UINT32 i = 0; i < GetRadioBoxCount(); i++)
{
@@ -267,7 +267,7 @@
********************************************************************************************/
CCObject* RadioGroup::GetSelected()
{
- ERROR2IF(m_pDialog == NULL, NULL, "RadioGroup::GetSelected - m_pDialog not set")
+ ERROR2IF(m_pDialog == NULL, NULL, "RadioGroup::GetSelected - m_pDialog not set");
for (UINT32 i = 0; i < GetRadioBoxCount(); i++)
{
Index: Trunk/XaraLX/Kernel/optsmisc.cpp
===================================================================
--- Trunk/XaraLX/Kernel/optsmisc.cpp (revision 929)
+++ Trunk/XaraLX/Kernel/optsmisc.cpp (revision 930)
@@ -314,7 +314,7 @@
// Now tell the layers gallery to update itself, if present
// Broadcast a SpreadMsg with reason code SpreadMsg::LAYERCHANGES, when the pref changes.
// The layer gallery will then redraw itself.
- BROADCAST_TO_ALL(SpreadMsg(pSpread, pSpread, SpreadMsg::SpreadReason::LAYERCHANGES));
+ BROADCAST_TO_ALL(SpreadMsg(pSpread, pSpread, SpreadMsg::LAYERCHANGES));
// Section = Attributes
@@ -372,7 +372,7 @@
// pSpread tells the dimension class which document to pick the dimensioning from
MILLIPOINT x = 0;
MILLIPOINT y = 0;
- const INT32 Maxxy = INT_MAX; // maximum value allowed as the distance
+// const INT32 Maxxy = INT_MAX; // maximum value allowed as the distance
BOOL bValidX = FALSE;
BOOL bValidY = FALSE;
@@ -805,44 +805,44 @@
case DIM_SELECTION_CHANGED:
case DIM_LFT_BN_CLICKED:
// A control on the dialog box has been clicked...
- switch (Msg->GadgetID)
+ if (Msg->GadgetID == _R(IDC_OPTS_LASTATTRB))
{
- case _R(IDC_OPTS_LASTATTRB):
+ // Ungrey the apply as we have clicked on this button
+ OptionsTabs::SetApplyNowState(TRUE);
+ // If last attibute applied becomes current is True then the ask before
+ // setting attribute is superfluous as it will be ignored.
+ // Get current button state.
+ BOOL Valid = TRUE;
+ BOOL LastAttribute = pPrefsDlg->GetLongGadgetValue(_R(IDC_OPTS_LASTATTRB), 0, 1, 0, &Valid);
+ // Set new state of ask before setting button.
+ pPrefsDlg->EnableGadget(_R(IDC_OPTS_ASKSETATTRB), !LastAttribute);
+ break;
+ }
+ else if (Msg->GadgetID == _R(IDC_OPTS_SAVENOW))
+ {
+ // save now action button pressed, save out preferences
+ // but first we must take all the current values
+ // Should only be present in options mode
+ if (pPrefsDlg->IsKindOf(CC_RUNTIME_CLASS(AppPrefsDlg)))
{
- // Ungrey the apply as we have clicked on this button
- OptionsTabs::SetApplyNowState(TRUE);
- // If last attibute applied becomes current is True then the ask before
- // setting attribute is superfluous as it will be ignored.
- // Get current button state.
- BOOL Valid = TRUE;
- BOOL LastAttribute = pPrefsDlg->GetLongGadgetValue(_R(IDC_OPTS_LASTATTRB), 0, 1, 0, &Valid);
- // Set new state of ask before setting button.
- pPrefsDlg->EnableGadget(_R(IDC_OPTS_ASKSETATTRB), !LastAttribute);
- break;
+ // Cast/Convert our dialog pointer to be the correct type
+ AppPrefsDlg *pOptionsDlg = (AppPrefsDlg*) pPrefsDlg;
+ ok = pOptionsDlg->CommitDialogValues();
+ if (ok)
+ Camelot.WritePreferences();
}
- case _R(IDC_OPTS_SAVENOW):
- // save now action button pressed, save out preferences
- // but first we must take all the current values
- // Should only be present in options mode
- if (pPrefsDlg->IsKindOf(CC_RUNTIME_CLASS(AppPrefsDlg)))
- {
- // Cast/Convert our dialog pointer to be the correct type
- AppPrefsDlg *pOptionsDlg = (AppPrefsDlg*) pPrefsDlg;
- ok = pOptionsDlg->CommitDialogValues();
- if (ok)
- Camelot.WritePreferences();
- }
- break;
- default:
- // Only ungrey the apply now if the gadget is not the save now button
- OptionsTabs::SetApplyNowState(TRUE);
- break;
}
+ else
+ {
+ OptionsTabs::SetApplyNowState(TRUE);
+ }
break; // DIM_LFT_BN_CLICKED
#endif //webster
case DIM_TEXT_CHANGED:
OptionsTabs::SetApplyNowState(TRUE);
break; // DIM_TEXT_CHANGED
+ default:
+ break;
}
return TRUE;
@@ -880,7 +880,7 @@
ERROR2IF(pPrefsDlg == NULL,FALSE,"MiscTab::InitSection called with no dialog pointer");
BOOL ReadOk = FALSE; // Flag to say whether the preference value was read ok
- BOOL ok = TRUE; // Flag for whether value set up ok
+// BOOL ok = TRUE; // Flag for whether value set up ok
// Make sure the information field displaying the name of the current document
// is correct.
@@ -1075,8 +1075,8 @@
// These should be shown in scaled coordinates as they measure distances on the page
// pSpread tells the dimensioning system which document to get the dimensioning
// details from.
- INT32 x = 0;
- INT32 y = 0;
+// INT32 x = 0;
+// INT32 y = 0;
DocCoord offset = pDocument->GetDuplicationOffset();
// ReadOk = Camelot.GetPrefValue(TEXT("Duplicate"), TEXT("DuplicatePlacementX"), &x);
ok = pPrefsDlg->SetDimensionGadgetValue(_R(IDC_OPTS_XDUPLICATE), offset.x, pSpread, TRUE, FALSE, -1);
Index: Trunk/XaraLX/Kernel/optstune.cpp
===================================================================
--- Trunk/XaraLX/Kernel/optstune.cpp (revision 929)
+++ Trunk/XaraLX/Kernel/optstune.cpp (revision 930)
@@ -116,6 +116,7 @@
#include "tunemem.h"
//#include "resource.h" // Needs _R(IDS_OK) for InformWarning
//#include "justin2.h"
+#include "ophist.h"
CC_IMPLEMENT_DYNAMIC(TuneTab, OptionsTabs)
@@ -276,8 +277,8 @@
// Ok has been pressed so take the values from this section of the dialog box
BOOL Valid=FALSE; // Flag for validity of value
- BOOL SetOk=TRUE; // Preference value set ok
- BOOL ReadOk=TRUE; // Value read ok from gadget
+// BOOL SetOk=TRUE; // Preference value set ok
+// BOOL ReadOk=TRUE; // Value read ok from gadget
// Now the maximum temporary memory available to Gdraw for rendering purposes
UINT32 TempWorkMem = 0; // Working memory value in bytes
@@ -356,7 +357,7 @@
// Ok has been pressed so take the values from this section of the dialog box
BOOL Valid=TRUE; // Flag for validity of value
- BOOL State=FALSE; // Flag for state of button/switch
+// BOOL State=FALSE; // Flag for state of button/switch
BOOL SetOk=TRUE; // Preference value set ok
// Section = Undo settings
@@ -405,7 +406,7 @@
Info.ErrorMsg = _R(IDT_OPTS_LOSSOFUNDO);
Info.Button[0] = _R(IDB_UNDOQUERY_RESIZE);
Info.Button[1] = _R(IDB_UNDOQUERY_DONTRESIZE);
- if (AskQuestion(&Info) == _R(IDB_UNDOQUERY_DONTRESIZE))
+ if ((ResourceID)AskQuestion(&Info) == _R(IDB_UNDOQUERY_DONTRESIZE))
{
// If the user has cancelled just display the current value again
OkToResize = FALSE;
@@ -519,7 +520,7 @@
double dValue = 0;
INT32 Pos = 0;
INT32 iValue = 0;
- Convert::ReadNumber(&strCachePercent, &Pos, &dValue); // Allow trailing chars
+ Convert::ReadNumber(strCachePercent, &Pos, &dValue); // Allow trailing chars
if (Valid && dValue>=1 && dValue<=100)
iValue = (INT32)dValue;
SetOk = Camelot.SetPrefValue(TEXT("Cache"), TEXT("CacheRAMPercent"), &iValue);
@@ -566,7 +567,7 @@
// is correct.
String_256 DocumentName(_R(IDT_OPTS_UNDO_INFO));
DocumentName += *GetDocumentName();
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_UNDOINFO), &DocumentName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_UNDOINFO), DocumentName);
// Only update if we are not already grey
if (GreyStatus == TRUE)
@@ -608,7 +609,7 @@
// is correct.
String_256 DocumentName(_R(IDT_OPTS_UNDO_INFO));
DocumentName += *GetDocumentName();
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_UNDOINFO), &DocumentName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_UNDOINFO), DocumentName);
// Only update if we are not already ungrey
if (GreyStatus == FALSE)
@@ -697,7 +698,7 @@
// is correct.
String_256 DocName(_R(IDT_OPTS_UNDO_INFO));
DocName += *DocumentName;
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_UNDOINFO), &DocName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_UNDOINFO), DocName);
// Remove any lists that we have created.
//pPrefsDlg->DeleteAllValues(_R(IDC_OPTS_SIZELIST));
@@ -741,35 +742,28 @@
break;
case DIM_LFT_BN_CLICKED:
OptionsTabs::SetApplyNowState(TRUE);
- switch (Msg->GadgetID)
+ if ((Msg->GadgetID == _R(IDC_OPTS_USEMAXMEMORY)) || (Msg->GadgetID == _R(IDC_OPTS_USELIMITMEM)))
{
- case _R(IDC_OPTS_USEMAXMEMORY):
- case _R(IDC_OPTS_USELIMITMEM):
- {
- BOOL Valid;
- BOOL UseMaximumMemory = pPrefsDlg->GetLongGadgetValue(_R(IDC_OPTS_USEMAXMEMORY), 0, 1, 0, &Valid);
- // If set then grey the editable field and its name text otherwise ungrey
- pPrefsDlg->EnableGadget(_R(IDC_OPTS_MEMLIMITTXT), !UseMaximumMemory);
- pPrefsDlg->EnableGadget(_R(IDC_OPTS_TEMPWORKMEM), !UseMaximumMemory);
- }
- break;
-
- case _R(IDC_OPTS_UNLIMITEDUNDO):
- case _R(IDC_OPTS_LIMITEDUNDO):
- {
- BOOL Valid;
- BOOL Unlimited = pPrefsDlg->GetLongGadgetValue(_R(IDC_OPTS_UNLIMITEDUNDO), 0, 1, 0, &Valid);
- // If set then grey the editable field and its name text otherwise ungrey
- pPrefsDlg->EnableGadget(_R(IDC_OPTS_UNDOLIMITTXT), !Unlimited);
- pPrefsDlg->EnableGadget(_R(IDC_OPTS_MAXUNDOSIZE), !Unlimited);
- }
- break;
+ BOOL Valid;
+ BOOL UseMaximumMemory = pPrefsDlg->GetLongGadgetValue(_R(IDC_OPTS_USEMAXMEMORY), 0, 1, 0, &Valid);
+ // If set then grey the editable field and its name text otherwise ungrey
+ pPrefsDlg->EnableGadget(_R(IDC_OPTS_MEMLIMITTXT), !UseMaximumMemory);
+ pPrefsDlg->EnableGadget(_R(IDC_OPTS_TEMPWORKMEM), !UseMaximumMemory);
}
- break;
+ else if ((Msg->GadgetID == _R(IDC_OPTS_UNLIMITEDUNDO)) || (Msg->GadgetID == _R(IDC_OPTS_LIMITEDUNDO)))
+ {
+ BOOL Valid;
+ BOOL Unlimited = pPrefsDlg->GetLongGadgetValue(_R(IDC_OPTS_UNLIMITEDUNDO), 0, 1, 0, &Valid);
+ // If set then grey the editable field and its name text otherwise ungrey
+ pPrefsDlg->EnableGadget(_R(IDC_OPTS_UNDOLIMITTXT), !Unlimited);
+ pPrefsDlg->EnableGadget(_R(IDC_OPTS_MAXUNDOSIZE), !Unlimited);
+ }
case DIM_SELECTION_CHANGED:
case DIM_TEXT_CHANGED:
OptionsTabs::SetApplyNowState(TRUE);
break;
+ default:
+ break;
}
return TRUE;
}
@@ -799,7 +793,7 @@
// The Maximum temporary workspace available to Gdraw
UINT32 TempWorkMem = TunedMemory::GetLimitedMemSize();
- UINT32 TempWorkMemK = TempWorkMem / 1024;
+// UINT32 TempWorkMemK = TempWorkMem / 1024;
BOOL UseMaximumMemory = TunedMemory::IsAutomaticMemory();
// Limit the values
@@ -861,7 +855,7 @@
TRACEUSER( "Neville", _T("TuneTab::InitUndoSection
"));
ERROR2IF(pPrefsDlg == NULL,FALSE,"TuneTab::InitUndoSection called with no dialog pointer");
- BOOL ReadOk = FALSE; // Flag to say whether the preference value was read ok
+// BOOL ReadOk = FALSE; // Flag to say whether the preference value was read ok
// Section = Undo settings
@@ -941,7 +935,7 @@
// is correct.
String_256 DocumentName(_R(IDT_OPTS_UNDO_INFO));
DocumentName += *GetDocumentName();
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_UNDOINFO), &DocumentName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_UNDOINFO), DocumentName);
InitRenderingSection();
@@ -965,9 +959,9 @@
Camelot.GetPrefValue(TEXT("Cache"), TEXT("CacheRAMPercent"), &iCacheRAMPercent);
TCHAR Str[32];
String_32 temp(_R(IDS_PERCENT_FORMAT));
- wsprintf(Str, temp, iCacheRAMPercent);
+ camSnprintf(Str, 32, temp, iCacheRAMPercent);
String_32 PercentStr(Str);
- pPrefsDlg->SetStringGadgetValue(_R(IDC_EDIT_CACHE_SIZE), &PercentStr);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_EDIT_CACHE_SIZE), PercentStr);
CBitmapCache* pCache = GetApplication()->GetBitmapCache();
if (pCache)
@@ -979,9 +973,9 @@
String_32 temp(_R(IDS_PERCENT_OF_FORMAT));
String_32 strCacheSize;
Convert::BytesToString(&strCacheSize, (UINT32)pCache->GetMaximumDataSize());
- wsprintf(Str, temp, iCacheUsagePercent, (TCHAR*)strCacheSize);
+ camSnprintf(Str, 32, temp, iCacheUsagePercent, (TCHAR*)strCacheSize);
String_32 PercentStr(Str);
- pPrefsDlg->SetStringGadgetValue(_R(IDC_EDIT_CURRENTCACHE), &PercentStr);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_EDIT_CURRENTCACHE), PercentStr);
// pPrefsDlg->SetLongGadgetValue(_R(IDC_PROGRESS_CACHEUSAGE), iCacheUsagePercent); // TODO: Should be percentage
}
Index: Trunk/XaraLX/Kernel/optsunit.cpp
===================================================================
--- Trunk/XaraLX/Kernel/optsunit.cpp (revision 929)
+++ Trunk/XaraLX/Kernel/optsunit.cpp (revision 930)
@@ -129,8 +129,8 @@
// Where the default colour units are stored...Use GetColourUnitPreference() to do the fetching.
-static char* ColourUnitSection = TEXT("Displays");
-static char* ColourUnitPreference = TEXT("ColourEditorUnits");
+static TCHAR* ColourUnitSection = TEXT("Displays");
+static TCHAR* ColourUnitPreference = TEXT("ColourEditorUnits");
// Set up the dialog box details stored as statics in the class
// This is for the user units properties dialog box
@@ -353,7 +353,7 @@
// is correct.
String_256 DocumentName(_R(IDT_OPTS_UNITS_INFO));
DocumentName += *GetDocumentName();
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), &DocumentName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), DocumentName);
// Only update if we are not already grey
if (GreyStatus == TRUE)
@@ -396,7 +396,7 @@
// is correct.
String_256 DocumentName(_R(IDT_OPTS_UNITS_INFO));
DocumentName += *GetDocumentName();
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), &DocumentName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), DocumentName);
// Only update if we are not already ungrey
if (GreyStatus == FALSE)
@@ -516,25 +516,17 @@
case DIM_LFT_BN_CLICKED:
OptionsTabs::SetApplyNowState(TRUE);
- switch (Msg->GadgetID)
- {
- case _R(IDC_OPTS_UNITPROPERTY):
- // Show the user the properties of the selected user unit
- ShowUnitProperties();
- break;
+ if (Msg->GadgetID == _R(IDC_OPTS_UNITPROPERTY))
+ // Show the user the properties of the selected user unit
+ ShowUnitProperties();
+ else if (Msg->GadgetID == _R(IDC_OPTS_NEWUNIT))
+ // Create the user a new unit
+ CreateNewUnit();
+ else if (Msg->GadgetID == _R(IDC_OPTS_DELETEUNIT))
+ // Delete the currently selected user unit
+ DeleteUnit();
+ break;
- case _R(IDC_OPTS_NEWUNIT):
- // Create the user a new unit
- CreateNewUnit();
- break;
-
- case _R(IDC_OPTS_DELETEUNIT):
- // Delete the currently selected user unit
- DeleteUnit();
- break;
- }
- break;
-
case DIM_SELECTION_CHANGED:
{
OptionsTabs::SetApplyNowState(TRUE);
@@ -542,24 +534,22 @@
WORD Index = 0;
Unit* pUnit = NULL;
- Unit* pCurUserUnit = NULL;
+// Unit* pCurUserUnit = NULL;
- switch (Msg->GadgetID)
+ if (Msg->GadgetID == _R(IDC_OPTS_UNITSLIST))
{
-
- case _R(IDC_OPTS_UNITSLIST):
- // Clicked on the list of user unit types
- // Now, switch to the new item
- pPrefsDlg->GetValueIndex(_R(IDC_OPTS_UNITSLIST), &Index);
- pUnit = pDocUnitList->FindUserUnit(Index);
- if (pUnit != NULL)
- {
- CurrentUserUnitType = pUnit->GetUnitType();
- }
- break;
+ // Clicked on the list of user unit types
+ // Now, switch to the new item
+ pPrefsDlg->GetValueIndex(_R(IDC_OPTS_UNITSLIST), &Index);
+ pUnit = pDocUnitList->FindUserUnit(Index);
+ if (pUnit != NULL)
+ {
+ CurrentUserUnitType = pUnit->GetUnitType();
+ }
}
- break; // DIM_SELECTION_CHANGED
}
+ default:
+ break;
}
return TRUE;
@@ -631,7 +621,7 @@
}
ScaleUnit* pColourUnit = (ScaleUnit*)m_ColourUnitRadioGroup.GetSelected();
- ERROR3IF(pColourUnit == NULL, "UnitsTab::CommitDialogValues - Gibberish from GetSelected()")
+ ERROR3IF(pColourUnit == NULL, "UnitsTab::CommitDialogValues - Gibberish from GetSelected()");
// If we have changed the units from the entry ones then tell other users about the change
// Do a blantant update if the current user units are the current page or font units
@@ -648,13 +638,13 @@
// the Colour Editor is listening
if (m_pOldColourUnit != pColourUnit)
{
- ERROR3IF(!(pColourUnit->IS_KIND_OF(ScaleUnit)), "UnitsTab::CommitDialogValues - Not ScaleUnit")
+ ERROR3IF(!(pColourUnit->IS_KIND_OF(ScaleUnit)), "UnitsTab::CommitDialogValues - Not ScaleUnit");
Camelot.SetPrefDirect(ColourUnitSection, ColourUnitPreference, pColourUnit->GetQualifier()->GetToken(), TRUE);
m_pOldColourUnit = pColourUnit;
}
// Now tell other users of units that there is a possibly new default units in operation
// and so update any currently displayed units.
- BROADCAST_TO_ALL(OptionsChangingMsg(pDocument, OptionsChangingMsg::OptionsState::NEWUNITS));
+ BROADCAST_TO_ALL(OptionsChangingMsg(pDocument, OptionsChangingMsg::NEWUNITS));
// Mark the document as modified as we have changed something that is saved with the
// document but only if the page or font units have changed.
@@ -735,9 +725,9 @@
if (Ok)
{
EnableControls();
- SetUnitToken(_R(IDC_OPTS_PAGEUNITS), CurrentUserUnitType,NULL,TRUE);
+ SetUnitToken(_R(IDC_OPTS_PAGEUNITS), CurrentUserUnitType, 0,TRUE);
//SetUnitToken(_R(IDC_OPTS_SCALEDUNITS),CurrentUserUnitType,NULL,TRUE);
- SetUnitToken(_R(IDC_OPTS_FONTUNITS), CurrentUserUnitType,NULL,TRUE);
+ SetUnitToken(_R(IDC_OPTS_FONTUNITS), CurrentUserUnitType, 0,TRUE);
InitControls();
// Now make sure the current user unit is selected in the list
SelectCurrentUserUnit();
@@ -827,7 +817,7 @@
BOOL ok = TRUE;
double dummy = 0.0;
Str = pDimScale->GetDrawingScaleStr();
- ok = Convert::StringToComponents(&Str, &dummy, &ScaleUnits);
+ ok = Convert::StringToComponents(Str, &dummy, &ScaleUnits);
if (ok && CurrentUserUnitType == ScaleUnits)
DeleteReason = UNITREASON_BEINGUSED;
}
@@ -993,8 +983,8 @@
ERROR2IF(pDocUnitList == NULL,FALSE,"UnitsTab::UpdateUnitListControls called with no doc unit list pointer");
// Make sure that we have the text for the current unit up to date
- String_256 TokenStr = "";
- String_32 TokenStr_32 = "";
+ String_256 TokenStr = _T("");
+ String_32 TokenStr_32 = _T("");
Unit* pCurUserUnit = NULL;
pCurUserUnit = pDocUnitList->FindUnit(CurrentUserUnitType);
@@ -1010,8 +1000,8 @@
// These lists have all units on
pPrefsDlg->DeleteValue(_R(IDC_OPTS_PAGEUNITS), FALSE, UnitIndex);
pPrefsDlg->DeleteValue(_R(IDC_OPTS_FONTUNITS), FALSE, UnitIndex);
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_PAGEUNITS), &TokenStr, FALSE, UnitIndex);
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_FONTUNITS), &TokenStr, FALSE, UnitIndex);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_PAGEUNITS), TokenStr, FALSE, UnitIndex);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_FONTUNITS), TokenStr, FALSE, UnitIndex);
// Must set the selected item as otherwise it will blank the main list item.
@@ -1053,7 +1043,7 @@
{
String_32 Str = pDocUnitList->GetToken(ThisUnitType);
String_256 Str256 = Str;
- pPrefsDlg->SetStringGadgetValue(ID, &Str256, EndOfList, Index);
+ pPrefsDlg->SetStringGadgetValue(ID, Str256, EndOfList, Index);
}
/********************************************************************************************
@@ -1114,7 +1104,7 @@
(TCHAR*)Denominator, (TCHAR*)Numerator,
(TCHAR*)BasedOn);
- pPrefsDlg->SetStringGadgetValue(ID, &Details, EndOfList, Index);
+ pPrefsDlg->SetStringGadgetValue(ID, Details, EndOfList, Index);
}
/********************************************************************************************
@@ -1321,7 +1311,7 @@
// is correct.
String_256 DocumentName(_R(IDT_OPTS_UNITS_INFO));
DocumentName += *GetDocumentName();
- pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), &DocumentName);
+ pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), DocumentName);
m_ColourUnitRadioGroup.SetAssociations((DialogOp*)pPrefsDlg, ColourUnitAssociations, NUM_CLR_DEFAULTS);
@@ -1400,7 +1390,7 @@
// Send in some useful paramters
BOOL IsEditOK = FALSE;
UnitType CurUserUnitType = CurrentUserUnitType;
- OpParam Params((INT32)&CurUserUnitType, (INT32)&IsEditOK);
+ OpParam Params((void *)&CurUserUnitType, (void *)&IsEditOK);
if (pOpDesc != NULL)
pOpDesc->Invoke(&Params);
@@ -1544,7 +1534,7 @@
// As long as we have a valid user unit pointer, go and set the new values in it
//TCHAR* pTokenStr = TokenStr;
//TCHAR* pSpecifierStr = SpecifierStr;
- String_32 Str32 = "";
+ String_32 Str32 = _T("");
if (pCurUserUnit != NULL)
{
BOOL ok = TRUE;
@@ -1676,52 +1666,50 @@
Unit* pUnit = NULL;
Unit* pCurUserUnit = NULL;
- switch (Msg->GadgetID)
+ if (Msg->GadgetID == _R(IDC_OPTS_BASEUNIT))
{
- case _R(IDC_OPTS_BASEUNIT):
- // The user has chosen a new base unit
- GetValueIndex(_R(IDC_OPTS_BASEUNIT),&Index);
- pUnit = pDocUnitList->FindUnit(Index);
- pCurUserUnit = pDocUnitList->FindUnit(CurrentUserUnitType);
- if (pUnit->GetUnitType() == CurrentUserUnitType)
- {
- // Warn the user that this is the current unit
- Error::SetError(_R(IDS_UNITERROR_BASEISCURRENT),0);
- InformError();
- // And reselect the old one unit type in the list
- UnitType BaseUnit = pCurUserUnit->GetBaseUnitType();
- INT32 BaseUnitIndex = pDocUnitList->FindUnitIndex(BaseUnit);
- SetSelectedValueIndex(_R(IDC_OPTS_BASEUNIT), BaseUnitIndex);
- }
- else if (pDocUnitList->IsDescendent(pUnit,CurrentUserUnitType))
- {
- // Warn the user that the selected unit is a descendent
- Error::SetError(_R(IDS_UNITERROR_BASEISDESCENDENT),0);
- InformError();
- // And reselect the old one unit type in the list
- UnitType BaseUnit = pCurUserUnit->GetBaseUnitType();
- INT32 BaseUnitIndex = pDocUnitList->FindUnitIndex(BaseUnit);
- SetSelectedValueIndex(_R(IDC_OPTS_BASEUNIT), BaseUnitIndex);
- }
- // Otherwise selection is ok so do nothing
- break;
+ // The user has chosen a new base unit
+ GetValueIndex(_R(IDC_OPTS_BASEUNIT),&Index);
+ pUnit = pDocUnitList->FindUnit(Index);
+ pCurUserUnit = pDocUnitList->FindUnit(CurrentUserUnitType);
+ if (pUnit->GetUnitType() == CurrentUserUnitType)
+ {
+ // Warn the user that this is the current unit
+ Error::SetError(_R(IDS_UNITERROR_BASEISCURRENT),0);
+ InformError();
+ // And reselect the old one unit type in the list
+ UnitType BaseUnit = pCurUserUnit->GetBaseUnitType();
+ INT32 BaseUnitIndex = pDocUnitList->FindUnitIndex(BaseUnit);
+ SetSelectedValueIndex(_R(IDC_OPTS_BASEUNIT), BaseUnitIndex);
+ }
+ else if (pDocUnitList->IsDescendent(pUnit,CurrentUserUnitType))
+ {
+ // Warn the user that the selected unit is a descendent
+ Error::SetError(_R(IDS_UNITERROR_BASEISDESCENDENT),0);
+ InformError();
+ // And reselect the old one unit type in the list
+ UnitType BaseUnit = pCurUserUnit->GetBaseUnitType();
+ INT32 BaseUnitIndex = pDocUnitList->FindUnitIndex(BaseUnit);
+ SetSelectedValueIndex(_R(IDC_OPTS_BASEUNIT), BaseUnitIndex);
+ }
+ // Otherwise selection is ok so do nothing
}
}
break; // DIM_SELECTION_CHANGED
case DIM_TEXT_CHANGED:
- switch (Msg->GadgetID)
+ if (Msg->GadgetID == _R(IDC_OPTS_UNITTOKEN))
{
- case _R(IDC_OPTS_UNITTOKEN):
- // User is editing the main user unit name
- // Update the text in the X <UnitsName> are equivalent to ... field
- BOOL Valid;
- String_256 TokenStr = GetStringGadgetValue(_R(IDC_OPTS_UNITTOKEN),&Valid);
- SetStringGadgetValue(_R(IDC_OPTS_UNITTOKEN2),&TokenStr);
-
- break;
+ // User is editing the main user unit name
+ // Update the text in the X <UnitsName> are equivalent to ... field
+ BOOL Valid;
+ String_256 TokenStr = GetStringGadgetValue(_R(IDC_OPTS_UNITTOKEN),&Valid);
+ SetStringGadgetValue(_R(IDC_OPTS_UNITTOKEN2),TokenStr);
}
break; // DIM_TEXT_CHANGED
+
+ default:
+ break;
}
// Must do this before the Close and End
@@ -1963,8 +1951,8 @@
// Use the OpParam that has been passed in to us
// Force a decent CurrentUserUnitType
CurrentUserUnitType = NOTYPE;
- UnitType * pCurUserUnitType = (UnitType*) pOpParam->Param1;
- pIsOk = (BOOL*) pOpParam->Param2;
+ UnitType * pCurUserUnitType = (UnitType*) (void *) pOpParam->Param1;
+ pIsOk = (BOOL*) (void *) pOpParam->Param2;
CurrentUserUnitType = *pCurUserUnitType;
@@ -2008,7 +1996,7 @@
{
String_32 Str = pDocUnitList->GetToken(ThisUnitType);
String_256 Str256 = Str;
- SetStringGadgetValue(ID, &Str256, EndOfList, Index);
+ SetStringGadgetValue(ID, Str256, EndOfList, Index);
}
}
@@ -2051,7 +2039,7 @@
// Show the name of the user's unit
Str = pCurUserUnit->GetSpecifier();
Str256 = Str;
- SetStringGadgetValue(_R(IDC_OPTS_UNITSPEC), &Str256);
+ SetStringGadgetValue(_R(IDC_OPTS_UNITSPEC), Str256);
// Set up the prefix/suffix state for this user's unit.
BOOL PrefixState = FALSE;
@@ -2090,12 +2078,12 @@
// Blank everything as unit is NOTYPE
String_256 Str256 = "";
- SetStringGadgetValue(_R(IDC_OPTS_UNITTOKEN), &Str256);
- SetStringGadgetValue(_R(IDC_OPTS_UNITTOKEN2), &Str256);
- SetStringGadgetValue(_R(IDC_OPTS_UNITSPEC), &Str256);
- SetStringGadgetValue(_R(IDC_OPTS_NUMNEWUNITS), &Str256);
- SetStringGadgetValue(_R(IDC_OPTS_NUMBASEUNITS), &Str256);
- SetStringGadgetValue(_R(IDC_OPTS_BASEUNIT), &Str256);
+ SetStringGadgetValue(_R(IDC_OPTS_UNITTOKEN), Str256);
+ SetStringGadgetValue(_R(IDC_OPTS_UNITTOKEN2), Str256);
+ SetStringGadgetValue(_R(IDC_OPTS_UNITSPEC), Str256);
+ SetStringGadgetValue(_R(IDC_OPTS_NUMNEWUNITS), Str256);
+ SetStringGadgetValue(_R(IDC_OPTS_NUMBASEUNITS), Str256);
+ SetStringGadgetValue(_R(IDC_OPTS_BASEUNIT), Str256);
}
return TRUE;
Index: Trunk/XaraLX/Scripts/rc2xml.pl
===================================================================
--- Trunk/XaraLX/Scripts/rc2xml.pl (revision 929)
+++ Trunk/XaraLX/Scripts/rc2xml.pl (revision 930)
@@ -147,7 +147,7 @@
sub IsPanel
{
my $name=shift @_;
- return 1 if ($name=~/^(IDD_TBITMAPSIZE|IDD_TIMAPOPTIONS|IDD_TBROWSER|IDD_TBITMAPOPTIONS|IDD_PALETTE_TAB)$/);
+ return 1 if ($name=~/^(IDD_TBITMAPSIZE|IDD_TIMAPOPTIONS|IDD_TBROWSER|IDD_TBITMAPOPTIONS|IDD_PALETTE_TAB|IDD_OPTSTAB_VIEW|IDD_OPTSTAB_MISC|IDD_OPTSTAB_PAGE|IDD_OPTSTAB_TUNE|IDD_OPTSTAB_SCALE|IDD_OPTSTAB_POINTERS|IDD_OPTSTAB_GRID|IDD_OPTSTAB_UNITS|IDD_OPTSTAB_PLUGINS|IDD_OPTSTAB_PRINTLAYOUT|IDD_OPTSTAB_PRINTGENERAL|IDD_OPTSTAB_PRINTPRINT|IDD_OPTSTAB_IMAGESETTING|IDD_OPTSTAB_INTERNET|IDD_BLOBTAB_PG1|IDD_BLOBTAB_PG2|IDD_BLOBTAB_PG3|IDD_TAB_ANIMATION_COLOURS|IDD_TAB_FRAME_PROPERTIES|IDD_TAB_ANIMATION_PROPERTIES|IDD_TAB_PREVIEW_IN_BROWSER|IDD_TAB_GUIDELINE_PROPERTIES|IDD_TAB_LAYER_PROPERTIES)$/);
return 0;
}
Xara