]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/preferences.cpp
Merge commit '173f350be76237a7dee9c00c389dff4e56b3da4c' into garux-merge
[xonotic/netradiant.git] / radiant / preferences.cpp
index 4c3e0e15df3609a69194c757ac3fb8d2487a8d48..4c00125e70fd472b43ffa4d64abce37c770a94c3 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*
    Copyright (C) 1999-2006 Id Software, Inc. and contributors.
    For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -59,7 +59,7 @@ void Global_constructPreferences( PreferencesPage& page ){
 
 void Interface_constructPreferences( PreferencesPage& page ){
 #if GDEF_OS_WINDOWS
-       page.appendCheckBox( "", "Default Text Editor", g_TextEditor_useWin32Editor );
+       page.appendCheckBox( "", "External Shader Editor", g_TextEditor_useWin32Editor );
 #else
        {
                ui::CheckButton use_custom = page.appendCheckBox( "Text Editor", "Custom", g_TextEditor_useCustomEditor );
@@ -75,6 +75,7 @@ void Mouse_constructPreferences( PreferencesPage& page ){
                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( "", "Improved mousewheel zoom", g_xywindow_globals.m_bImprovedWheelZoom );
 }
 void Mouse_constructPage( PreferenceGroup& group ){
        PreferencesPage page( group.createPage( "Mouse", "Mouse Preferences" ) );
@@ -106,7 +107,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;
        }
@@ -475,7 +476,7 @@ CGameDialog g_GamesDialog;
 
 static void OnButtonClean( ui::Widget widget, gpointer data ){
        // make sure this is what the user wants
-       if ( g_Preferences.GetWidget().alert( "This will close Radiant and clean the corresponding registry entries.\n"
+       if ( ui::alert( g_Preferences.GetWidget(), "This will close Radiant and clean the corresponding registry entries.\n"
                                                                                                                                  "Next time you start Radiant it will be good as new. Do you wish to continue?",
                                                 "Reset Registry", ui::alert_type::YESNO, ui::alert_icon::Asterisk ) == ui::alert_response::YES ) {
                PrefsDlg *dlg = (PrefsDlg*)data;
@@ -905,7 +906,8 @@ void PreferencesDialog_restartRequired( const char* staticName ){
 }
 
 void PreferencesDialog_showDialog(){
-       if ( ConfirmModified( "Edit Preferences" ) && g_Preferences.DoModal() == eIDOK ) {
+       //if ( ConfirmModified( "Edit Preferences" ) && g_Preferences.DoModal() == eIDOK ) {
+       if ( g_Preferences.DoModal() == eIDOK ) {
                if ( !g_restart_required.empty() ) {
                        StringOutputStream message( 256 );
                        message << "Preference changes require a restart:\n";
@@ -913,7 +915,7 @@ void PreferencesDialog_showDialog(){
                        {
                                message << ( *i ) << '\n';
                        }
-                       MainFrame_getWindow().alert( message.c_str() );
+                       ui::alert( MainFrame_getWindow(), message.c_str() );
                        g_restart_required.clear();
                }
        }