]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/preferences.cpp
- Updated Windows build doc, very slight revision. Changed 37 targets to 38.
[xonotic/netradiant.git] / radiant / preferences.cpp
index aafe63813da95927476d2f8a6ffe355e75a44920..f85075bdfdd6ae6a48164d6e31f6393d0b2a78fd 100644 (file)
@@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 #include "stdafx.h"
 #include <glib.h>
+#include <glib/gi18n.h>
 #include <assert.h>
 #if defined (__linux__) || defined (__APPLE__)
 #include <sys/stat.h>
@@ -95,6 +96,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #define WIDETOOLBAR_KEY         "WideToolBar"
 #define PLUGINTOOLBAR_KEY "PluginToolBar"
 #define NOCLAMP_KEY             "NoClamp"
+#define SNAP_KEY                "Snap"
 #define PREFAB_KEY              "PrefabPath"
 #define USERINI_KEY             "UserINIPath"
 #define ROTATION_KEY            "Rotation"
@@ -128,6 +130,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #define LEAKSTOP_KEY            "LeakStop"
 #define DOSLEEP_KEY             "SleepMode"
 #define SUBDIVISIONS_KEY        "Subdivisions"
+#define DEFAULTTEXURESCALE_KEY  "DefaultTextureScale"
 #define CLIPCAULK_KEY           "ClipCaulk"
 #define PATCHSHOWBOUNDS_KEY     "PatchShowBounds"
 #define NATIVEGUI_KEY           "NativeGUI"
@@ -145,7 +148,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #define TEXTURECOMPRESSIONFORMAT_KEY "TextureCompressionFormat"
 #define LIGHTRADIUS_KEY "LightRadiuses"
 #define Q3MAP2TEX_KEY "Q3Map2Tex"
+
+#ifdef ATIHACK_812
 #define ATIHACK_KEY "ATIHack"
+#endif
+
+#ifdef NVIDIA_AERO_HACK
+#define NVAEROHACK_KEY "NvidiaAeroHack"
+#endif
 
 // window stuff
 #define ENTITYSPLIT1_KEY  "EntitySplit1"
@@ -282,7 +292,6 @@ void CXMLPropertyBag::GetPref(const char *name, Str *pV, const char *V)
     if ( pNode->children && pNode->children->content ) {
       *pV = pNode->children->content;
     } else {
-      // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=427
       // means the pref exists, and that the value is ""
       *pV = "";
     }
