diff options
| author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-09-20 19:19:34 +0200 | 
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-09-20 19:19:34 +0200 | 
| commit | e7d20cf352688bf717a01f4e6d9e6f497c2bea4c (patch) | |
| tree | cfd2ef9b569f49af985a6f1ec44f2614f63c8e78 /app/bin/misc.c | |
| parent | a14a7a0ccc9de76aeab0b2e4bbf58f1a79deedc2 (diff) | |
New upstream version 5.3.1Beta2upstream/5.3.1Beta2
Diffstat (limited to 'app/bin/misc.c')
| -rw-r--r-- | app/bin/misc.c | 41 | 
1 files changed, 23 insertions, 18 deletions
diff --git a/app/bin/misc.c b/app/bin/misc.c index 901b684..fa1dee9 100644 --- a/app/bin/misc.c +++ b/app/bin/misc.c @@ -33,6 +33,7 @@  #include "include/paramfilelist.h"  #include "paths.h"  #include "smalldlg.h" +#include "include/toolbar.h"  #include "track.h"  #include "common-ui.h" @@ -748,11 +749,11 @@ EXPORT void MapWindowShow(int state)  	wPrefSetInteger("misc", "mapVisible", mapVisible);  	wMenuToggleSet(mapShowMI, mapVisible); +	wWinShow(mapW, mapVisible | DONTGRABFOCUS);  	if (mapVisible) {  		DoChangeNotification(CHANGE_MAP);  	} -	wWinShow(mapW, mapVisible);  	wButtonSetBusy(mapShowB, (wBool_t) mapVisible);  } @@ -959,13 +960,6 @@ static void SetAccelKeys()  } -//EXPORT void InitCmdEnumerate(void) { -//	AddToolbarButton("cmdEnumerate", wIconCreatePixMap(partlist_xpm), -//			IC_SELECTED | IC_ACCLKEY, EnumerateTracks, -//			NULL); -//} - -  /****************************************************************************   * @@ -1009,6 +1003,13 @@ static int OfferCheckpoint( void )  	return (ret>=0);  } +void +InitAudio() +{ +	wPrefGetInteger("misc", "audio", &enableAudio, true); +	wSetAudio(enableAudio); +} +  EXPORT wWin_p wMain(int argc, char * argv[])  {  	int c; @@ -1019,8 +1020,8 @@ EXPORT wWin_p wMain(int argc, char * argv[])  	char * initialFile = NULL;  	const char * pref;  	coOrd roomSize; -	long oldToolbarMax; -	long newToolbarMax; +	/*	long oldToolbarMax; +		long newToolbarMax; */  	char *cp;  	char buffer[STR_SIZE];  	unsigned int i; @@ -1133,12 +1134,15 @@ EXPORT wWin_p wMain(int argc, char * argv[])  	             displayHeight, -1, -1, -1);  	InitAppDefaults(); -	newToolbarMax = (1 << BG_COUNT) - 1; -	wPrefGetInteger("misc", "toolbarset", &toolbarSet, newToolbarMax); -	wPrefGetInteger("misc", "max-toolbarset", &oldToolbarMax, 0); -	toolbarSet |= newToolbarMax & ~oldToolbarMax; -	wPrefSetInteger("misc", "max-toolbarset", newToolbarMax); -	wPrefSetInteger("misc", "toolbarset", toolbarSet); +	InitAudio(); + +	ToolbarLoadConfig(); +	/*	newToolbarMax = (1 << BG_COUNT) - 1; +		wPrefGetInteger("misc", "toolbarset", &toolbarSet, newToolbarMax); +		wPrefGetInteger("misc", "max-toolbarset", &oldToolbarMax, 0); +		toolbarSet |= newToolbarMax & ~oldToolbarMax; +		wPrefSetInteger("misc", "max-toolbarset", newToolbarMax); +		wPrefSetInteger("misc", "toolbarset", toolbarSet); */  	LOG1(log_init, ( "fontInit\n")) @@ -1199,7 +1203,7 @@ EXPORT wWin_p wMain(int argc, char * argv[])  	/*  	 * TIDY UP  	 */ -	if (toolbarSet&(1<<BG_HOTBAR)) { +	if (ToolbarIsGroupVisible(BG_HOTBAR)) {  		LayoutHotBar( NULL );  	} else {  		LayoutHotBar( NULL );   /* Must run once to set it up */ @@ -1207,6 +1211,7 @@ EXPORT wWin_p wMain(int argc, char * argv[])  	}  	LOG1(log_init, ( "drawInit\n" ))  	DrawInit(initialZoom); +	MainProc( mainW, wResize_e, NULL, NULL );  	MacroInit(); @@ -1261,7 +1266,7 @@ EXPORT wWin_p wMain(int argc, char * argv[])  	DoChangeNotification( CHANGE_MAIN | CHANGE_MAP);  	wWinShow(mainW, TRUE); -	wWinShow(mapW, mapVisible); +	wWinShow(mapW, mapVisible | DONTGRABFOCUS);  	wDestroySplash();  	/* this has to be called before ShowTip() */  | 
