X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=radiant%2Fpreferences.cpp;h=4c19f55dcd787db315f45372271408f33cf78900;hb=54a2bda443aace9c00a1615af10cc1dc8b1f0cd1;hp=a8a6e34abb4c96d32c02910d1a32524b1c6a7098;hpb=f3d0806dfea23aef768535ee2fc8e1fff9aebe9f;p=xonotic%2Fnetradiant.git diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index a8a6e34a..4c19f55d 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 1999-2006 Id Software, Inc. and contributors. For a list of contributors, see the accompanying CONTRIBUTORS file. @@ -58,23 +58,16 @@ void Global_constructPreferences( PreferencesPage& page ){ } void Interface_constructPreferences( PreferencesPage& page ){ -#if GDEF_OS_WINDOWS - page.appendCheckBox( "", "External Shader Editor", g_TextEditor_useWin32Editor ); -#else - { - ui::CheckButton use_custom = page.appendCheckBox( "Text Editor", "Custom", g_TextEditor_useCustomEditor ); - ui::Widget custom_editor = page.appendPathEntry( "Text Editor Command", g_TextEditor_editorCommand, true ); - Widget_connectToggleDependency( custom_editor, use_custom ); - } -#endif + page.appendPathEntry( "Shader Editor Command", g_TextEditor_editorCommand, false ); } void Mouse_constructPreferences( PreferencesPage& page ){ - { - const char* buttons[] = { "2 button", "3 button", }; - page.appendRadio( "Mouse Type", g_glwindow_globals.m_nMouseType, STRING_ARRAY_RANGE( buttons ) ); - } - page.appendCheckBox( "Right Button", "Activates Context Menu", g_xywindow_globals.m_bRightClick ); +// { +// const char* buttons[] = { "2 button", "3 button", }; +// page.appendRadio( "Mouse Type", g_glwindow_globals.m_nMouseType, STRING_ARRAY_RANGE( buttons ) ); +// } +// page.appendCheckBox( "Right Button", "Activates Context Menu", g_xywindow_globals.m_bRightClick ); + page.appendCheckBox( "", "Zoom to mouse pointer", g_xywindow_globals.m_bZoomInToPointer ); } void Mouse_constructPage( PreferenceGroup& group ){ PreferencesPage page( group.createPage( "Mouse", "Mouse Preferences" ) ); @@ -106,7 +99,7 @@ CGameDescription::CGameDescription( xmlDocPtr pDoc, const CopiedString& gameFile // read the user-friendly game name xmlNodePtr pNode = pDoc->children; - while ( strcmp( (const char*)pNode->name, "game" ) && pNode != 0 ) + while ( pNode != 0 && strcmp( (const char*)pNode->name, "game" ) ) { pNode = pNode->next; } @@ -433,7 +426,7 @@ void CGameDialog::Init(){ } } } - if ( m_bGamePrompt || !currentGameDescription ) { + if ( !currentGameDescription ) { Create(); DoGameDialog(); // use m_nComboSelect to identify the game to run as and set the globals @@ -674,7 +667,7 @@ PreferencesPage createPage( const char* treeName, const char* frameName ){ ui::Window PrefsDlg::BuildDialog(){ PreferencesDialog_addInterfacePreferences( makeCallbackF(Interface_constructPreferences) ); - Mouse_registerPreferencesPage(); + //Mouse_registerPreferencesPage(); ui::Window dialog = ui::Window(create_floating_window( "NetRadiant Preferences", m_parent )); @@ -941,12 +934,7 @@ struct GameMode { }; void RegisterPreferences( PreferenceSystem& preferences ){ -#if GDEF_OS_WINDOWS - preferences.registerPreference( "UseCustomShaderEditor", make_property_string( g_TextEditor_useWin32Editor ) ); -#else - preferences.registerPreference( "UseCustomShaderEditor", make_property_string( g_TextEditor_useCustomEditor ) ); preferences.registerPreference( "CustomShaderEditorCommand", make_property_string( g_TextEditor_editorCommand ) ); -#endif preferences.registerPreference( "GameName", make_property() ); preferences.registerPreference( "GameMode", make_property() );