]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/mainframe.cpp
kill some broken URLs
[xonotic/netradiant.git] / radiant / mainframe.cpp
index d97964085ee75c0f40c5a4fe13aa178119f443e7..dd3a17b9c8f1fa10b0cea6a9de8fa942459833b1 100644 (file)
@@ -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");
 }
 
 
@@ -1186,7 +1188,9 @@ void SelectFaceMode()
 
 class CloneSelected : public scene::Graph::Walker
 {
+  bool doMakeUnique;
 public:
+  CloneSelected(bool d): doMakeUnique(d) { }
   bool pre(const scene::Path& path, scene::Instance& instance) const
   {
     if(path.size() == 1)
@@ -1216,16 +1220,17 @@ public:
         && selectable->isSelected())
       {
         NodeSmartReference clone(Node_Clone(path.top()));
-        Map_gatherNamespaced(clone);
+               if(doMakeUnique)
+                       Map_gatherNamespaced(clone);
         Node_getTraversable(path.parent().get())->insert(clone);
       }
     }
   }
 };
 
-void Scene_Clone_Selected(scene::Graph& graph)
+void Scene_Clone_Selected(scene::Graph& graph, bool doMakeUnique)
 {
-  graph.traverse(CloneSelected());
+  graph.traverse(CloneSelected(doMakeUnique));
 
   Map_mergeClonedNames();
 }
@@ -1297,7 +1302,20 @@ void Selection_Clone()
   {
     UndoableCommand undo("cloneSelected");
 
-    Scene_Clone_Selected(GlobalSceneGraph());
+    Scene_Clone_Selected(GlobalSceneGraph(), false);
+
+    //NudgeSelection(eNudgeRight, GetGridSize(), GlobalXYWnd_getCurrentViewType());
+    //NudgeSelection(eNudgeDown, GetGridSize(), GlobalXYWnd_getCurrentViewType());
+  }
+}
+
+void Selection_Clone_MakeUnique()
+{
+  if(GlobalSelectionSystem().Mode() == SelectionSystem::ePrimitive)
+  {
+    UndoableCommand undo("cloneSelectedMakeUnique");
+
+    Scene_Clone_Selected(GlobalSceneGraph(), true);
 
     //NudgeSelection(eNudgeRight, GetGridSize(), GlobalXYWnd_getCurrentViewType());
     //NudgeSelection(eNudgeDown, GetGridSize(), GlobalXYWnd_getCurrentViewType());
@@ -1978,6 +1996,7 @@ GtkMenuItem* create_edit_menu()
   create_menu_item_with_mnemonic(menu, "P_aste To Camera", "PasteToCamera");
   menu_separator(menu);
   create_menu_item_with_mnemonic(menu, "_Duplicate", "CloneSelection");
+  create_menu_item_with_mnemonic(menu, "Duplicate, make uni_que", "CloneSelectionAndMakeUnique");
   create_menu_item_with_mnemonic(menu, "D_elete", "DeleteSelection");
   menu_separator(menu);
   create_menu_item_with_mnemonic(menu, "Pa_rent", "ParentSelection");
@@ -3304,11 +3323,12 @@ void GlobalGL_sharedContextCreated()
   GlobalShaderCache().realise();
   Textures_Realise();
 
-#ifdef __linux__
-  g_font = glfont_create("fixed 8");
-#else
-  g_font = glfont_create("courier 8");
-#endif
+  /* 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);
+
   GlobalOpenGL().m_font = g_font.getDisplayList();
   GlobalOpenGL().m_fontHeight = g_font.getPixelHeight();
 }
@@ -3391,6 +3411,7 @@ void MainFrame_Construct()
   GlobalCommands_insert("Paste", FreeCaller<Paste>(), Accelerator('V', (GdkModifierType)GDK_CONTROL_MASK));
   GlobalCommands_insert("PasteToCamera", FreeCaller<PasteToCamera>(), Accelerator('V', (GdkModifierType)GDK_MOD1_MASK));
   GlobalCommands_insert("CloneSelection", FreeCaller<Selection_Clone>(), Accelerator(GDK_space));
+  GlobalCommands_insert("CloneSelectionAndMakeUnique", FreeCaller<Selection_Clone_MakeUnique>(), Accelerator(GDK_space, (GdkModifierType)GDK_SHIFT_MASK));
   GlobalCommands_insert("DeleteSelection", FreeCaller<deleteSelection>(), Accelerator(GDK_BackSpace));
   GlobalCommands_insert("ParentSelection", FreeCaller<Scene_parentSelected>());
   GlobalCommands_insert("UnSelectSelection", FreeCaller<Selection_Deselect>(), Accelerator(GDK_Escape));