summaryrefslogtreecommitdiff
path: root/app/bin/doption.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2022-02-06 16:04:24 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2022-02-06 16:04:24 +0100
commit5d2c2b27a6323e2666378b986129b2a7c2c39e5c (patch)
treece8982b6c0111f79791068de2c2d4c6ce3138a49 /app/bin/doption.c
parentb623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff)
New upstream version 5.2.2GAupstream/5.2.2GA
Diffstat (limited to 'app/bin/doption.c')
-rw-r--r--app/bin/doption.c195
1 files changed, 100 insertions, 95 deletions
diff --git a/app/bin/doption.c b/app/bin/doption.c
index 3b9ed02..d196558 100644
--- a/app/bin/doption.c
+++ b/app/bin/doption.c
@@ -20,20 +20,18 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include <ctype.h>
-
#include "ccurve.h"
#include "cselect.h"
#include "custom.h"
-#include "i18n.h"
-#include "messages.h"
#include "param.h"
#include "track.h"
+#include "common-ui.h"
-static paramIntegerRange_t i0_64 = { 0, 64 };
static paramIntegerRange_t i1_64 = { 1, 64 };
static paramIntegerRange_t i1_100 = { 1, 100 };
+static paramIntegerRange_t i0_256 = { 0, 256 };
static paramIntegerRange_t i1_256 = { 1, 256 };
+static paramIntegerRange_t i1_1024 = { 1, 1024 };
static paramIntegerRange_t i0_10000 = { 0, 10000 };
static paramIntegerRange_t i0_99 = { 0, 99};
static paramIntegerRange_t i1_1000 = { 1, 1000 };
@@ -62,7 +60,7 @@ long GetChanges( paramGroup_p pg )
int inx;
for ( changed=ParamUpdate(pg),inx=0,changes=0; changed; changed>>=1,inx++ ) {
if ( changed&1 )
- changes |= (long)pg->paramPtr[inx].context;
+ changes |= VP2L(pg->paramPtr[inx].context);
}
return changes;
}
@@ -71,45 +69,7 @@ static paramGroup_t prefPG;
-static void OptionDlgUpdate(
- paramGroup_p pg,
- int inx,
- void * valueP )
-{
- if ( inx < 0 ) return;
- if ( pg->paramPtr[inx].valueP == &enableBalloonHelp ) {
- wEnableBalloonHelp((wBool_t)*(long*)valueP);
- } else {
- if (pg->paramPtr[inx].valueP == &units) {
- UpdatePrefD();
- }
- if (pg->paramPtr[inx].valueP == &distanceFormatInx) {
- UpdateMeasureFmt();
- }
- if (pg->paramPtr[inx].valueP == &showFlexTrack) {
- DoChangeNotification(CHANGE_PARAMS|CHANGE_TOOLBAR);
- }
- if (pg->paramPtr[inx].valueP == &checkPtInterval) {
- checkPtInterval = *(long *)valueP;
- if (checkPtInterval == 0 ) {
- wControlSetBalloon( pg->paramPtr[inx].control, 0, -5, _("Turning off AutoSave") );
- UpdateAutoSaveInterval(0);
- } else {
- wControlSetBalloon( pg->paramPtr[inx].control, 0, -5, NULL );
- }
- }
- if (pg->paramPtr[inx].valueP == &autosaveChkPoints) {
- autosaveChkPoints = *(long *)valueP;
- if (checkPtInterval == 0 && autosaveChkPoints>0 ) {
- wControlSetBalloon( pg->paramPtr[inx].control, 0, -5, _("Turning on CheckPointing") );
- UpdateChkPtInterval(10);
- } else {
- wControlSetBalloon( pg->paramPtr[inx].control, 0, -5, NULL );
- }
- }
- }
-}
static void OptionDlgCancel(
wWin_p win )
@@ -141,37 +101,40 @@ static char * colorDrawLabels[] = { N_("Object"), N_("Layer"), NULL };
static char * liveMapLabels[] = { N_("Live Map"), NULL };
static char * hideTrainsInTunnelsLabels[] = { N_("Hide Trains On Hidden Track"), NULL };
static char * constrainMainLabels[] = {N_("Constrain Drawing Area to Room boundaries"), NULL};
+static char * dontHideLabels[] = {N_("Don't Hide System Cursor when program cursor is active"), NULL};
extern long trainPause;
static paramData_t displayPLs[] = {
- { PD_RADIO, &colorTrack, "color-track", PDO_NOPSHUPD|PDO_DRAW, colorTrackLabels, N_("Color Track"), BC_HORZ, (void*)(CHANGE_MAIN) },
- { PD_RADIO, &colorDraw, "color-draw", PDO_NOPSHUPD|PDO_DRAW, colorDrawLabels, N_("Color Draw"), BC_HORZ, (void*)(CHANGE_MAIN) },
- { PD_RADIO, &drawTunnel, "tunnels", PDO_NOPSHUPD|PDO_DRAW, drawTunnelLabels, N_("Draw Tunnel"), BC_HORZ, (void*)(CHANGE_MAIN) },
- { PD_RADIO, &drawEndPtV, "endpt", PDO_NOPSHUPD|PDO_DRAW, drawEndPtLabels3, N_("Draw EndPts"), BC_HORZ, (void*)(CHANGE_MAIN) },
- { PD_RADIO, &drawUnconnectedEndPt, "unconnected-endpt", PDO_NOPSHUPD|PDO_DRAW, drawEndPtUnconnectedSize, N_("Draw Unconnected EndPts"), BC_HORZ, (void*)(CHANGE_MAIN) },
- { PD_RADIO, &tieDrawMode, "tiedraw", PDO_NOPSHUPD|PDO_DRAW, tiedrawLabels, N_("Draw Ties"), BC_HORZ, (void*)(CHANGE_MAIN) },
- { PD_RADIO, &centerDrawMode, "centerdraw", PDO_NOPSHUPD|PDO_DRAW, drawCenterCircle, N_("Draw Centers"), BC_HORZ, (void*)(CHANGE_MAIN | CHANGE_MAP) },
- { PD_LONG, &twoRailScale, "tworailscale", PDO_NOPSHUPD, &i1_64, N_("Two Rail Scale"), 0, (void*)(CHANGE_MAIN) },
- { PD_LONG, &mapScale, "mapscale", PDO_NOPSHUPD, &i1_256, N_("Map Scale"), 0, (void*)(CHANGE_MAP) },
+ { PD_RADIO, &colorTrack, "color-track", PDO_NOPSHUPD|PDO_DRAW, colorTrackLabels, N_("Color Track"), BC_HORZ, I2VP(CHANGE_MAIN) },
+ { PD_RADIO, &colorDraw, "color-draw", PDO_NOPSHUPD|PDO_DRAW, colorDrawLabels, N_("Color Draw"), BC_HORZ, I2VP(CHANGE_MAIN) },
+ { PD_RADIO, &drawTunnel, "tunnels", PDO_NOPSHUPD|PDO_DRAW, drawTunnelLabels, N_("Draw Tunnel"), BC_HORZ, I2VP(CHANGE_MAIN) },
+ { PD_RADIO, &drawEndPtV, "endpt", PDO_NOPSHUPD|PDO_DRAW, drawEndPtLabels3, N_("Draw EndPts"), BC_HORZ, I2VP(CHANGE_MAIN) },
+ { PD_RADIO, &drawUnconnectedEndPt, "unconnected-endpt", PDO_NOPSHUPD|PDO_DRAW, drawEndPtUnconnectedSize, N_("Draw Unconnected EndPts"), BC_HORZ, I2VP(CHANGE_MAIN) },
+ { PD_RADIO, &tieDrawMode, "tiedraw", PDO_NOPSHUPD|PDO_DRAW, tiedrawLabels, N_("Draw Ties"), BC_HORZ, I2VP(CHANGE_MAIN) },
+ { PD_RADIO, &centerDrawMode, "centerdraw", PDO_NOPSHUPD|PDO_DRAW, drawCenterCircle, N_("Draw Centers"), BC_HORZ, I2VP(CHANGE_MAIN | CHANGE_MAP) },
+ { PD_LONG, &twoRailScale, "tworailscale", PDO_NOPSHUPD, &i1_256, N_("Two Rail Scale"), 0, I2VP(CHANGE_MAIN) },
+ { PD_LONG, &mapScale, "mapscale", PDO_NOPSHUPD, &i1_1024, N_("Map Scale"), 0, I2VP(CHANGE_MAP) },
+ { PD_TOGGLE, &dontHideCursor, "donthidecursor", PDO_NOPSHUPD, dontHideLabels, "", BC_HORZ },
{ PD_TOGGLE, &constrainMain, "constrainmain", PDO_NOPSHUPD, constrainMainLabels, "", BC_HORZ },
{ PD_TOGGLE, &liveMap, "livemap", PDO_NOPSHUPD, liveMapLabels, "", BC_HORZ },
{ PD_TOGGLE, &autoPan, "autoPan", PDO_NOPSHUPD, autoPanLabels, "", BC_HORZ },
- { PD_TOGGLE, &labelEnable, "labelenable", PDO_NOPSHUPD, labelEnableLabels, N_("Label Enable"), 0, (void*)(CHANGE_MAIN) },
- { PD_LONG, &labelScale, "labelscale", PDO_NOPSHUPD, &i0_64, N_("Label Scale"), 0, (void*)(CHANGE_MAIN) },
- { PD_LONG, &descriptionFontSize, "description-fontsize", PDO_NOPSHUPD, &i1_1000, N_("Label Font Size"), 0, (void*)(CHANGE_MAIN) },
- { PD_TOGGLE, &hotBarLabels, "hotbarlabels", PDO_NOPSHUPD, hotBarLabelsLabels, N_("Hot Bar Labels"), BC_HORZ, (void*)(CHANGE_TOOLBAR) },
- { PD_TOGGLE, &layoutLabels, "layoutlabels", PDO_NOPSHUPD, listLabelsLabels, N_("Layout Labels"), BC_HORZ, (void*)(CHANGE_MAIN) },
- { PD_TOGGLE, &listLabels, "listlabels", PDO_NOPSHUPD, listLabelsLabels, N_("List Labels"), BC_HORZ, (void*)(CHANGE_PARAMS) },
+#define labelSelect (12)
+ { PD_TOGGLE, &labelEnable, "labelenable", PDO_NOPSHUPD, labelEnableLabels, N_("Label Enable"), 0, I2VP(CHANGE_MAIN) },
+ { PD_LONG, &labelScale, "labelscale", PDO_NOPSHUPD, &i0_256, N_("Label Scale"), 0, I2VP(CHANGE_MAIN) },
+ { PD_LONG, &descriptionFontSize, "description-fontsize", PDO_NOPSHUPD, &i1_1000, N_("Label Font Size"), 0, I2VP(CHANGE_MAIN) },
+ { PD_TOGGLE, &hotBarLabels, "hotbarlabels", PDO_NOPSHUPD, hotBarLabelsLabels, N_("Hot Bar Labels"), BC_HORZ, I2VP(CHANGE_TOOLBAR) },
+ { PD_TOGGLE, &layoutLabels, "layoutlabels", PDO_NOPSHUPD, listLabelsLabels, N_("Layout Labels"), BC_HORZ, I2VP(CHANGE_MAIN) },
+ { PD_TOGGLE, &listLabels, "listlabels", PDO_NOPSHUPD, listLabelsLabels, N_("List Labels"), BC_HORZ, I2VP(CHANGE_PARAMS) },
/* ATTENTION: update the define below if you add entries above */
-#define I_HOTBARLABELS (18)
- { PD_DROPLIST, &carHotbarModeInx, "carhotbarlabels", PDO_NOPSHUPD|PDO_DLGUNDERCMDBUTT|PDO_LISTINDEX, (void*)250, N_("Car Labels"), 0, (void*)CHANGE_SCALE },
+#define I_HOTBARLABELS (19)
+ { PD_DROPLIST, &carHotbarModeInx, "carhotbarlabels", PDO_NOPSHUPD|PDO_DLGUNDERCMDBUTT|PDO_LISTINDEX, I2VP(250), N_("Car Labels"), 0, I2VP(CHANGE_SCALE) },
{ PD_LONG, &trainPause, "trainpause", PDO_NOPSHUPD, &i10_1000 , N_("Train Update Delay"), 0, 0 },
{ PD_TOGGLE, &hideTrainsInTunnels, "hideTrainsInTunnels", PDO_NOPSHUPD, hideTrainsInTunnelsLabels, "", BC_HORZ }
};
-static paramGroup_t displayPG = { "display", PGO_RECORD|PGO_PREFMISC, displayPLs, sizeof displayPLs/sizeof displayPLs[0] };
+static paramGroup_t displayPG = { "display", PGO_RECORD|PGO_PREFMISC, displayPLs, COUNT( displayPLs ) };
static void DisplayOk( void * junk )
@@ -183,27 +146,65 @@ static void DisplayOk( void * junk )
}
-#ifdef LATER
-static void DisplayChange( long changes )
+static void OptionDlgUpdate(
+ paramGroup_p pg,
+ int inx,
+ void * valueP )
{
- if (changes & (CHANGE_SCALE|CHANGE_UNITS))
- if (displayW != NULL && wWinIsVisible(displayW) )
- ParamLoadControls( &displayPG );
-}
-#endif
+ if ( inx < 0 ) return;
+ if ( pg->paramPtr[inx].valueP == &enableBalloonHelp ) {
+ wEnableBalloonHelp((wBool_t)*(long*)valueP);
+ } else {
+ if (pg->paramPtr[inx].valueP == &labelEnable) {
+ long new_labels = wRadioGetValue( (wChoice_p)pg->paramPtr[inx].control );
+ labelEnable = new_labels;
+ ParamLoadControl(&displayPG,labelSelect);
+ }
+ if (pg->paramPtr[inx].valueP == &units) {
+ UpdatePrefD();
+ }
+ if (pg->paramPtr[inx].valueP == &distanceFormatInx) {
+ UpdateMeasureFmt();
+ }
+ if (pg->paramPtr[inx].valueP == &showFlexTrack) {
+ DoChangeNotification(CHANGE_PARAMS|CHANGE_TOOLBAR);
+ }
+ if (pg->paramPtr[inx].valueP == &checkPtInterval) {
+ checkPtInterval = *(long *)valueP;
+ if (checkPtInterval == 0 ) {
+ wWinPix_t h = wControlGetHeight(pg->paramPtr[inx].control);
+ wControlSetBalloon( pg->paramPtr[inx].control, 0, h*3/4, _("Turning off AutoSave") );
+ UpdateAutoSaveInterval(0);
+ } else {
+ wControlSetBalloon( pg->paramPtr[inx].control, 0, 0, NULL );
+ }
+ }
+ if (pg->paramPtr[inx].valueP == &autosaveChkPoints) {
+ autosaveChkPoints = *(long *)valueP;
+ if (checkPtInterval == 0 && autosaveChkPoints>0 ) {
+ wWinPix_t h = wControlGetHeight(pg->paramPtr[inx].control);
+ wControlSetBalloon( pg->paramPtr[inx].control, 0, -h*3/4, _("Turning on CheckPointing") );
+ UpdateChkPtInterval(10);
+ } else {
+ wControlSetBalloon( pg->paramPtr[inx].control, 0, 0, NULL );
+ }
+ }
+
+ }
+}
static void DoDisplay( void * junk )
{
if (displayW == NULL) {
displayW = ParamCreateDialog( &displayPG, MakeWindowTitle(_("Display Options")), _("Ok"), DisplayOk, OptionDlgCancel, TRUE, NULL, 0, OptionDlgUpdate );
- wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Proto"), NULL, (void*)0x0002 );
- wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Proto/Manuf"), NULL, (void*)0x0012 );
- wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Proto/Manuf/Part Number"), NULL, (void*)0x0312 );
- wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Proto/Manuf/Partno/Item"), NULL, (void*)0x4312 );
- wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Manuf/Proto"), NULL, (void*)0x0021 );
- wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Manuf/Proto/Part Number"), NULL, (void*)0x0321 );
- wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Manuf/Proto/Partno/Item"), NULL, (void*)0x4321 );
+ wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Proto"), NULL, I2VP(0x0002) );
+ wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Proto/Manuf"), NULL, I2VP(0x0012) );
+ wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Proto/Manuf/Part Number"), NULL, I2VP(0x0312) );
+ wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Proto/Manuf/Partno/Item"), NULL, I2VP(0x4312) );
+ wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Manuf/Proto"), NULL, I2VP(0x0021) );
+ wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Manuf/Proto/Part Number"), NULL, I2VP(0x0321) );
+ wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Manuf/Proto/Partno/Item"), NULL, I2VP(0x4321) );
}
ParamLoadControls( &displayPG );
@@ -250,7 +251,7 @@ EXPORT paramData_t cmdoptPLs[] = {
{ PD_RADIO, &selectMode, "selectmode", PDO_NOPSHUPD, selectLabels, N_("Select Mode"), 0},
{ PD_TOGGLE, &selectZero, "selectzero", PDO_NOPSHUPD, selectZeroLabels, "", 0 }
};
-static paramGroup_t cmdoptPG = { "cmdopt", PGO_RECORD|PGO_PREFMISC, cmdoptPLs, sizeof cmdoptPLs/sizeof cmdoptPLs[0] };
+static paramGroup_t cmdoptPG = { "cmdopt", PGO_RECORD|PGO_PREFMISC, cmdoptPLs, COUNT( cmdoptPLs ) };
static void CmdoptOk( void * junk )
{
@@ -295,6 +296,7 @@ EXPORT addButtonCallBack_t CmdoptInit( void )
static wWin_p prefW;
static long displayUnits;
+static char * iconSizeLabels[] = { N_("16 px"), N_("24 px"), N_("32 px"), NULL };
static char * unitsLabels[] = { N_("English"), N_("Metric"), NULL };
static char * angleSystemLabels[] = { N_("Polar"), N_("Cartesian"), NULL };
static char * enableBalloonHelpLabels[] = { N_("Balloon Help"), NULL };
@@ -302,10 +304,11 @@ static char * enableFlexTrackLabels[] = { N_("Show FlexTrack in HotBar"), NULL }
static char * startOptions[] = { N_("Load Last Layout"), N_("Start New Layout"), NULL };
static paramData_t prefPLs[] = {
+ { PD_RADIO, &iconSize, "iconsize", PDO_NOPSHUPD, iconSizeLabels, N_("Icon Size"), BC_HORZ, I2VP(CHANGE_ICONSIZE) },
{ PD_RADIO, &angleSystem, "anglesystem", PDO_NOPSHUPD, angleSystemLabels, N_("Angles"), BC_HORZ },
- { PD_RADIO, &units, "units", PDO_NOPSHUPD|PDO_NOUPDACT, unitsLabels, N_("Units"), BC_HORZ, (void*)(CHANGE_MAIN|CHANGE_UNITS) },
-#define I_DSTFMT (2)
- { PD_DROPLIST, &distanceFormatInx, "dstfmt", PDO_DIM|PDO_NOPSHUPD|PDO_LISTINDEX, (void*)150, N_("Length Format"), 0, (void*)(CHANGE_MAIN|CHANGE_UNITS) },
+ { PD_RADIO, &units, "units", PDO_NOPSHUPD|PDO_NOUPDACT, unitsLabels, N_("Units"), BC_HORZ, I2VP(CHANGE_MAIN|CHANGE_UNITS) },
+#define I_DSTFMT (3)
+ { PD_DROPLIST, &distanceFormatInx, "dstfmt", PDO_DIM|PDO_NOPSHUPD|PDO_LISTINDEX, I2VP(150), N_("Length Format"), 0, I2VP(CHANGE_MAIN|CHANGE_UNITS) },
{ PD_FLOAT, &minLength, "minlength", PDO_DIM|PDO_SMALLDIM|PDO_NOPSHUPD, &r0o1_1, N_("Min Track Length") },
{ PD_FLOAT, &connectDistance, "connectdistance", PDO_DIM|PDO_SMALLDIM|PDO_NOPSHUPD, &r0o1_1, N_("Connection Distance"), },
{ PD_FLOAT, &connectAngle, "connectangle", PDO_NOPSHUPD, &r1_10, N_("Connection Angle") },
@@ -316,13 +319,13 @@ static paramData_t prefPLs[] = {
{ PD_LONG, &dragPixels, "dragpixels", PDO_NOPSHUPD|PDO_DRAW, &i1_1000, N_("Drag Distance") },
{ PD_LONG, &dragTimeout, "dragtimeout", PDO_NOPSHUPD|PDO_DRAW, &i1_1000, N_("Drag Timeout") },
{ PD_LONG, &minGridSpacing, "mingridspacing", PDO_NOPSHUPD|PDO_DRAW, &i1_100, N_("Min Grid Spacing"), 0, 0 },
-#define I_CHKPT (13)
+#define I_CHKPT (14)
{ PD_LONG, &checkPtInterval, "checkpoint", PDO_NOPSHUPD|PDO_FILE, &i0_10000, N_("Check Point Frequency") },
-#define I_AUTOSAVE (14)
+#define I_AUTOSAVE (15)
{ PD_LONG, &autosaveChkPoints, "autosave", PDO_NOPSHUPD|PDO_FILE, &i0_99, N_("Autosave Checkpoint Frequency") },
{ PD_RADIO, &onStartup, "onstartup", PDO_NOPSHUPD, startOptions, N_("On Program Startup"), 0, NULL }
};
-static paramGroup_t prefPG = { "pref", PGO_RECORD|PGO_PREFMISC, prefPLs, sizeof prefPLs/sizeof prefPLs[0] };
+static paramGroup_t prefPG = { "pref", PGO_RECORD|PGO_PREFMISC, prefPLs, COUNT( prefPLs ) };
typedef struct {
@@ -394,7 +397,7 @@ static void LoadDstFmtList( void )
int inx;
wListClear( (wList_p)prefPLs[I_DSTFMT].control );
for ( inx=0; dstFmts[units][inx].name; inx++ )
- wListAddValue( (wList_p)prefPLs[I_DSTFMT].control, _(dstFmts[units][inx].name), NULL, (void*)dstFmts[units][inx].fmt );
+ wListAddValue( (wList_p)prefPLs[I_DSTFMT].control, _(dstFmts[units][inx].name), NULL, I2VP(dstFmts[units][inx].fmt) );
}
/**
@@ -416,7 +419,7 @@ static void UpdatePrefD( void )
LoadDstFmtList();
distanceFormatInx = 0;
- for (inx = 0; inx < sizeof prefPLs / sizeof prefPLs[0]; inx++) {
+ for (inx = 0; inx < COUNT( prefPLs ); inx++) {
if ((prefPLs[inx].option&PDO_DIM)) {
ParamLoadControl(&prefPG, inx);
}
@@ -439,7 +442,7 @@ static void UpdateMeasureFmt()
distanceFormatInx = wListGetIndex((wList_p)prefPLs[I_DSTFMT].control);
units = wRadioGetValue((wChoice_p)prefPLs[1].control);
- for (inx = 0; inx < sizeof prefPLs / sizeof prefPLs[0]; inx++) {
+ for (inx = 0; inx < COUNT( prefPLs ); inx++) {
if ((prefPLs[inx].option&PDO_DIM)) {
ParamLoadControl(&prefPG, inx);
}
@@ -479,6 +482,8 @@ static void PrefOk( void * junk )
NoticeMessage2( 0, MSG_CONN_PARAMS_TOO_BIG, _("Ok"), NULL ) ;
}
+ if(changes & CHANGE_ICONSIZE)
+ NoticeMessage( MSG_ICON_SIZE_RESTART, _("Ok"), NULL ) ;
wHide( prefW );
DoChangeNotification(changes);
@@ -527,17 +532,17 @@ EXPORT long GetDistanceFormat( void )
static wWin_p colorW;
static paramData_t colorPLs[] = {
- { PD_COLORLIST, &snapGridColor, "snapgrid", PDO_NOPSHUPD, NULL, N_("Snap Grid"), 0, (void*)(CHANGE_GRID) },
- { PD_COLORLIST, &markerColor, "marker", PDO_NOPSHUPD, NULL, N_("Marker"), 0, (void*)(CHANGE_GRID) },
- { PD_COLORLIST, &borderColor, "border", PDO_NOPSHUPD, NULL, N_("Border"), 0, (void*)(CHANGE_MAIN) },
+ { PD_COLORLIST, &snapGridColor, "snapgrid", PDO_NOPSHUPD, NULL, N_("Snap Grid"), 0, I2VP(CHANGE_GRID) },
+ { PD_COLORLIST, &markerColor, "marker", PDO_NOPSHUPD, NULL, N_("Marker"), 0, I2VP(CHANGE_GRID) },
+ { PD_COLORLIST, &borderColor, "border", PDO_NOPSHUPD, NULL, N_("Border"), 0, I2VP(CHANGE_MAIN) },
{ PD_COLORLIST, &crossMajorColor, "crossmajor", PDO_NOPSHUPD, NULL, N_("Primary Axis"), 0, 0 },
{ PD_COLORLIST, &crossMinorColor, "crossminor", PDO_NOPSHUPD, NULL, N_("Secondary Axis"), 0, 0 },
- { PD_COLORLIST, &normalColor, "normal", PDO_NOPSHUPD, NULL, N_("Normal Track"), 0, (void*)(CHANGE_MAIN|CHANGE_PARAMS) },
- { PD_COLORLIST, &selectedColor, "selected", PDO_NOPSHUPD, NULL, N_("Selected Track"), 0, (void*)(CHANGE_MAIN) },
- { PD_COLORLIST, &profilePathColor, "profile", PDO_NOPSHUPD, NULL, N_("Profile Path"), 0, (void*)(CHANGE_MAIN) },
- { PD_COLORLIST, &exceptionColor, "exception", PDO_NOPSHUPD, NULL, N_("Exception Track"), 0, (void*)(CHANGE_MAIN) },
- { PD_COLORLIST, &tieColor, "tie", PDO_NOPSHUPD, NULL, N_("Track Ties"), 0, (void*)(CHANGE_MAIN) } };
-static paramGroup_t colorPG = { "rgbcolor", PGO_RECORD|PGO_PREFGROUP, colorPLs, sizeof colorPLs/sizeof colorPLs[0] };
+ { PD_COLORLIST, &normalColor, "normal", PDO_NOPSHUPD, NULL, N_("Normal Track"), 0, I2VP(CHANGE_MAIN|CHANGE_PARAMS) },
+ { PD_COLORLIST, &selectedColor, "selected", PDO_NOPSHUPD, NULL, N_("Selected Track"), 0, I2VP(CHANGE_MAIN) },
+ { PD_COLORLIST, &profilePathColor, "profile", PDO_NOPSHUPD, NULL, N_("Profile Path"), 0, I2VP(CHANGE_MAIN) },
+ { PD_COLORLIST, &exceptionColor, "exception", PDO_NOPSHUPD, NULL, N_("Exception Track"), 0, I2VP(CHANGE_MAIN) },
+ { PD_COLORLIST, &tieColor, "tie", PDO_NOPSHUPD, NULL, N_("Track Ties"), 0, I2VP(CHANGE_MAIN) } };
+static paramGroup_t colorPG = { "rgbcolor", PGO_RECORD|PGO_PREFGROUP, colorPLs, COUNT( colorPLs ) };