}
bool Preferences_Save_Safe( PreferenceDictionary& preferences, const char* filename ){
- Array<char> tmpName( filename, filename + strlen( filename ) + 1 + 3 );
- *( tmpName.end() - 4 ) = 'T';
- *( tmpName.end() - 3 ) = 'M';
- *( tmpName.end() - 2 ) = 'P';
- *( tmpName.end() - 1 ) = '\0';
+ std::string tmpName( filename );
+ tmpName += "TMP";
- return Preferences_Save( preferences, tmpName.data() )
+ return Preferences_Save( preferences, tmpName.c_str() )
&& ( !file_exists( filename ) || file_remove( filename ) )
&& file_move( tmpName.data(), filename );
}
static void Import(bool value) {
g_Console_enableLogging = value;
- Sys_LogFile(g_Console_enableLogging);
+ Sys_EnableLogFile(g_Console_enableLogging);
}
};
PreferencesDialog_addInterfacePreferences( makeCallbackF(Interface_constructPreferences) );
Mouse_registerPreferencesPage();
- ui::Window main_window = MainFrame_getWindow();
-
ui::Window dialog = ui::Window(create_floating_window( RADIANT_NAME " Preferences", m_parent ));
gtk_window_set_transient_for( dialog, m_parent );