Beep save option

This commit is contained in:
Pan7 2017-03-09 08:50:45 +01:00
parent d91edda475
commit 3ebb7df7a5
3 changed files with 12 additions and 2 deletions

View file

@ -814,8 +814,9 @@ void Map_SaveFile( const char *filename, qboolean use_region ){
time( &timer );
if( g_PrefsDlg.m_bSaveBeep ) {
Sys_Beep();
}
Sys_Status( "Saved.", 0 );
}
}

View file

@ -64,6 +64,7 @@
#define VERTEX_KEY "NewVertex"
#define AUTOSAVE_KEY "Autosave"
#define AUTOSAVETIME_KEY "AutosaveMinutes"
#define SAVEBEEP_KEY "SaveBeep"
#define PAK_KEY "UsePAK"
#define NEWAPPLY_KEY "ApplyDismissesSurface"
#define HACK_KEY "Gatewayescapehack"
@ -587,6 +588,7 @@ PrefsDlg::PrefsDlg (){
m_bSetGame = FALSE;
m_bAutoSave = TRUE;
m_nAutoSave = 5;
m_bSaveBeep = TRUE;
m_bLoadLastMap = FALSE;
m_bTextureWindow = FALSE;
m_bSnapShots = FALSE;
@ -2462,6 +2464,11 @@ void PrefsDlg::BuildDialog(){
gtk_widget_show( label );
gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, FALSE, 0 );
check = gtk_check_button_new_with_label( _( "Beep on save" ) );
gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, FALSE, 0 );
gtk_widget_show( check );
AddDialogData( check, &m_bSaveBeep, DLG_CHECK_BOOL );
// Add the page to the notebook
gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
@ -2949,6 +2956,7 @@ void PrefsDlg::LoadPrefs(){
mLocalPrefs.GetPref( TINYBRUSH_KEY, &m_bCleanTiny, FALSE );
mLocalPrefs.GetPref( TINYSIZE_KEY, &m_fTinySize, 0.5f );
mLocalPrefs.GetPref( AUTOSAVETIME_KEY, &m_nAutoSave, 5 );
mLocalPrefs.GetPref( SAVEBEEP_KEY, &m_bSaveBeep, TRUE );
mLocalPrefs.GetPref( SNAPSHOT_KEY, &m_bSnapShots, FALSE );
mLocalPrefs.GetPref( MOVESPEED_KEY, &m_nMoveSpeed, 100 );
mLocalPrefs.GetPref( ANGLESPEED_KEY, &m_nAngleSpeed, 3 );

View file

@ -589,6 +589,7 @@ bool m_bInternalBSP;
bool m_bRightClick;
bool m_bSetGame;
bool m_bAutoSave;
bool m_bSaveBeep;
bool m_bLoadLastMap;
bool m_bTextureWindow;
bool m_bSnapShots;