summaryrefslogtreecommitdiff
path: root/app/bin/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/bin/misc.c')
-rw-r--r--app/bin/misc.c52
1 files changed, 43 insertions, 9 deletions
diff --git a/app/bin/misc.c b/app/bin/misc.c
index 0422631..827c2db 100644
--- a/app/bin/misc.c
+++ b/app/bin/misc.c
@@ -1324,7 +1324,7 @@ EXPORT void LayoutSetPos(
}
-EXPORT void LayoutToolBar( void )
+EXPORT void LayoutToolBar( void * data )
{
int inx;
@@ -1332,7 +1332,7 @@ EXPORT void LayoutToolBar( void )
LayoutSetPos( inx );
}
if (toolbarSet&(1<<BG_HOTBAR)) {
- LayoutHotBar();
+ LayoutHotBar(data);
} else {
HideHotBar();
}
@@ -1343,7 +1343,7 @@ static void ToolbarChange( long changes )
{
if ( (changes&CHANGE_TOOLBAR) ) {
/*if ( !(changes&CHANGE_MAIN) )*/
- MainProc( mainW, wResize_e, NULL );
+ MainProc( mainW, wResize_e, NULL, NULL );
/*else
LayoutToolBar();*/
}
@@ -1779,7 +1779,7 @@ static void ToolbarAction( wBool_t set, void * data )
else
toolbarSet &= ~mask;
wPrefSetInteger( "misc", "toolbarset", toolbarSet );
- MainProc( mainW, wResize_e, NULL );
+ MainProc( mainW, wResize_e, NULL, NULL );
if (recordF)
fprintf( recordF, "PARAMETER %s %s %ld", "misc", "toolbarset", toolbarSet );
}
@@ -1945,11 +1945,16 @@ static wWin_p debugW;
static int debugCnt = 0;
static paramIntegerRange_t r0_100 = { 0, 100, 80 };
static void DebugOk( void * junk );
-static paramData_t debugPLs[20];
+static paramData_t debugPLs[30];
+static long debug_values[30];
+static int debug_index[30];
static paramGroup_t debugPG = { "debug", 0, debugPLs, 0 };
static void DebugOk( void * junk )
{
+ for (int i = 0; i<debugCnt;i++) {
+ logTable(debug_index[i]).level = debug_values[i];
+ }
wHide( debugW );
}
@@ -1961,10 +1966,38 @@ static void CreateDebugW( void )
wHide(debugW);
}
+EXPORT void DebugInit(void) {
+
+ if (!debugW) {
+ BOOL_T default_line = FALSE;
+ debugCnt = 0; //Reset to start building the dynamic dialog over again
+ int i = 0;
+ for ( int inx=0; inx<logTable_da.cnt; inx++ ) {
+ if (logTable(inx).name[0]) {
+ debug_values[i] = logTable(inx).level;
+ debug_index[i] = inx;
+ InitDebug(logTable(inx).name,&debug_values[i]);
+ i++;
+ } else {
+ if (!default_line) {
+ debug_values[i] = logTable(inx).level;
+ debug_index[i] = inx;
+ InitDebug("Default Trace",&debug_values[i]);
+ i++;
+ default_line = TRUE;
+ }
+ }
+ }
+ //ParamCreateControls( &debugPG, NULL );
+ CreateDebugW();
+ }
+ ParamLoadControls( &debugPG );
+ wShow(debugW);
+}
EXPORT void InitDebug(
char * label,
- long * valueP )
+ long * valueP)
{
if ( debugCnt >= sizeof debugPLs/sizeof debugPLs[0] )
AbortProg( "Too many debug flags" );
@@ -1975,6 +2008,7 @@ EXPORT void InitDebug(
debugPLs[debugCnt].winData = &r0_100;
debugPLs[debugCnt].winLabel = label;
debugCnt++;
+
}
@@ -2340,7 +2374,7 @@ static void CreateMenus( void )
MiscMenuItemCreate( optionM, NULL, "cmdSticky", _("Stic&ky ..."), ACCL_STICKY, (void*)(wMenuCallBack_p)DoSticky, IC_MODETRAIN_TOO, (void *)0 );
if (extraButtons) {
menuPLs[menuPG.paramCnt].context = debugW;
- MiscMenuItemCreate( optionM, NULL, "cmdDebug", _("&Debug ..."), 0, (void*)(wMenuCallBack_p)wShow, IC_MODETRAIN_TOO, (void *)0 );
+ MiscMenuItemCreate( optionM, NULL, "cmdDebug", _("&Debug ..."), 0, (void*)(wMenuCallBack_p)DebugInit, IC_MODETRAIN_TOO, (void *)0 );
}
MiscMenuItemCreate( optionM, NULL, "cmdPref", _("&Preferences ..."), ACCL_PREFERENCES, (void*)PrefInit(), IC_MODETRAIN_TOO, (void *)0 );
MiscMenuItemCreate( optionM, NULL, "cmdColor", _("&Colors ..."), ACCL_COLORW, (void*)ColorInit(), IC_MODETRAIN_TOO, (void *)0 );
@@ -2697,7 +2731,7 @@ LOG1( log_init, ( "initialize\n" ) )
LOG1( log_init, ( "loadFileList\n" ) )
LoadFileList();
AddPlaybackProc( "MENU", MenuPlayback, NULL );
- CreateDebugW();
+ //CreateDebugW();
/*
* TIDY UP
@@ -2709,7 +2743,7 @@ LOG1( log_init, ( "loadFileList\n" ) )
* READ PARAMETERS
*/
if (toolbarSet&(1<<BG_HOTBAR)) {
- LayoutHotBar();
+ LayoutHotBar( NULL );
} else {
HideHotBar();
}