]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/preferences.cpp
* reactivated WXY_Print function to generate screenshots from the xy window
[xonotic/netradiant.git] / radiant / preferences.cpp
index 9911b7480b4c65d0b7181ed0a66b300da8ef6468..09d6b0f29bca2ebb25d25388dc12efb94a714c8f 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>
@@ -282,7 +283,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 +521,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)
   {
@@ -758,6 +758,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)
   {
@@ -1360,7 +1374,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");
@@ -1759,7 +1772,6 @@ void PrefsDlg::BuildDialog ()
 
 #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);
@@ -2445,7 +2457,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 ("...");
@@ -3233,6 +3244,9 @@ void CGameInstall::BuildDialog() {
                case GAME_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;
                }
                iGame++;
        }
@@ -3399,6 +3413,18 @@ void CGameInstall::Run() {
                fprintf( fg, "  basegame=\"data\"\n" );
                break;
        }
+       case GAME_TREMULOUS: {
+               fprintf( fg, "  gametools=\"%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;
+       }
        }
        fprintf( fg, "/>\n" );
        fclose( fg );
@@ -3439,6 +3465,9 @@ 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;
+               }
        }
 }