@@ -521,7 +530,7 @@ static void OnBtnBrowseEditor (GtkWidget *widget, gpointer data)
 {
   PrefsDlg *dlg = (PrefsDlg*)data;
 
-  const char *filename = file_dialog(g_PrefsDlg.GetWidget(), TRUE, "Executable for Custom Editor");
+  const char *filename = file_dialog(g_PrefsDlg.GetWidget(), TRUE, _("Executable for Custom Editor"));
 
   if(filename != NULL)
   {
@@ -537,7 +546,7 @@ static void OnBtnBrowseprefab (GtkWidget *widget, gpointer data)
   char *path = dlg->m_strPrefabPath;
   if (strlen (path) == 0)
     path = g_strGameToolsPath;
-  char *dir = dir_dialog (g_PrefsDlg.GetWidget (), "Set prefab path", path);
+  char *dir = dir_dialog (g_PrefsDlg.GetWidget (), _("Set prefab path"), path);
   dlg->UpdateData(TRUE);
 
   if (dir != NULL)
@@ -558,7 +567,7 @@ static void OnBtnBrowseuserini (GtkWidget *widget, gpointer data)
   if (strlen (path) == 0)
     path = g_strGameToolsPath;
   // TODO: INI filter?
-  const char *filename = file_dialog (g_PrefsDlg.GetWidget(), TRUE, "Find INI file", path);
+  const char *filename = file_dialog (g_PrefsDlg.GetWidget(), TRUE, _("Find INI file"), path);
 
   if (filename != NULL)
   {
@@ -571,9 +580,9 @@ static void OnBtnBrowseuserini (GtkWidget *widget, gpointer data)
 static void OnButtonClean (GtkWidget *widget, gpointer data)
 {
   // make sure this is what the user wants
-  if (gtk_MessageBox (g_PrefsDlg.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", MB_YESNO) == IDYES)
+  if (gtk_MessageBox (g_PrefsDlg.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"), MB_YESNO) == IDYES)
   {
     PrefsDlg *dlg = (PrefsDlg*)data;
     dlg->EndModal (IDCANCEL);
@@ -635,6 +644,7 @@ PrefsDlg::PrefsDlg ()
   m_bWideToolbar = TRUE;
   m_bPluginToolbar = TRUE;
   m_bNoClamp = FALSE;
+  m_bSnap = TRUE;
   m_strUserPath = "";
   m_nRotation = 0;
   m_bChaseMouse = FALSE;
@@ -684,7 +694,11 @@ PrefsDlg::PrefsDlg ()
   m_nLightRadiuses = 1;
   m_bQ3Map2Texturing = TRUE;
 #ifdef ATIHACK_812
-       m_bGlATIHack = FALSE;
+  m_bGlATIHack = FALSE;
+#endif
+#ifdef NVIDIA_AERO_HACK
+  m_bGlNvidiaAeroHack = TRUE;
+  m_bGlNvidiaAeroHackPrevState = -1; // -1 is uninitialized, 0 is FALSE, 1 is TRUE
 #endif
 }
 
@@ -694,6 +708,25 @@ Games selection dialog
 =========================================================
 */
 
+#if defined(WIN32)
+#define TOOLS_ATTRIBUTE "gametools_win32"
+#define ENGINE_ATTRIBUTE "engine_win32"
+#define ENGINEPATH_ATTRIBUTE "enginepath_win32"
+#define MP_ENGINE_ATTRIBUTE "mp_engine_win32"
+#elif defined(__linux__) || defined (__FreeBSD__)
+#define TOOLS_ATTRIBUTE "gametools_linux"
+#define ENGINE_ATTRIBUTE "engine_linux"
+#define ENGINEPATH_ATTRIBUTE "enginepath_linux"
+#define MP_ENGINE_ATTRIBUTE "mp_engine_linux"
+#elif defined(__APPLE__)
+#define TOOLS_ATTRIBUTE "gametools_macos"
+#define ENGINE_ATTRIBUTE "engine_macos"
+#define ENGINEPATH_ATTRIBUTE "enginepath_macos"
+#define MP_ENGINE_ATTRIBUTE "mp_engine_macos"
+#else
+#error "unsupported platform"
+#endif
+
 CGameDescription::CGameDescription(xmlDocPtr pDoc, const Str &GameFile)
 {
   char *p, *prop;
@@ -708,9 +741,9 @@ CGameDescription::CGameDescription(xmlDocPtr pDoc, const Str &GameFile)
     Error("Didn't find 'game' node in the game description file '%s'\n", pDoc->URL);
   }
   // on win32, game tools path can now be specified relative to the exe's cwd
-  prop = (char*)xmlGetProp( pNode, (xmlChar*)"gametools" );
+  prop = (char*)xmlGetProp( pNode, (xmlChar*)TOOLS_ATTRIBUTE);
   if ( prop == NULL ) {
-         Error( "Didn't find 'gametools' node in the game description file '%s'\n", pDoc->URL );
+       Error( "Didn't find '"TOOLS_ATTRIBUTE"' node in the game description file '%s'\n", pDoc->URL );
   }
   {
        char full[PATH_MAX];
@@ -758,6 +791,20 @@ CGameDescription::CGameDescription(xmlDocPtr pDoc, const Str &GameFile)
     xmlFree(prop);
   }
 
+  // if this is set, the open maps dialoge will open the engine path not the
+  // home dir for map loading and saving
+  prop = (char*)xmlGetProp(pNode, (xmlChar*)"no_maps_in_home");
+  if (prop == NULL)
+  {
+    // default
+    noMapsInHome = false;
+  }
+  else
+  {
+    noMapsInHome = true;
+    xmlFree(prop);
+  }
+
   prop = (char*)xmlGetProp(pNode, (xmlChar*)"basegame");
   if (prop == NULL)
   {
@@ -770,58 +817,78 @@ CGameDescription::CGameDescription(xmlDocPtr pDoc, const Str &GameFile)
     xmlFree(prop);
   }
 
-  // on win32, engine path can now be specified relative to the exe's cwd
-  prop = (char*)xmlGetProp(pNode, (const xmlChar *)"enginepath");
-  if ( prop != NULL ) {
-    char full[PATH_MAX];
+
+       prop = (char*)xmlGetProp(pNode, (const xmlChar*)ENGINE_ATTRIBUTE);
+       if (prop == NULL)
+       {
 #ifdef _WIN32
-       _fullpath( full, prop, PATH_MAX );
-#else
-       strncpy( full, prop, PATH_MAX );
+               mEngine = "quake3.exe";
+#elif __linux__
+               mEngine = "quake3";
+#elif __APPLE__
+               mEngine = "Quake3.app";
 #endif
-    xmlFree( prop );
-       prop = NULL;
-    // process seperators
-    for ( p = full; *p != '\0'; p++ ) {
-         if ( *p == '\\' ) {
-           *p = '/';
-         }
-       }
-    mEnginePath = full;
-       if ( p != full && *(p-1) != '/' ) {
-         mEnginePath += "/";
        }
-  }
-  else
-  {
-    // if engine path was not specified in the .game, it implies we can guess it from the gametools path
-    // on win32, and for most game package, the gametools are installed with the game
-    char aux_path[PATH_MAX]; // aux
-    strcpy( aux_path, mGameToolsPath.GetBuffer() );
-       if ( ( aux_path[ strlen(aux_path)-1 ] == '/' ) || ( aux_path[ strlen(aux_path)-1 ] == '\\' ) ) {
-      aux_path[strlen(aux_path)-1] = '\0'; // strip ending '/' if any
+       else
+       {
+               mEngine = prop;
+               xmlFree(prop);
        }
-    char up_path[PATH_MAX]; // up one level
-    ExtractFilePath( aux_path, up_path );
-    mEnginePath = up_path;
-  }
 
-  prop = (char*)xmlGetProp(pNode, (xmlChar*)"engine");
-  if (prop == NULL)
-  {
+       prop = (char*)xmlGetProp(pNode, (const xmlChar*)MP_ENGINE_ATTRIBUTE);
+       if (prop == NULL)
+       {
 #ifdef _WIN32
-    mEngine = "quake3.exe";
+               mMultiplayerEngine = "quake3.exe";
 #elif __linux__
-    mEngine = "quake3";
+               mMultiplayerEngine = "quake3";
 #elif __APPLE__
-    mEngine = "Quake3.app";
+               mMultiplayerEngine = "Quake3.app";
 #endif
-  }
-  else
-  {
-    mEngine = prop;
-    xmlFree(prop);
-  }
+       }
+       else
+       {
+               mMultiplayerEngine = prop;
+               xmlFree(prop);
+       }
+
+       {
+               // on win32, engine path can now be specified relative to the exe's cwd
+               prop = (char*)xmlGetProp(pNode, (const xmlChar *)ENGINEPATH_ATTRIBUTE);
+               if ( prop != NULL ) {
+                       char full[PATH_MAX];
+               #ifdef _WIN32
+                       _fullpath( full, prop, PATH_MAX );
+               #else
+                       strncpy( full, prop, PATH_MAX );
+               #endif
+                       xmlFree( prop );
+                       prop = NULL;
+                       // process seperators
+                       for ( p = full; *p != '\0'; p++ ) {
+                               if ( *p == '\\' ) {
+                                       *p = '/';
+                               }
+                       }
+                       mEnginePath = full;
+                       if ( p != full && *(p-1) != '/' ) {
+                               mEnginePath += "/";
+                       }
+               }
+               else
+               {
+                       // if engine path was not specified in the .game, it implies we can guess it from the gametools path
+                       // on win32, and for most game package, the gametools are installed with the game
+                       char aux_path[PATH_MAX]; // aux
+                       strcpy( aux_path, mGameToolsPath.GetBuffer() );
+                       if ( ( aux_path[ strlen(aux_path)-1 ] == '/' ) || ( aux_path[ strlen(aux_path)-1 ] == '\\' ) ) {
+                               aux_path[strlen(aux_path)-1] = '\0'; // strip ending '/' if any
+                       }
+                       char up_path[PATH_MAX]; // up one level
+                       ExtractFilePath( aux_path, up_path );
+                       mEnginePath = up_path;
+               }
+       }
 
 #if defined (__linux__) || defined (__APPLE__)
   // *nix specific
@@ -1019,7 +1086,7 @@ GtkWidget* CGameDialog::GetGlobalFrame()
   gtk_container_add( GTK_CONTAINER( mFrame ), vbox );
   gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 );
 
-  text = gtk_label_new( "Select the game:" );
+  text = gtk_label_new( _("Select the game:") );
   gtk_widget_show( text );
   gtk_box_pack_start( GTK_BOX( vbox ), text, FALSE, FALSE, 0 );
 
@@ -1031,23 +1098,23 @@ GtkWidget* CGameDialog::GetGlobalFrame()
 
   UpdateGameCombo();
 
-  check = gtk_check_button_new_with_label( "Auto load selected game on startup" );
+  check = gtk_check_button_new_with_label( _("Auto load selected game on startup") );
   gtk_widget_show(check);
   gtk_box_pack_start (GTK_BOX(vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bAutoLoadGame, DLG_CHECK_BOOL);
 
-  text = gtk_label_new("(this frame is available in the prefs menu if you set auto-select)");
+  text = gtk_label_new(_("(this frame is available in the prefs menu if you set auto-select)"));
   gtk_widget_show(text);
   gtk_box_pack_start (GTK_BOX(vbox), text, FALSE, FALSE, 0);
 
 #ifdef _WIN32
-  check = gtk_check_button_new_with_label( "Networked install - per-user settings" );
+  check = gtk_check_button_new_with_label( _("Networked install - per-user settings") );
   gtk_widget_show( check );
   gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, FALSE, 0 );
   AddDialogData( check, &m_bNetRun, DLG_CHECK_BOOL );
 #endif
 
-  check = gtk_check_button_new_with_label( "Log the console to radiant.log" );
+  check = gtk_check_button_new_with_label( _("Log the console to radiant.log") );
   gtk_widget_show( check );
   gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, FALSE, 0 );
   AddDialogData( check, &m_bLogConsole, DLG_CHECK_BOOL );
@@ -1104,7 +1171,7 @@ void CGameDialog::BuildDialog() {
        GtkWidget *dlg, *vbox1, *button, *setup_button;
 
        dlg = m_pWidget;
-       gtk_window_set_title( GTK_WINDOW( dlg ), "Select Game" );
+       gtk_window_set_title( GTK_WINDOW( dlg ), _("Select Game") );
 
        vbox1 = gtk_vbox_new( FALSE, 0 );
        gtk_widget_show( vbox1 );
@@ -1113,18 +1180,18 @@ void CGameDialog::BuildDialog() {
        gtk_container_add( GTK_CONTAINER( vbox1 ), GetGlobalFrame() );
        mTopBox = vbox1;
 
-       setup_button = gtk_button_new_with_label( "Configure more games" );
+       setup_button = gtk_button_new_with_label( _("Configure more games") );
        gtk_widget_show( setup_button );
        gtk_box_pack_start( GTK_BOX( vbox1 ), setup_button, FALSE, FALSE, 0 );
        gtk_signal_connect( GTK_OBJECT( setup_button ), "clicked",
                                                GTK_SIGNAL_FUNC( SInstallCallback ), this );
 
-       button = gtk_button_new_with_label( "OK" );
+       button = gtk_button_new_with_label( _("OK") );
        gtk_widget_show( button );
        gtk_box_pack_start( GTK_BOX( vbox1 ), button, FALSE, FALSE, 0 );
        AddModalButton( button, IDOK );
 
-       button = gtk_button_new_with_label( "Cancel" );
+       button = gtk_button_new_with_label( _("Cancel") );
        gtk_widget_show( button );
        gtk_box_pack_start( GTK_BOX( vbox1 ), button, FALSE, FALSE, 0 );
        AddModalButton( button, IDCANCEL );
@@ -1333,6 +1400,7 @@ void CGameDialog::AddPacksURL(Str &URL)
       URL += "&Games_dlup%5B%5D=1";
     else if ((*iGame)->mGameFile == "wolf.game")
       URL += "&Games_dlup%5B%5D=2";
+       // FIXME: double entry
     else if ((*iGame)->mGameFile == "wolf.game")
       URL += "&Games_dlup%5B%5D=3";
     else if ((*iGame)->mGameFile == "jk2.game")
@@ -1359,7 +1427,6 @@ void CGameDialog::UpdateNetrun(bool retrieve)
   strNetrun = g_strAppPath; strNetrun += NETRUN_FILENAME;
   if (!retrieve)
   {
-    // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=639
     // now check if we are running from a network installation
     // use a dummy file as the flag
     f_netrun = fopen(strNetrun.GetBuffer(), "r");
@@ -1525,7 +1592,7 @@ void PrefsDlg::BuildDialog ()
   GtkObject *adj;
 
   dialog = m_pWidget;
-  gtk_window_set_title(GTK_WINDOW(dialog), "GtkRadiant Preferences");
+  gtk_window_set_title(GTK_WINDOW(dialog), _("GtkRadiant Preferences"));
   gtk_widget_realize(dialog);
 
   mainvbox = gtk_vbox_new(FALSE, 5);
@@ -1537,19 +1604,19 @@ void PrefsDlg::BuildDialog ()
   gtk_widget_show(hbox);
   gtk_box_pack_end(GTK_BOX(mainvbox), hbox, FALSE, TRUE, 0);
 
-  button = gtk_button_new_with_label("OK");
+  button = gtk_button_new_with_label(_("OK"));
   gtk_widget_show(button);
   gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
   gtk_widget_set_usize(button, 60, -2);
   AddModalButton(button, IDOK);
 
-  button = gtk_button_new_with_label("Cancel");
+  button = gtk_button_new_with_label(_("Cancel"));
   gtk_widget_show(button);
   gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
   gtk_widget_set_usize(button, 60, -2);
   AddModalButton(button, IDCANCEL);
 
-  button = gtk_button_new_with_label ("Clean");
+  button = gtk_button_new_with_label (_("Clean"));
   gtk_widget_show(button);
   gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(OnButtonClean), this);
   gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
@@ -1581,7 +1648,7 @@ void PrefsDlg::BuildDialog ()
 
     {
       GtkCellRenderer* renderer = gtk_cell_renderer_text_new();
-      GtkTreeViewColumn* column = gtk_tree_view_column_new_with_attributes("Preferences", renderer, "text", 0, NULL);
+      GtkTreeViewColumn* column = gtk_tree_view_column_new_with_attributes(_("Preferences"), renderer, "text", 0, NULL);
       gtk_tree_view_append_column(GTK_TREE_VIEW(view), column);
     }
 
@@ -1601,80 +1668,85 @@ void PrefsDlg::BuildDialog ()
       {
         GtkTreeIter group;
         gtk_tree_store_append(store, &group, NULL);
-        gtk_tree_store_set(store, &group, 0, "Globals", 1, PTAB_FRONT, -1);
+        gtk_tree_store_set(store, &group, 0, _("Globals"), 1, PTAB_FRONT, -1);
         {
           GtkTreeIter tab;
           gtk_tree_store_append(store, &tab, &group);
-          gtk_tree_store_set(store, &tab, 0, "Game settings", 1, (gpointer)PTAB_GAME_SETTINGS, -1);
+          gtk_tree_store_set(store, &tab, 0, _("Game settings"), 1, (gpointer)PTAB_GAME_SETTINGS, -1);
         }
       }
 
       {
         GtkTreeIter group;
         gtk_tree_store_append(store, &group, NULL);
-        gtk_tree_store_set(store, &group, 0, "Display", 1, PTAB_FRONT, -1);
+        gtk_tree_store_set(store, &group, 0, _("Display"), 1, PTAB_FRONT, -1);
         {
           GtkTreeIter tab;
           gtk_tree_store_append(store, &tab, &group);
-          gtk_tree_store_set(store, &tab, 0, "2D Display/Rendering", 1, (gpointer)PTAB_2D, -1);
+          gtk_tree_store_set(store, &tab, 0, _("2D Display/Rendering"), 1, (gpointer)PTAB_2D, -1);
         }
         {
           GtkTreeIter tab;
           gtk_tree_store_append(store, &tab, &group);
-          gtk_tree_store_set(store, &tab, 0, "3D View", 1, (gpointer)PTAB_CAMERA, -1);
+          gtk_tree_store_set(store, &tab, 0, _("3D View"), 1, (gpointer)PTAB_CAMERA, -1);
         }
         {
           GtkTreeIter tab;
           gtk_tree_store_append(store, &tab, &group);
-          gtk_tree_store_set(store, &tab, 0, "Texture Settings", 1, (gpointer)PTAB_TEXTURE, -1);
+          gtk_tree_store_set(store, &tab, 0, _("Texture Settings"), 1, (gpointer)PTAB_TEXTURE, -1);
         }
       }
 
       {
         GtkTreeIter group;
         gtk_tree_store_append(store, &group, NULL);
-        gtk_tree_store_set(store, &group, 0, "Interface", 1, PTAB_FRONT, -1);
+        gtk_tree_store_set(store, &group, 0, _("Interface"), 1, PTAB_FRONT, -1);
         {
           GtkTreeIter tab;
           gtk_tree_store_append(store, &tab, &group);
-          gtk_tree_store_set(store, &tab, 0, "Layout", 1, (gpointer)PTAB_LAYOUT, -1);
+          gtk_tree_store_set(store, &tab, 0, _("Layout"), 1, (gpointer)PTAB_LAYOUT, -1);
         }
         {
           GtkTreeIter tab;
           gtk_tree_store_append(store, &tab, &group);
-          gtk_tree_store_set(store, &tab, 0, "Mouse", 1, (gpointer)PTAB_MOUSE, -1);
+          gtk_tree_store_set(store, &tab, 0, _("Mouse"), 1, (gpointer)PTAB_MOUSE, -1);
         }
         {
           GtkTreeIter tab;
           gtk_tree_store_append(store, &tab, &group);
-          gtk_tree_store_set(store, &tab, 0, "Editing", 1, (gpointer)PTAB_EDITING, -1);
+          gtk_tree_store_set(store, &tab, 0, _("Editing"), 1, (gpointer)PTAB_EDITING, -1);
         }
       }
 
       {
         GtkTreeIter group;
         gtk_tree_store_append(store, &group, NULL);
-        gtk_tree_store_set(store, &group, 0, "Other", 1, PTAB_FRONT, -1);
+        gtk_tree_store_set(store, &group, 0, _("Other"), 1, PTAB_FRONT, -1);
+        {
+          GtkTreeIter tab;
+          gtk_tree_store_append(store, &tab, &group);
+          gtk_tree_store_set(store, &tab, 0, _("Startup/Auto save"), 1, (gpointer)PTAB_STARTUP, -1);
+        }
         {
           GtkTreeIter tab;
           gtk_tree_store_append(store, &tab, &group);
-          gtk_tree_store_set(store, &tab, 0, "Startup/Auto save", 1, (gpointer)PTAB_STARTUP, -1);
+          gtk_tree_store_set(store, &tab, 0, _("Paths"), 1, (gpointer)PTAB_PATHS, -1);
         }
         {
           GtkTreeIter tab;
           gtk_tree_store_append(store, &tab, &group);
-          gtk_tree_store_set(store, &tab, 0, "Paths", 1, (gpointer)PTAB_PATHS, -1);
+          gtk_tree_store_set(store, &tab, 0, _("Brush"), 1, (gpointer)PTAB_BRUSH, -1);
         }
         {
           GtkTreeIter tab;
           gtk_tree_store_append(store, &tab, &group);
-          gtk_tree_store_set(store, &tab, 0, "Misc", 1, (gpointer)PTAB_MISC, -1);
+          gtk_tree_store_set(store, &tab, 0, _("Misc"), 1, (gpointer)PTAB_MISC, -1);
         }
         if (!g_qeglobals.bBSPFrontendPlugin)
         {
           GtkTreeIter tab;
           gtk_tree_store_append(store, &tab, &group);
-          gtk_tree_store_set(store, &tab, 0, "BSP Monitoring", 1, (gpointer)PTAB_BSPMONITOR, -1);
+          gtk_tree_store_set(store, &tab, 0, _("BSP Monitoring"), 1, (gpointer)PTAB_BSPMONITOR, -1);
         }
       }
     }
@@ -1691,7 +1763,7 @@ void PrefsDlg::BuildDialog ()
   // Front page...
   // todo : add something interesting here
   // NOTE TTimo: tip of the day? or a logo?
-  preflabel = gtk_label_new("Front Page");
+  preflabel = gtk_label_new(_("Front Page"));
   gtk_widget_show(preflabel);
   pageframe = gtk_frame_new(NULL);
   gtk_container_set_border_width(GTK_CONTAINER(pageframe), 5);
@@ -1705,16 +1777,16 @@ void PrefsDlg::BuildDialog ()
   gtk_notebook_append_page(GTK_NOTEBOOK(notebook), pageframe, preflabel);
 
   /******** global preferences group ****************************/
-  preflabel = gtk_label_new("Globals");
+  preflabel = gtk_label_new(_("Globals"));
   gtk_widget_show(preflabel);
 
   pageframe = mGamesDialog.GetGlobalFrame();
   gtk_notebook_append_page(GTK_NOTEBOOK(notebook), pageframe, preflabel);
 
   /******** 2D prefs group (xy views/rendering options) *********/
-  preflabel = gtk_label_new("2D Display");
+  preflabel = gtk_label_new(_("2D Display"));
   gtk_widget_show(preflabel);
-  pageframe = gtk_frame_new("2D Display");
+  pageframe = gtk_frame_new(_("2D Display"));
   gtk_container_set_border_width(GTK_CONTAINER(pageframe), 5);
   gtk_widget_show(pageframe);
   vbox = gtk_vbox_new(FALSE, 5);
@@ -1723,33 +1795,33 @@ void PrefsDlg::BuildDialog ()
   gtk_container_add(GTK_CONTAINER(pageframe), vbox);
 
   // OpenGL Display Lists
-  check = gtk_check_button_new_with_label("OpenGL Display Lists");
+  check = gtk_check_button_new_with_label(_("OpenGL Display Lists"));
   gtk_widget_show(check);
   gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
   AddDialogData(check, &m_bDisplayLists, DLG_CHECK_BOOL);
 
   // Antialiased points & lines
   // Fishman - Add antialiazed points and lines support. 09/03/00
-  check = gtk_check_button_new_with_label ("OpenGL antialiased points and lines");
+  check = gtk_check_button_new_with_label (_("OpenGL antialiased points and lines"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bAntialiasedPointsAndLines, DLG_CHECK_BOOL);
 
   // Solid selection boxes
-  check = gtk_check_button_new_with_label ("Solid selection boxes");
+  check = gtk_check_button_new_with_label (_("Solid selection boxes"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bNoStipple, DLG_CHECK_BOOL);
 
   // Display size info
-  check = gtk_check_button_new_with_label ("Display size info");
+  check = gtk_check_button_new_with_label (_("Display size info"));
   gtk_widget_show (check);
   gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bSizePaint, DLG_CHECK_BOOL);
 
   // Alternate vertex/edge handles
   // Gef: Kyro GL_POINT work around 25-aug-2001
-  check = gtk_check_button_new_with_label ("Alternate vertex/edge handles");
+  check = gtk_check_button_new_with_label (_("Alternate vertex/edge handles"));
   gtk_widget_show(check);
   gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
   AddDialogData(check, &m_bGlPtWorkaround, DLG_CHECK_BOOL);
@@ -1757,21 +1829,27 @@ void PrefsDlg::BuildDialog ()
   g_list_free (combo_list);
 
 #ifdef ATIHACK_812
-       // ATI bugs
-       // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=812
-       check = gtk_check_button_new_with_label ("ATI cards with broken drivers - bug #802");
-       gtk_widget_show(check);
-       gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
-       AddDialogData(check, &m_bGlATIHack, DLG_CHECK_BOOL);
+  // ATI bugs
+  check = gtk_check_button_new_with_label (_("ATI and Intel cards w/ buggy drivers (disappearing polygons)"));
+  gtk_widget_show(check);
+  gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
+  AddDialogData(check, &m_bGlATIHack, DLG_CHECK_BOOL);
+#endif
+
+#ifdef NVIDIA_AERO_HACK
+  check = gtk_check_button_new_with_label (_("NVIDIA/Aero bug - disable Windows composition"));
+  gtk_widget_show(check);
+  gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
+  AddDialogData(check, &m_bGlNvidiaAeroHack, DLG_CHECK_BOOL);
 #endif
 
   // Add the page to the notebook
   gtk_notebook_append_page(GTK_NOTEBOOK(notebook), pageframe, preflabel);
 
   /******** 3D Camera view group *********/
-  preflabel = gtk_label_new("3D View");
+  preflabel = gtk_label_new(_("3D View"));
   gtk_widget_show(preflabel);
-  pageframe = gtk_frame_new("3D View");
+  pageframe = gtk_frame_new(_("3D View"));
   gtk_container_set_border_width(GTK_CONTAINER(pageframe), 5);
   gtk_widget_show(pageframe);
   vbox = gtk_vbox_new(FALSE, 5);
@@ -1786,7 +1864,7 @@ void PrefsDlg::BuildDialog ()
   gtk_box_pack_start (GTK_BOX (vbox), hbox2, FALSE, FALSE, 0);
 
   // label
-  label = gtk_label_new("Movement Velocity");
+  label = gtk_label_new(_("Movement Velocity"));
   gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
   gtk_widget_show(label);
   gtk_box_pack_start(GTK_BOX(hbox2), label, FALSE, FALSE, 0);
@@ -1809,7 +1887,7 @@ void PrefsDlg::BuildDialog ()
   gtk_box_pack_start (GTK_BOX (vbox), hbox2, FALSE, FALSE, 0);
 
   // label
-  label = gtk_label_new ("Rotational Velocity");
+  label = gtk_label_new (_("Rotational Velocity"));
   gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
   gtk_widget_show (label);
   gtk_box_pack_start(GTK_BOX(hbox2), label, FALSE, FALSE, 0);
@@ -1831,12 +1909,12 @@ void PrefsDlg::BuildDialog ()
   gtk_box_pack_start (GTK_BOX (vbox), hbox2, FALSE, FALSE, 0);
 
   // label
-  label = gtk_label_new ("slow");
+  label = gtk_label_new (_("slow"));
   gtk_widget_show (label);
   gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0);
 
   // label
-  label = gtk_label_new ("fast");
+  label = gtk_label_new (_("fast"));
   gtk_widget_show (label);
   gtk_box_pack_end (GTK_BOX (hbox2), label, FALSE, FALSE, 0);
 
@@ -1848,7 +1926,7 @@ void PrefsDlg::BuildDialog ()
   gtk_table_set_row_spacings (GTK_TABLE (table), 5);
   gtk_table_set_col_spacings (GTK_TABLE (table), 5);
 
-  label = gtk_label_new ("Use paint-select in camera view:");
+  label = gtk_label_new (_("Use paint-select in camera view:"));
   gtk_widget_show (label);
   gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
   gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
@@ -1856,9 +1934,9 @@ void PrefsDlg::BuildDialog ()
                   (GtkAttachOptions) (0), 0, 0);
 
   combo_list = NULL;
-  combo_list = g_list_append (combo_list, (void *)"No");
-  combo_list = g_list_append (combo_list, (void *)"Yes");
-  combo_list = g_list_append (combo_list, (void *)"Yes (Classic Key Setup)");
+  combo_list = g_list_append (combo_list, (void *)_("No"));
+  combo_list = g_list_append (combo_list, (void *)_("Yes"));
+  combo_list = g_list_append (combo_list, (void *)_("Yes (Classic Key Setup)"));
 
   combo = gtk_combo_new ();
   gtk_combo_set_popdown_strings (GTK_COMBO (combo), combo_list);
@@ -1870,35 +1948,35 @@ void PrefsDlg::BuildDialog ()
   AddDialogData (combo, &m_nCamDragMultiSelect, DLG_COMBO_INT);
 
   // Freelook in Camera view
-  check = gtk_check_button_new_with_label ("Freelook in Camera view");
+  check = gtk_check_button_new_with_label (_("Freelook in Camera view"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   gtk_label_set_justify (GTK_LABEL (GTK_BIN (check)->child), GTK_JUSTIFY_LEFT);
   AddDialogData (check, &m_bCamFreeLook, DLG_CHECK_BOOL);
 
   // Freelook in Camera view w/ forward & back strafing instead of up and down looking
-  check = gtk_check_button_new_with_label ("Freelook strafes Forward and Back");
+  check = gtk_check_button_new_with_label (_("Freelook strafes Forward and Back"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   gtk_label_set_justify (GTK_LABEL (GTK_BIN (check)->child), GTK_JUSTIFY_LEFT);
   AddDialogData (check, &m_bCamFreeLookStrafe, DLG_CHECK_BOOL);
 
   // Invert mouse in freelook
-  check = gtk_check_button_new_with_label ("Invert mouse in freelook");
+  check = gtk_check_button_new_with_label (_("Invert mouse in freelook"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   gtk_label_set_justify (GTK_LABEL (GTK_BIN (check)->child), GTK_JUSTIFY_LEFT);
   AddDialogData (check, &m_bCamInverseMouse, DLG_CHECK_BOOL);
 
   // Discrete movement
-  check = gtk_check_button_new_with_label ("Discrete movement");
+  check = gtk_check_button_new_with_label (_("Discrete movement"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   gtk_label_set_justify (GTK_LABEL (GTK_BIN (check)->child), GTK_JUSTIFY_LEFT);
   AddDialogData (check, &m_bCamDiscrete, DLG_CHECK_BOOL);
 
   // Update XY views on camera move
-  check = gtk_check_button_new_with_label ("Update XY views on camera move");
+  check = gtk_check_button_new_with_label (_("Update XY views on camera move"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   gtk_label_set_justify (GTK_LABEL (GTK_BIN (check)->child), GTK_JUSTIFY_LEFT);
@@ -1908,9 +1986,9 @@ void PrefsDlg::BuildDialog ()
   gtk_notebook_append_page(GTK_NOTEBOOK(notebook), pageframe, preflabel);
 
   /******** Texture group *********/
-  preflabel = gtk_label_new("Textures");
+  preflabel = gtk_label_new(_("Textures"));
   gtk_widget_show(preflabel);
-  pageframe = gtk_frame_new("Textures");
+  pageframe = gtk_frame_new(_("Textures"));
   gtk_container_set_border_width(GTK_CONTAINER(pageframe), 5);
   gtk_widget_show(pageframe);
   vbox = gtk_vbox_new(FALSE, 6);
@@ -1920,7 +1998,7 @@ void PrefsDlg::BuildDialog ()
 
   // Texture quality slider
   // label
-  label = gtk_label_new ("Texture quality");
+  label = gtk_label_new (_("Texture quality"));
   gtk_widget_show (label);
   gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
   gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
@@ -1940,27 +2018,27 @@ void PrefsDlg::BuildDialog ()
   hbox2 = gtk_hbox_new (FALSE, 0);
   gtk_widget_show (hbox2);
   gtk_box_pack_start (GTK_BOX (vbox), hbox2, FALSE, FALSE, 0);
-  label = gtk_label_new ("low");
+  label = gtk_label_new (_("low"));
   gtk_widget_show (label);
   gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0);
-  label = gtk_label_new ("high");
+  label = gtk_label_new (_("high"));
   gtk_widget_show (label);
   gtk_box_pack_end (GTK_BOX (hbox2), label, FALSE, FALSE, 0);
 
   // texture subsets
-  check = gtk_check_button_new_with_label ("Texture subsets");
+  check = gtk_check_button_new_with_label (_("Texture subsets"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bTextureWindow, DLG_CHECK_BOOL);
 
   // texture scrollbar
-  check = gtk_check_button_new_with_label ("Texture scrollbar");
+  check = gtk_check_button_new_with_label (_("Texture scrollbar"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bTextureScrollbar, DLG_CHECK_BOOL);
 
   // texture increment matches grid
-  check = gtk_check_button_new_with_label ("Tex increment matches grid");
+  check = gtk_check_button_new_with_label (_("Tex increment matches grid"));
   gtk_widget_show (check);
   gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bSnapTToGrid, DLG_CHECK_BOOL);
@@ -1974,7 +2052,7 @@ void PrefsDlg::BuildDialog ()
   gtk_table_set_row_spacings (GTK_TABLE (table), 5);
   gtk_table_set_col_spacings (GTK_TABLE (table), 5);
 
-  label = gtk_label_new ("Texture Compression (if available):");
+  label = gtk_label_new (_("Texture Compression (if available):"));
   gtk_widget_show (label);
   gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
   gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
@@ -1985,21 +2063,21 @@ void PrefsDlg::BuildDialog ()
   // Texture compression choice label
   combo_list = NULL;
   // NONE will always be in pos 0
-  combo_list = g_list_append (combo_list, (void *)"None");
+  combo_list = g_list_append (combo_list, (void *)_("None"));
 
   // if OpenGL compression is enabled it will always be
   // in pos 1
   if (g_qeglobals.m_bOpenGLCompressionSupported)
   {
-    combo_list = g_list_append (combo_list, (void *)"OpenGL ARB");
+    combo_list = g_list_append (combo_list, (void *)_("OpenGL ARB"));
   }
 
   // If S3 is enabled offer all 3 valid compression schemes in RGBA
   if (g_qeglobals.m_bS3CompressionSupported)
   {
-    combo_list = g_list_append (combo_list, (void *)"S3TC DXT1");
-    combo_list = g_list_append (combo_list, (void *)"S3TC DXT3");
-    combo_list = g_list_append (combo_list, (void *)"S3TC DXT5");
+    combo_list = g_list_append (combo_list, (void *)_("S3TC DXT1"));
+    combo_list = g_list_append (combo_list, (void *)_("S3TC DXT3"));
+    combo_list = g_list_append (combo_list, (void *)_("S3TC DXT5"));
   }
 
   combo = gtk_combo_new ();
@@ -2021,7 +2099,7 @@ void PrefsDlg::BuildDialog ()
 
   // Startup shaders
   // label
-  label = gtk_label_new ("Startup Shaders:");
+  label = gtk_label_new (_("Startup Shaders:"));
   gtk_widget_show (label);
   gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
   gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
@@ -2031,14 +2109,14 @@ void PrefsDlg::BuildDialog ()
 
   // combo list
   combo_list = NULL;
-  combo_list = g_list_append (combo_list, (void *)"None");
+  combo_list = g_list_append (combo_list, (void *)_("None"));
   if (g_pGameDescription->mGameFile == "jk2.game" || g_pGameDescription->mGameFile == "ja.game")
-    combo_list = g_list_append (combo_list, (void *)"System");
+    combo_list = g_list_append (combo_list, (void *)_("System"));
   else if (g_pGameDescription->mGameFile == "sof2.game")
-    combo_list = g_list_append (combo_list, (void *)"Tools");
+    combo_list = g_list_append (combo_list, (void *)("Tools"));
   else
-    combo_list = g_list_append (combo_list, (void *)"Common");
-  combo_list = g_list_append (combo_list, (void *)"All");
+    combo_list = g_list_append (combo_list, (void *)_("Common"));
+  combo_list = g_list_append (combo_list, (void *)_("All"));
   combo = gtk_combo_new ();
   gtk_combo_set_popdown_strings (GTK_COMBO (combo), combo_list);
   gtk_widget_show (combo);
@@ -2053,9 +2131,9 @@ void PrefsDlg::BuildDialog ()
   gtk_notebook_append_page(GTK_NOTEBOOK(notebook), pageframe, preflabel);
 
   /******** Layout group *********/
-  preflabel = gtk_label_new("Layout");
+  preflabel = gtk_label_new(_("Layout"));
   gtk_widget_show(preflabel);
-  pageframe = gtk_frame_new("Layout");
+  pageframe = gtk_frame_new(_("Layout"));
   gtk_container_set_border_width(GTK_CONTAINER(pageframe), 5);
   gtk_widget_show(pageframe);
   vbox = gtk_vbox_new(FALSE, 5);
@@ -2129,13 +2207,13 @@ void PrefsDlg::BuildDialog ()
   AddDialogData (radio, &m_nLatchedView, DLG_RADIO_INT);
 
   // Floating Z window
-  check = gtk_check_button_new_with_label ("Floating Z Window");
+  check = gtk_check_button_new_with_label (_("Floating Z Window"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bLatchedFloatingZ, DLG_CHECK_BOOL);
 
   // show menu tear-off seperators
-  check = gtk_check_button_new_with_label ("Detachable Menus");
+  check = gtk_check_button_new_with_label (_("Detachable Menus"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bLatchedDetachableMenus, DLG_CHECK_BOOL);
@@ -2143,7 +2221,7 @@ void PrefsDlg::BuildDialog ()
   if (!g_pGameDescription->mNoPatch)
   {
     // show patch toolbar
-    check = gtk_check_button_new_with_label ("Patch Toolbar");
+    check = gtk_check_button_new_with_label (_("Patch Toolbar"));
     gtk_widget_show (check);
     gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
     g_object_set_data (G_OBJECT (dialog), "check_patchtoolbar", check); // Allow to be disabled for Q1/Q2
@@ -2151,27 +2229,27 @@ void PrefsDlg::BuildDialog ()
   }
 
   // use wide toolbar
-  check = gtk_check_button_new_with_label ("Wide Toolbar");
+  check = gtk_check_button_new_with_label (_("Wide Toolbar"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bLatchedWideToolbar, DLG_CHECK_BOOL);
 
   // use plugin toolbar
-  check = gtk_check_button_new_with_label ("Plugin Toolbar");
+  check = gtk_check_button_new_with_label (_("Plugin Toolbar"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bLatchedPluginToolbar, DLG_CHECK_BOOL);
 
 #ifdef _WIN32
   // win32 file dialog
-  check = gtk_check_button_new_with_label ("Use win32 file load dialog");
+  check = gtk_check_button_new_with_label (_("Use win32 file dialog (hacky)"));
   gtk_widget_show (check);
   // gtk_container_add (GTK_CONTAINER (vbox), check);
   gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bNativeGUI, DLG_CHECK_BOOL);
 
   // position on primary monitor
-  check = gtk_check_button_new_with_label ("Start on Primary Monitor");
+  check = gtk_check_button_new_with_label (_("Start on Primary Monitor"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   g_object_set_data (G_OBJECT (dialog), "check_startonprimary", check);
@@ -2183,9 +2261,9 @@ void PrefsDlg::BuildDialog ()
   gtk_notebook_append_page(GTK_NOTEBOOK(notebook), pageframe, preflabel);
 
   /******** Mouse group *********/
-  preflabel = gtk_label_new("Mouse");
+  preflabel = gtk_label_new(_("Mouse"));
   gtk_widget_show(preflabel);
-  pageframe = gtk_frame_new("Mouse");
+  pageframe = gtk_frame_new(_("Mouse"));
   gtk_container_set_border_width(GTK_CONTAINER(pageframe), 5);
   gtk_widget_show(pageframe);
   vbox = gtk_vbox_new(FALSE, 5);
@@ -2200,30 +2278,30 @@ void PrefsDlg::BuildDialog ()
   gtk_box_pack_start(GTK_BOX(vbox), hbox2, FALSE, FALSE, 0);
 
   // 2 button radio
-  radio = gtk_radio_button_new_with_label (NULL, "2 button");
+  radio = gtk_radio_button_new_with_label (NULL, _("2 button"));
   gtk_widget_show (radio);
   gtk_box_pack_start (GTK_BOX (hbox2), radio, FALSE, FALSE, 0);
 
   // 3 button radio
-  radio = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (radio), "3 button");
+  radio = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (radio), _("3 button"));
   gtk_widget_show (radio);
   gtk_box_pack_start (GTK_BOX (hbox2), radio, FALSE, FALSE, 0);
   AddDialogData (radio, &m_nMouse, DLG_RADIO_INT);
 
   // right click to drop entity
-  check = gtk_check_button_new_with_label ("Right click to drop entities");
+  check = gtk_check_button_new_with_label (_("Right click to drop entities"));
   gtk_widget_show (check);
   gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bRightClick, DLG_CHECK_BOOL);
 
   // Mouse chaser (and this does what?)
-  check = gtk_check_button_new_with_label ("Mouse chaser");
+  check = gtk_check_button_new_with_label (_("Mouse chaser"));
   gtk_widget_show (check);
   gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bChaseMouse, DLG_CHECK_BOOL);
 
   // Alt + multi-drag
-  check = gtk_check_button_new_with_label ("ALT + multi-drag");
+  check = gtk_check_button_new_with_label (_("ALT + multi-drag"));
   gtk_widget_show (check);
   gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bALTEdge, DLG_CHECK_BOOL);
@@ -2235,7 +2313,7 @@ void PrefsDlg::BuildDialog ()
   gtk_box_pack_start(GTK_BOX(vbox), hbox2, FALSE, FALSE, 0);
 
   // label
-  label = gtk_label_new ("Wheel Mouse inc:");
+  label = gtk_label_new (_("Wheel Mouse inc:"));
   gtk_widget_show (label);
   gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0);
 
@@ -2250,9 +2328,9 @@ void PrefsDlg::BuildDialog ()
   gtk_notebook_append_page(GTK_NOTEBOOK(notebook), pageframe, preflabel);
 
   /******** Editing group *********/
-  preflabel = gtk_label_new("Editing");
+  preflabel = gtk_label_new(_("Editing"));
   gtk_widget_show(preflabel);
-  pageframe = gtk_frame_new("Editing");
+  pageframe = gtk_frame_new(_("Editing"));
   gtk_container_set_border_width(GTK_CONTAINER(pageframe), 5);
   gtk_widget_show(pageframe);
   vbox = gtk_vbox_new(FALSE, 5);
@@ -2261,31 +2339,37 @@ void PrefsDlg::BuildDialog ()
   gtk_container_add(GTK_CONTAINER(pageframe), vbox);
 
   // Vertex editing splits faces
-  check = gtk_check_button_new_with_label ("Vertex editing splits face");
+  check = gtk_check_button_new_with_label (_("Vertex editing splits face"));
   gtk_widget_show (check);
   gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bVertexSplit, DLG_CHECK_BOOL);
 
   // Fix target/targetname collisions
-  check = gtk_check_button_new_with_label ("Fix target/targetname collisions");
+  check = gtk_check_button_new_with_label (_("Fix target/targetname collisions"));
   gtk_widget_show (check);
   gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bDoTargetFix, DLG_CHECK_BOOL);
 
   // Clipper tool uses caulk
-  check = gtk_check_button_new_with_label ("Clipper tool uses caulk");
+  check = gtk_check_button_new_with_label (_("Clipper tool uses caulk"));
   gtk_widget_show (check);
   gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bClipCaulk, DLG_CHECK_BOOL);
 
   // Don't clamp plane points
-  check = gtk_check_button_new_with_label ("Don't clamp plane points");
+  check = gtk_check_button_new_with_label (_("Don't clamp plane points"));
   gtk_widget_show (check);
   gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bNoClamp, DLG_CHECK_BOOL);
 
+  // Snap to grid
+  check = gtk_check_button_new_with_label (_("Snap to grid"));
+  gtk_widget_show (check);
+  gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
+  AddDialogData (check, &m_bSnap, DLG_CHECK_BOOL);
+
   // Select patch by bounding box
-  check = gtk_check_button_new_with_label ("Select patches by bounding box");
+  check = gtk_check_button_new_with_label (_("Select patches by bounding box"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bPatchBBoxSelect, DLG_CHECK_BOOL);
@@ -2299,7 +2383,7 @@ void PrefsDlg::BuildDialog ()
   gtk_table_set_col_spacings (GTK_TABLE (table), 5);
 
   // label
-  label = gtk_label_new ("Rotation increment:");
+  label = gtk_label_new (_("Rotation increment:"));
   gtk_widget_show (label);
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
                    (GtkAttachOptions) (0),
@@ -2316,7 +2400,7 @@ void PrefsDlg::BuildDialog ()
 
   // Undo levels
   // label
-  label = gtk_label_new ("Undo Levels:");
+  label = gtk_label_new (_("Undo Levels:"));
   gtk_widget_show (label);
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
                    (GtkAttachOptions) (0),
@@ -2333,7 +2417,7 @@ void PrefsDlg::BuildDialog ()
 
   // Patch subdivisions
   // label
-  label = gtk_label_new ("Patch subdivisions:");
+  label = gtk_label_new (_("Patch subdivisions:"));
   gtk_widget_show (label);
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3,
                    (GtkAttachOptions) (0),
@@ -2352,9 +2436,9 @@ void PrefsDlg::BuildDialog ()
   gtk_notebook_append_page(GTK_NOTEBOOK(notebook), pageframe, preflabel);
 
   /******** Save/Load group *********/
-  preflabel = gtk_label_new("Startup/Auto save");
+  preflabel = gtk_label_new(_("Startup/Auto save"));
   gtk_widget_show(preflabel);
-  pageframe = gtk_frame_new("Startup/Auto save");
+  pageframe = gtk_frame_new(_("Startup/Auto save"));
   gtk_container_set_border_width(GTK_CONTAINER(pageframe), 5);
   gtk_widget_show(pageframe);
   vbox = gtk_vbox_new(FALSE, 5);
@@ -2363,19 +2447,19 @@ void PrefsDlg::BuildDialog ()
   gtk_container_add(GTK_CONTAINER(pageframe), vbox);
 
   // Snapshots
-  check = gtk_check_button_new_with_label ("Snapshots");
+  check = gtk_check_button_new_with_label (_("Snapshots"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bSnapShots, DLG_CHECK_BOOL);
 
   // load last project on open
-  check = gtk_check_button_new_with_label ("Load last project on open");
+  check = gtk_check_button_new_with_label (_("Load last project on open"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bLoadLast, DLG_CHECK_BOOL);
 
   // load last map on open
-  check = gtk_check_button_new_with_label ("Load last map on open");
+  check = gtk_check_button_new_with_label (_("Load last map on open"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bLoadLastMap, DLG_CHECK_BOOL);
@@ -2388,7 +2472,7 @@ void PrefsDlg::BuildDialog ()
   gtk_container_set_border_width (GTK_CONTAINER (hbox2), 0);
 
   // label
-  check = gtk_check_button_new_with_label ("Auto save every");
+  check = gtk_check_button_new_with_label (_("Auto save every"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (hbox2), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bAutoSave, DLG_CHECK_BOOL);
@@ -2401,7 +2485,7 @@ void PrefsDlg::BuildDialog ()
   AddDialogData (spin, &m_nAutoSave, DLG_SPIN_INT);
 
   // label
-  label = gtk_label_new ("minutes");
+  label = gtk_label_new (_("minutes"));
   gtk_widget_show (label);
   gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0);
 
@@ -2409,9 +2493,9 @@ void PrefsDlg::BuildDialog ()
   gtk_notebook_append_page(GTK_NOTEBOOK(notebook), pageframe, preflabel);
 
   /******** Paths group *********/
-  preflabel = gtk_label_new("Paths");
+  preflabel = gtk_label_new(_("Paths"));
   gtk_widget_show(preflabel);
-  pageframe = gtk_frame_new("Paths");
+  pageframe = gtk_frame_new(_("Paths"));
   gtk_container_set_border_width(GTK_CONTAINER(pageframe), 5);
   gtk_widget_show(pageframe);
   vbox = gtk_vbox_new(FALSE, 5);
@@ -2428,7 +2512,7 @@ void PrefsDlg::BuildDialog ()
   gtk_table_set_col_spacings (GTK_TABLE (table), 5);
 
   // label
-  label = gtk_label_new ("Prefab path:");
+  label = gtk_label_new (_("Prefab path:"));
   gtk_widget_show (label);
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
                    (GtkAttachOptions) (0),
@@ -2444,7 +2528,6 @@ void PrefsDlg::BuildDialog ()
                    (GtkAttachOptions) (0), 1, 0);
   AddDialogData (entry, &m_strPrefabPath, DLG_ENTRY_TEXT);
 
-  // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=805
 #if 0
   // browse button
   button = gtk_button_new_with_label ("...");
@@ -2457,7 +2540,7 @@ void PrefsDlg::BuildDialog ()
 
   // User ini path
   // label
-  label = gtk_label_new ("User INI path:");
+  label = gtk_label_new (_("User INI path:"));
   gtk_widget_show (label);
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
                    (GtkAttachOptions) (0),
@@ -2483,10 +2566,51 @@ void PrefsDlg::BuildDialog ()
   // Add the page to the notebook
   gtk_notebook_append_page(GTK_NOTEBOOK(notebook), pageframe, preflabel);
 
+  /******** Brush group ********/
+  preflabel = gtk_label_new(_("Brush"));
+  gtk_widget_show(preflabel);
+  pageframe = gtk_frame_new(_("Brush"));
+  gtk_container_set_border_width(GTK_CONTAINER(pageframe), 5);
+  gtk_widget_show(pageframe);
+  vbox = gtk_vbox_new(FALSE, 5);
+  gtk_widget_show(vbox);
+  gtk_container_set_border_width(GTK_CONTAINER(vbox), 5);
+  gtk_container_add(GTK_CONTAINER(pageframe), vbox);
+
+  // default texture scale
+  // table
+  table = gtk_table_new(2, 1, FALSE); // I believe that the 2 and 1 are switched here, and this is
+                                      // intentional to be consistent with other calls to gtk_table_new()
+                                      // [that are probably also switched].
+  gtk_widget_show(table);
+  gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, TRUE, 0);
+  gtk_table_set_row_spacings(GTK_TABLE(table), 5);
+  gtk_table_set_col_spacings(GTK_TABLE(table), 5);
+
+  // label
+  label = gtk_label_new(_("Default texture scale:"));
+  gtk_widget_show(label);
+  gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
+  gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
+                   (GtkAttachOptions) (0),
+                   (GtkAttachOptions) (0), 0, 0);
+
+  // scale entry
+  entry = gtk_entry_new();
+  gtk_widget_show(entry);
+  gtk_widget_set_usize(GTK_WIDGET(entry), 60, -2);
+  gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 0, 1,
+                   (GtkAttachOptions) (GTK_FILL),
+                   (GtkAttachOptions) (0), 0, 0);
+  AddDialogData(entry, &m_fDefTextureScale, DLG_ENTRY_FLOAT);
+
+  // Add the page to the notebook
+  gtk_notebook_append_page(GTK_NOTEBOOK(notebook), pageframe, preflabel);
+
   /******** Misc group *********/
-  preflabel = gtk_label_new("Misc");
+  preflabel = gtk_label_new(_("Misc"));
   gtk_widget_show(preflabel);
-  pageframe = gtk_frame_new("Misc");
+  pageframe = gtk_frame_new(_("Misc"));
   gtk_container_set_border_width(GTK_CONTAINER(pageframe), 5);
   gtk_widget_show(pageframe);
   vbox = gtk_vbox_new(FALSE, 5);
@@ -2495,7 +2619,7 @@ void PrefsDlg::BuildDialog ()
   gtk_container_add(GTK_CONTAINER(pageframe), vbox);
 
   // Light drawing
-  check = gtk_check_button_new_with_label ("Light drawing");
+  check = gtk_check_button_new_with_label (_("Light drawing"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &m_bNewLightDraw, DLG_CHECK_BOOL);
@@ -2508,7 +2632,7 @@ void PrefsDlg::BuildDialog ()
   gtk_table_set_row_spacings (GTK_TABLE (table), 5);
   gtk_table_set_col_spacings (GTK_TABLE (table), 5);
 
-  label = gtk_label_new ("Light radiuses:");
+  label = gtk_label_new (_("Light radiuses:"));
   gtk_widget_show (label);
   gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
   gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
@@ -2516,9 +2640,9 @@ void PrefsDlg::BuildDialog ()
                   (GtkAttachOptions) (0), 0, 0);
 
   combo_list = NULL;
-  combo_list = g_list_append (combo_list, (void *)"Disabled");
-  combo_list = g_list_append (combo_list, (void *)"True Q3Map2 Style");
-  combo_list = g_list_append (combo_list, (void *)"Classic Style");
+  combo_list = g_list_append (combo_list, (void *)_("Disabled"));
+  combo_list = g_list_append (combo_list, (void *)_("True Q3Map2 Style"));
+  combo_list = g_list_append (combo_list, (void *)_("Classic Style"));
 
   combo = gtk_combo_new ();
   gtk_combo_set_popdown_strings (GTK_COMBO (combo), combo_list);
@@ -2530,13 +2654,13 @@ void PrefsDlg::BuildDialog ()
   AddDialogData (combo, &m_nLightRadiuses, DLG_COMBO_INT);
 
 #ifdef _WIN32
-  check = gtk_check_button_new_with_label ("Use win32 file associations to open text files instead of builtin editor");
+  check = gtk_check_button_new_with_label (_("Use win32 file associations to open text files instead of builtin editor"));
   gtk_widget_show(check);
   gtk_box_pack_start(GTK_BOX (vbox), check, FALSE, FALSE, 0);
   AddDialogData (check, &g_PrefsDlg.m_bUseWin32Editor, DLG_CHECK_BOOL);
 #else
   // use custom shader editor
-  check = gtk_check_button_new_with_label ("Use Custom Shader Editor");
+  check = gtk_check_button_new_with_label (_("Use Custom Shader Editor"));
   gtk_widget_show(check);
   gtk_box_pack_start(GTK_BOX (vbox), check, FALSE, FALSE, 0);
   gtk_signal_connect( GTK_OBJECT (check), "clicked", GTK_SIGNAL_FUNC(UpdateEditorSensitivity), this);
@@ -2552,7 +2676,7 @@ void PrefsDlg::BuildDialog ()
   gtk_table_set_col_spacings (GTK_TABLE (table), 5);
 
   // label
-  label = gtk_label_new("Custom Editor Command");
+  label = gtk_label_new(_("Custom Editor Command"));
   gtk_widget_show(label);
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
                    (GtkAttachOptions) (0),
@@ -2573,7 +2697,7 @@ void PrefsDlg::BuildDialog ()
   g_object_set_data (G_OBJECT(dialog), "entry_customeditor", entry);
 
   // browse button
-  button = gtk_button_new_with_label ("...");
+  button = gtk_button_new_with_label (_("..."));
   gtk_widget_show (button);
   gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (OnBtnBrowseEditor), this);
   gtk_table_attach (GTK_TABLE (table), button, 2, 3, 0, 1,
@@ -2588,9 +2712,9 @@ void PrefsDlg::BuildDialog ()
 
   /******** BSP Monitoring group *********/
   // this is never displayed if the plugin isn't available
-  preflabel = gtk_label_new("BSP Monitoring");
+  preflabel = gtk_label_new(_("BSP Monitoring"));
   gtk_widget_show(preflabel);
-  pageframe = gtk_frame_new("BSP Monitoring");
+  pageframe = gtk_frame_new(_("BSP Monitoring"));
   gtk_container_set_border_width(GTK_CONTAINER(pageframe), 5);
   gtk_widget_show(pageframe);
   vbox = gtk_vbox_new(FALSE, 5);
@@ -2599,7 +2723,7 @@ void PrefsDlg::BuildDialog ()
   gtk_container_add(GTK_CONTAINER(pageframe), vbox);
 
   // Enable BSP process monitoring
-  check = gtk_check_button_new_with_label ("Enable BSP process monitoring");
+  check = gtk_check_button_new_with_label (_("Enable BSP process monitoring"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   g_object_set_data (G_OBJECT (dialog), "check_monitorbsp", check);
@@ -2607,14 +2731,14 @@ void PrefsDlg::BuildDialog ()
   AddDialogData (check, &g_PrefsDlg.m_bWatchBSP, DLG_CHECK_BOOL);
 
   // Stop on leak
-  check = gtk_check_button_new_with_label ("Stop compilation on leak");
+  check = gtk_check_button_new_with_label (_("Stop compilation on leak"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   g_object_set_data (G_OBJECT (dialog), "check_leakstop", check);
   AddDialogData (check, &g_PrefsDlg.m_bLeakStop, DLG_CHECK_BOOL);
 
   // engine after compile
-  check = gtk_check_button_new_with_label ("Run engine after compile");
+  check = gtk_check_button_new_with_label (_("Run engine after compile"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   g_object_set_data (G_OBJECT (dialog), "check_runengine", check);
@@ -2622,14 +2746,14 @@ void PrefsDlg::BuildDialog ()
   AddDialogData( check, &g_PrefsDlg.m_bRunQuake, DLG_CHECK_BOOL );
 
   // sleep mode when running engine
-  check = gtk_check_button_new_with_label ("Activate sleep mode when running the engine");
+  check = gtk_check_button_new_with_label (_("Activate sleep mode when running the engine"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   g_object_set_data (G_OBJECT (dialog), "check_sleep", check);
   AddDialogData( check, &g_PrefsDlg.m_bDoSleep, DLG_CHECK_BOOL );
 
   // use q3map2's texture projection
-  check = gtk_check_button_new_with_label ("Texturing compatible with q3map2");
+  check = gtk_check_button_new_with_label (_("Texturing compatible with q3map2"));
   gtk_widget_show (check);
   gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
   g_object_set_data (G_OBJECT (dialog), "check_q3map2", check);
@@ -2753,6 +2877,40 @@ void PrefsDlg::UpdateATIHack() {
 }
 #endif
 
+#ifdef NVIDIA_AERO_HACK
+void PrefsDlg::UpdateNvidiaAeroHack() {
+  if (m_bGlNvidiaAeroHack && m_bGlNvidiaAeroHackPrevState == 1) { return; }
+  if ((!m_bGlNvidiaAeroHack) && m_bGlNvidiaAeroHackPrevState == 0) { return; }
+  if ((!m_bGlNvidiaAeroHack) && m_bGlNvidiaAeroHackPrevState < 0) {
+    // The hack state is uninitialized, meaning that this is the first call
+    // to this function.  I prefer not to explicitly enable composition because
+    // the user may have set the application to disable it, and I don't want to
+    // override that.  Leave the state of composition as-is if the hack checkbox
+    // isn't checked.
+    m_bGlNvidiaAeroHackPrevState = 0;
+    return;
+  }
+  HMODULE lib = LoadLibrary("dwmapi.dll");
+  if (lib) {
+    void (WINAPI *qDwmEnableComposition) (bool bEnable) =
+      (void (WINAPI *) (bool bEnable)) GetProcAddress(lib, "DwmEnableComposition");
+    if (qDwmEnableComposition) {
+      if (m_bGlNvidiaAeroHack) {
+        Sys_Printf("Disabling Windows composition\n");
+        qDwmEnableComposition(0);
+        m_bGlNvidiaAeroHackPrevState = 1;
+      }
+      else {
+        Sys_Printf("Enabling Windows composition\n");
+        qDwmEnableComposition(1);
+        m_bGlNvidiaAeroHackPrevState = 0;
+      }
+    }
+    FreeLibrary(lib);
+  }
+}
+#endif
+
 // TTimo: m_strEnginePath has a special status, if not found in registry we need to
 // initiliaze it for sure. It is not totally failsafe but we can use the same
 // code than in q3map, expecting to find some "quake" above us. If not, we prompt
@@ -2855,6 +3013,7 @@ void PrefsDlg::LoadPrefs ()
   m_nShader = m_nLatchedShader;
 
   mLocalPrefs.GetPref(NOCLAMP_KEY,            &m_bNoClamp,                    FALSE);
+  mLocalPrefs.GetPref(SNAP_KEY,               &m_bSnap,                       TRUE);
   mLocalPrefs.GetPref(USERINI_KEY,            &m_strUserPath,                 "");
   mLocalPrefs.GetPref(ROTATION_KEY,           &m_nRotation,                   45);
   mLocalPrefs.GetPref(CHASEMOUSE_KEY,         &m_bChaseMouse,                 TRUE);
@@ -2872,7 +3031,7 @@ void PrefsDlg::LoadPrefs ()
     // Texture subset on by default (HL specific really, because of halflife.wad's size)
     mLocalPrefs.GetPref(TEXTURE_KEY,            &m_bTextureWindow,              TRUE);
   }
-  else if ( ( g_pGameDescription->mGameFile == "q2.game" ) || ( g_pGameDescription->mGameFile == "heretic2.game" ) )
+  else if (g_pGameDescription->quake2)
   {
     // BSP monitoring is implemented in Quake2 and Heretic2 tools
     mLocalPrefs.GetPref(WATCHBSP_KEY,           &m_bWatchBSP,                   TRUE);
@@ -2903,6 +3062,7 @@ void PrefsDlg::LoadPrefs ()
   mLocalPrefs.GetPref(SELECTCURVES_KEY,       &m_bSelectCurves,               TRUE);
   mLocalPrefs.GetPref(SELECTMODELS_KEY,       &m_bSelectModels,               TRUE);
   mLocalPrefs.GetPref(SHADERLISTONLY_KEY,     &m_bTexturesShaderlistOnly,     FALSE);
+  mLocalPrefs.GetPref(DEFAULTTEXURESCALE_KEY, &m_fDefTextureScale,            g_pGameDescription->mTextureDefaultScale);
   mLocalPrefs.GetPref(SUBDIVISIONS_KEY,       &m_nSubdivisions,               SUBDIVISIONS_DEF);
   mLocalPrefs.GetPref(CLIPCAULK_KEY,          &m_bClipCaulk,                  FALSE);
   mLocalPrefs.GetPref(SNAPTTOGRID_KEY,        &m_bSnapTToGrid,                FALSE);
@@ -3031,6 +3191,10 @@ void PrefsDlg::LoadPrefs ()
        mLocalPrefs.GetPref(ATIHACK_KEY, &m_bGlATIHack, FALSE);
 #endif
 
+#ifdef NVIDIA_AERO_HACK
+  mLocalPrefs.GetPref(NVAEROHACK_KEY, &m_bGlNvidiaAeroHack, TRUE);
+#endif
+
   Undo_SetMaxSize(m_nUndoLevels); // set it internally as well / FIXME: why not just have one global value?
 
   UpdateTextureCompression();
@@ -3039,6 +3203,10 @@ void PrefsDlg::LoadPrefs ()
   UpdateATIHack();
 #endif
 
+#ifdef NVIDIA_AERO_HACK
+  UpdateNvidiaAeroHack();
+#endif
+
   if (mLocalPrefs.mbEmpty)
   {
     mLocalPrefs.mbEmpty = false;
@@ -3083,9 +3251,12 @@ void PrefsDlg::PostModal (int code)
     SavePrefs();
     // make sure the logfile is ok
     Sys_LogFile();
-    #ifdef ATIHACK_812
-      UpdateATIHack();
-    #endif
+#ifdef ATIHACK_812
+    UpdateATIHack();
+#endif
+#ifdef NVIDIA_AERO_HACK
+    UpdateNvidiaAeroHack();
+#endif
     if (g_pParentWnd)
       g_pParentWnd->SetGridStatus();
     Sys_UpdateWindows(W_ALL);
@@ -3169,14 +3340,14 @@ void CGameInstall::OnBtnBrowseEngine( GtkWidget *widget, gpointer data ) {
        Sys_Printf( "OnBtnBrowseEngine\n" );
 
        CGameInstall* i = static_cast<CGameInstall*>( data );
-       char *dir = dir_dialog( widget, "Select game directory", NULL );
+       char *dir = dir_dialog( i->m_pWidget, _("Select game directory"), NULL );
 
        i->UpdateData( TRUE );
 
        if ( dir != NULL ) {
                i->m_strEngine = dir;
                i->UpdateData( FALSE );
-               free( dir );
+               g_free( dir );
        }
 }
 
@@ -3193,13 +3364,13 @@ void CGameInstall::BuildDialog() {
        GtkWidget *dlg, *vbox1, *button, *text, *combo, *entry, *hbox;
 
        dlg = m_pWidget;
-       gtk_window_set_title( GTK_WINDOW( dlg ), "Configure games" );
+       gtk_window_set_title( GTK_WINDOW( dlg ), _("Configure games") );
 
        vbox1 = gtk_vbox_new( FALSE, 0 );
        gtk_widget_show( vbox1 );
        gtk_container_add( GTK_CONTAINER( dlg ), vbox1 );
 
-       text = gtk_label_new( "Select the game to configure" );
+       text = gtk_label_new( _("Select the game to configure") );
        gtk_widget_show( text );
        gtk_box_pack_start( GTK_BOX( vbox1 ), text, FALSE, FALSE, 0 );
 
@@ -3212,25 +3383,34 @@ void CGameInstall::BuildDialog() {
        while ( m_availGames[ iGame ] != GAME_NONE ) {
                switch ( m_availGames[ iGame ] ) {
                case GAME_Q2:
-                       gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), "Quake II" );
+                       gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _("Quake II") );
                        break;
                case GAME_Q3:
-                       gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), "Quake III Arena and mods" );
+                       gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _("Quake III Arena and mods") );
                        break;
                case GAME_URT:
-                       gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), "Urban Terror (standalone)" );
+                       gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _("Urban Terror (standalone)") );
                        break;
                case GAME_UFOAI:
-                       gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), "UFO: Alien Invasion" );
+                       gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _("UFO: Alien Invasion") );
                        break;
                case GAME_Q2W:
-                       gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), "Quake2World" );
+                       gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _("Quake2World") );
                        break;
                case GAME_WARSOW:
-                       gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), "Warsow" );
+                       gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _("Warsow") );
                        break;
                case GAME_NEXUIZ:
-                       gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), "Nexuiz" );
+                       gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _("Nexuiz") );
+                       break;
+               case GAME_TREMULOUS:
+                       gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _("Tremulous") );
+                       break;
+               case GAME_JA:
+                       gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _("Jedi Academy and mods") );
+                       break;
+               case GAME_REACTION:
+                       gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _("Reaction Quake 3") );
                        break;
                }
                iGame++;
@@ -3239,7 +3419,7 @@ void CGameInstall::BuildDialog() {
        gtk_signal_connect( GTK_OBJECT( combo ), "changed", G_CALLBACK( OnGameSelectChanged ), this );
        gtk_combo_box_set_active( GTK_COMBO_BOX( combo ), 0 );  // NOTE: will trigger signal
 
-       text = gtk_label_new( "Name:" );
+       text = gtk_label_new( _("Name:") );
        gtk_widget_show( text );
        gtk_box_pack_start( GTK_BOX( vbox1 ), text, FALSE, FALSE, 0 );
 
@@ -3248,7 +3428,7 @@ void CGameInstall::BuildDialog() {
        gtk_box_pack_start( GTK_BOX( vbox1 ), entry, FALSE, FALSE, 0 );
        AddDialogData( entry, &m_strName, DLG_ENTRY_TEXT );
 
-       text = gtk_label_new( "Engine directory:" );
+       text = gtk_label_new( _("Engine directory:") );
        gtk_widget_show( text );
        gtk_box_pack_start( GTK_BOX( vbox1 ), text, FALSE, FALSE, 0 );
 
@@ -3261,14 +3441,14 @@ void CGameInstall::BuildDialog() {
        gtk_box_pack_start( GTK_BOX( hbox ), entry, FALSE, FALSE, 0 );
        AddDialogData( entry, &m_strEngine, DLG_ENTRY_TEXT );
 
-       button = gtk_button_new_with_label ("...");
+       button = gtk_button_new_with_label (_("..."));
        gtk_widget_show( button );
        gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnBtnBrowseEngine ), this );
        gtk_box_pack_start( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
 
        // this gets done in the project stuff atm
 #if 0
-       text = gtk_label_new( "Mod subdirectory:" );
+       text = gtk_label_new( _("Mod subdirectory:") );
        gtk_widget_show( text );
        gtk_box_pack_start( GTK_BOX( vbox1 ), text, FALSE, FALSE, 0 );
 
@@ -3278,12 +3458,12 @@ void CGameInstall::BuildDialog() {
        AddDialogData( entry, &m_strMod, DLG_ENTRY_TEXT );
 #endif
 
-       button = gtk_button_new_with_label( "OK" );
+       button = gtk_button_new_with_label( _("OK") );
        gtk_widget_show( button );
        gtk_box_pack_start( GTK_BOX( vbox1 ), button, FALSE, FALSE, 0 );
        AddModalButton( button, IDOK );
 
-       button = gtk_button_new_with_label( "Cancel" );
+       button = gtk_button_new_with_label( _("Cancel") );
        gtk_widget_show( button );
        gtk_box_pack_start( GTK_BOX( vbox1 ), button, FALSE, FALSE, 0 );
        AddModalButton( button, IDCANCEL );
@@ -3293,6 +3473,9 @@ void CGameInstall::BuildDialog() {
 
 void CGameInstall::Run() {
        ScanGames();
+       if ( m_availGames[0] == GAME_NONE ) {
+               return;
+       }
        if ( DoModal() == IDCANCEL ) {
                Sys_Printf( "game dialog cancelled\n" );
                return;
@@ -3306,16 +3489,16 @@ void CGameInstall::Run() {
        gameFilePath += ".game";
        Sys_Printf( "game file: %s\n", gameFilePath.GetBuffer() );
 
-       FILE *fg = fopen( gameFilePath.GetBuffer(), "w" );
+       FILE * fg = fopen( gameFilePath.GetBuffer(), "w" );
        if ( fg == NULL ) {
                Error( "Failed to open %s for writing\n", gameFilePath.GetBuffer() );
        }
        fprintf( fg, "<?xml version=\"1.0\" encoding=\"iso-8859-1\" standalone=\"yes\"?>\n<game\n" );
        fprintf( fg, "  name=\"%s\"\n", m_strName.GetBuffer() );
-       fprintf( fg, "  enginepath=\"%s\"\n", m_strEngine.GetBuffer() );
+       fprintf( fg, "  "ENGINEPATH_ATTRIBUTE"=\"%s\"\n", m_strEngine.GetBuffer() );
        switch ( m_availGames[ m_nComboSelect ] ) {
        case GAME_Q2: {
-               fprintf( fg, "  gametools=\"%sinstalls/Quake2Pack/game\"\n", g_strAppPath.GetBuffer() );
+               fprintf( fg, "  "TOOLS_ATTRIBUTE"=\"%sinstalls/Quake2Pack/game\"\n", g_strAppPath.GetBuffer() );
                fprintf( fg, "  prefix=\".quake2\"\n" );
                Str source = g_strAppPath.GetBuffer();
                source += "installs/";
@@ -3327,7 +3510,7 @@ void CGameInstall::Run() {
                break;
        }
        case GAME_Q3: {
-               fprintf( fg, "  gametools=\"%sinstalls/Q3Pack/game\"\n", g_strAppPath.GetBuffer() );
+               fprintf( fg, "  "TOOLS_ATTRIBUTE"=\"%sinstalls/Q3Pack/game\"\n", g_strAppPath.GetBuffer() );
                fprintf( fg, "  prefix=\".q3a\"\n" );
                Str source = g_strAppPath.GetBuffer();
                source += "installs/";
@@ -3339,7 +3522,7 @@ void CGameInstall::Run() {
                break;
        }
        case GAME_URT: {
-               fprintf( fg, "  gametools=\"%sinstalls/UrTPack/game\"\n", g_strAppPath.GetBuffer() );
+               fprintf( fg, "  "TOOLS_ATTRIBUTE"=\"%sinstalls/UrTPack/game\"\n", g_strAppPath.GetBuffer() );
                fprintf( fg, "  prefix=\".q3a\"\n" );
                Str source = g_strAppPath.GetBuffer();
                source += "installs/";
@@ -3351,7 +3534,7 @@ void CGameInstall::Run() {
                break;
        }
        case GAME_UFOAI: {
-               fprintf( fg, "  gametools=\"%sinstalls/UFOAIPack/game\"\n", g_strAppPath.GetBuffer() );
+               fprintf( fg, "  "TOOLS_ATTRIBUTE"=\"%sinstalls/UFOAIPack/game\"\n", g_strAppPath.GetBuffer() );
                fprintf( fg, "  prefix=\".ufoai\"\n" );
                Str source = g_strAppPath.GetBuffer();
                source += "installs/";
@@ -3363,7 +3546,7 @@ void CGameInstall::Run() {
                break;
        }
        case GAME_Q2W: {
-               fprintf( fg, "  gametools=\"%sinstalls/Q2WPack/game\"\n", g_strAppPath.GetBuffer() );
+               fprintf( fg, "  "TOOLS_ATTRIBUTE"=\"%sinstalls/Q2WPack/game\"\n", g_strAppPath.GetBuffer() );
                fprintf( fg, "  prefix=\".quake2world\"\n" );
                Str source = g_strAppPath.GetBuffer();
                source += "installs/";
@@ -3375,7 +3558,7 @@ void CGameInstall::Run() {
                break;
        }
        case GAME_WARSOW: {
-               fprintf( fg, "  gametools=\"%sinstalls/WarsowPack/game\"\n", g_strAppPath.GetBuffer() );
+               fprintf( fg, "  "TOOLS_ATTRIBUTE"=\"%sinstalls/WarsowPack/game\"\n", g_strAppPath.GetBuffer() );
                fprintf( fg, "  prefix=\".warsow\"\n" );
                Str source = g_strAppPath.GetBuffer();
                source += "installs/";
@@ -3387,7 +3570,7 @@ void CGameInstall::Run() {
                break;
        }
        case GAME_NEXUIZ: {
-               fprintf( fg, "  gametools=\"%sinstalls/NexuizPack/game\"\n", g_strAppPath.GetBuffer() );
+               fprintf( fg, "  "TOOLS_ATTRIBUTE"=\"%sinstalls/NexuizPack/game\"\n", g_strAppPath.GetBuffer() );
                fprintf( fg, "  prefix=\".nexuiz\"\n" );
                Str source = g_strAppPath.GetBuffer();
                source += "installs/";
@@ -3398,6 +3581,45 @@ void CGameInstall::Run() {
                fprintf( fg, "  basegame=\"data\"\n" );
                break;
        }
+       case GAME_TREMULOUS: {
+               fprintf( fg, "  "TOOLS_ATTRIBUTE"=\"%sinstalls/TremulousPack/game\"\n", g_strAppPath.GetBuffer() );
+               fprintf( fg, "  prefix=\".tremulous\"\n" );
+               Str source = g_strAppPath.GetBuffer();
+               source += "installs/";
+               source += TREMULOUS_PACK;
+               source += "/install/";
+               Str dest = m_strEngine.GetBuffer();
+               CopyTree( source.GetBuffer(), dest.GetBuffer() );
+               fprintf( fg, "  basegame=\"base\"\n" );
+               break;
+       }
+       case GAME_JA: {
+               fprintf( fg, "  "TOOLS_ATTRIBUTE"=\"%sinstalls/JAPack/game\"\n", g_strAppPath.GetBuffer() );
+               fprintf( fg, "  prefix=\".ja\"\n" );
+               Str source = g_strAppPath.GetBuffer();
+               source += "installs/";
+               source += JA_PACK;
+               source += "/install/";
+               Str dest = m_strEngine.GetBuffer();
+               CopyTree( source.GetBuffer(), dest.GetBuffer() );
+               fprintf( fg, "  basegame=\"base\"\n" );
+               break;
+       }
+       case GAME_REACTION: {
+               fprintf( fg, "  "TOOLS_ATTRIBUTE"=\"%sinstalls/"REACTION_PACK"/game\"\n", g_strAppPath.GetBuffer() );
+               fprintf( fg, "  prefix=\".Reaction\"\n" );
+               Str source = g_strAppPath.GetBuffer();
+               source += "installs/";
+               source += REACTION_PACK;
+               source += "/install/";
+               Str dest = m_strEngine.GetBuffer();
+               CopyTree( source.GetBuffer(), dest.GetBuffer() );
+               fprintf( fg, "  basegame=\"Boomstick\"\n" );
+               fprintf( fg, "  default_scale=\"0.5\"\n" ); // Superfluous because the default is already 0.5,
+                                                       // but demonstrates how to set the default texture scale
+                                                       // for a specific game.
+               break;
+       }
        }
        fprintf( fg, "/>\n" );
        fclose( fg );
@@ -3438,6 +3660,17 @@ void CGameInstall::ScanGames() {
                if ( stricmp( dirname, Q2_PACK ) == 0 ) {
                        m_availGames[ iGame++ ] = GAME_Q2;
                }
+               if ( stricmp( dirname, TREMULOUS_PACK ) == 0 ) {
+                       m_availGames[ iGame++ ] = GAME_TREMULOUS;
+               }
+               if ( stricmp( dirname, JA_PACK ) == 0 ) {
+                       m_availGames[ iGame++ ] = GAME_JA;
+               }
+               if ( stricmp( dirname, REACTION_PACK ) == 0 ) {
+                       m_availGames[ iGame++ ] = GAME_REACTION;
+               }
        }
+       Sys_Printf("No installable games found in: %s\n",
+               pakPaths.GetBuffer() );
 }