diff options
Diffstat (limited to 'app/bin/dlayer.c')
| -rw-r--r-- | app/bin/dlayer.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/app/bin/dlayer.c b/app/bin/dlayer.c index 92c58c4..560d7c4 100644 --- a/app/bin/dlayer.c +++ b/app/bin/dlayer.c @@ -31,6 +31,7 @@ #include "track.h"
#include "include/partcatalog.h"
#include "include/stringxtc.h"
+#include "include/toolbar.h"
#include "common-ui.h"
/*****************************************************************************
@@ -1218,7 +1219,8 @@ LayerPrefLoad(void) if (prefString && prefString[ 0 ]) {
char layersSaved[3 * NUM_LAYERS];
- strncpy(layersSaved, prefString, sizeof(layersSaved));
+ strncpy(layersSaved, prefString, sizeof(layersSaved)-1);
+ layersSaved[sizeof(layersSaved)-1] = 0;
prefString = strtok(layersSaved, ",");
while (prefString) {
@@ -2069,7 +2071,7 @@ static void DoLayer(void * unused) {
if (layerW == NULL) {
layerW = ParamCreateDialog(&layerPG, MakeWindowTitle(_("Layers")), _("Done"),
- LayerOk, wHide, TRUE, NULL, 0, LayerDlgUpdate);
+ LayerOk, ParamCancel_Current, TRUE, NULL, 0, LayerDlgUpdate);
GetScaleGauge(layerScaleInx, &layerScaleDescInx, &layerGaugeInx);
LoadScaleList(scaleL);
LoadGaugeList(gaugeL, layerScaleDescInx);
@@ -2087,7 +2089,7 @@ static void DoLayer(void * unused) layoutLayerChanged = FALSE;
}
-#include "bitmaps/background.xpm3"
+#include "bitmaps/background.image3"
#if NUM_BUTTONS < 100
static int lbmap_width[3] = { 16, 24, 32 }; // For numbers < 100
@@ -2099,7 +2101,7 @@ static int lbmap_height[3] = { 16, 24, 32 }; static int lbit0_width[3] = { 6, 10, 14 };
static int lbit1_width[3] = { 4, 5, 6 };
-static int lbits_top[3] = { 3, 4, 6 };
+//static int lbits_top[3] = { 3, 4, 6 };
static int lbits_height[3] = { 10, 15, 20 };
#include "bitmaps/layer_num.inc"
@@ -2122,7 +2124,7 @@ static char** show_layer_digits[3][10] = { */
#define ONE_PIXEL v *= 2; if (v > 128) { show_layer_bits[xx + yy] = b; xx += 1; v = 1; b = 0; }
-void InitLayers(void)
+void InitLayers(int cmdGroup)
{
unsigned int i;
wPrefGetInteger(PREFSECT, "layer-button-count", &layerCount, layerCount);
@@ -2325,10 +2327,10 @@ void InitLayers(void) setLayerL = wDropListCreate(mainW, 0, 0, "cmdLayerSet", NULL, 0, 10, 200, NULL,
SetCurrLayer, NULL);
wControlSetBalloonText((wControl_p)setLayerL, GetBalloonHelpStr("cmdLayerSet"));
- AddToolbarControl((wControl_p)setLayerL, IC_MODETRAIN_TOO);
+ ToolbarControlAdd((wControl_p)setLayerL, IC_MODETRAIN_TOO, cmdGroup );
backgroundB = AddToolbarButton("cmdBackgroundShow",
- wIconCreatePixMap(background_xpm3[iconSize]), 0,
+ wIconCreatePixMap(background_image3[iconSize]), 0,
BackgroundToggleShow, NULL);
/* add the help text */
wControlSetBalloonText((wControl_p)backgroundB, _("Show/Hide Background"));
|
