]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/mainframe.cpp
ToggleGridSnap command (beware of it)
[xonotic/netradiant.git] / radiant / mainframe.cpp
index 6c449190aa7d8e0f429741fead0e13fc674ee2e2..a441e03c39a9e9b38baec34522b8f8167aa83ffa 100644 (file)
@@ -718,7 +718,7 @@ void PasteToCamera()
   // Work out the delta
   Vector3 mid;
   Select_GetMid(mid);
-  Vector3 delta = vector3_subtracted(vector3_snapped(Camera_getOrigin(camwnd), GetGridSize()), mid);
+  Vector3 delta = vector3_subtracted(vector3_snapped(Camera_getOrigin(camwnd), GetSnapGridSize()), mid);
 
   // Move to camera
   GlobalSelectionSystem().translateSelected(delta);
@@ -976,11 +976,13 @@ void OpenUpdateURL()
 {
   // build the URL
   StringOutputStream URL(256);
-  URL << "http://www.qeradiant.com/index.php?data=dlupdate&query_dlup=1";
+  URL << "http://www.icculus.org/netradiant/?cmd=update&data=dlupdate&query_dlup=1";
 #ifdef WIN32
   URL << "&OS_dlup=1";
-#else
+#elif defined(__APPLE__)
   URL << "&OS_dlup=2";
+#else
+  URL << "&OS_dlup=3";
 #endif
   URL << "&Version_dlup=" RADIANT_VERSION;
   g_GamesDialog.AddPacksURL(URL);
@@ -998,7 +1000,7 @@ void OpenHelpURL()
 
 void OpenBugReportURL()
 {
-  OpenURL("http://www.qeradiant.com/?data=bugreport");
+  OpenURL("http://www.icculus.org/netradiant/?cmd=bugs");
 }
 
 
@@ -3286,7 +3288,7 @@ void MainFrame::SetGridStatus()
 {
   StringOutputStream status(64);
   const char* lock = (GridStatus_getTextureLockEnabled()) ? "ON" : "OFF";
-  status << "G:" << GridStatus_getGridSize()
+  status << (GetSnapGridSize() > 0 ? "G:" : "g:") << GridStatus_getGridSize()
     << "  R:" << GridStatus_getRotateIncrement()
     << "  C:" << GridStatus_getFarClipDistance()
     << "  L:" << lock;
@@ -3303,7 +3305,7 @@ void GridStatus_onTextureLockEnabledChanged()
 
 namespace
 {
-  GLFont g_font(0, 0);
+  GLFont g_font(0, 0, 0, 0);
 }
 
 void GlobalGL_sharedContextCreated()
@@ -3321,15 +3323,21 @@ void GlobalGL_sharedContextCreated()
   GlobalShaderCache().realise();
   Textures_Realise();
 
-#if defined(WIN32)
+#ifdef WIN32
+  /* win32 is dodgy here, just use courier new then */
   g_font = glfont_create("courier new 8");
-#elif defined(__linux__)
-  g_font = glfont_create("fixed 8");
 #else
-  g_font = glfont_create("courier 8");
+  /* use default font here (Sans 10 is gtk default) */
+  GtkSettings *settings = gtk_settings_get_default();
+  gchar *fontname;
+  g_object_get(settings, "gtk-font-name", &fontname, NULL);
+  g_font = glfont_create(fontname);
 #endif
+
   GlobalOpenGL().m_font = g_font.getDisplayList();
   GlobalOpenGL().m_fontHeight = g_font.getPixelHeight();
+  GlobalOpenGL().m_fontAscent = g_font.getPixelAscent();
+  GlobalOpenGL().m_fontDescent = g_font.getPixelDescent();
 }
 
 void GlobalGL_sharedContextDestroyed()