From 50cbdd3aca27da81d5ed6073fa3a83488bbee48a Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sun, 31 Jan 2016 18:52:28 +0000
Subject: [PATCH] cleanup

---
 Common/GmshMessage.cpp    |  2 +-
 Fltk/visibilityWindow.cpp | 40 ---------------------------------------
 tutorial/t1.geo           | 12 ++++++------
 tutorial/t2.geo           |  2 +-
 4 files changed, 8 insertions(+), 48 deletions(-)

diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp
index 7b51e85ac3..f8a0b6d6dc 100644
--- a/Common/GmshMessage.cpp
+++ b/Common/GmshMessage.cpp
@@ -1272,7 +1272,7 @@ void Msg::ImportPhysicalsAsOnelabRegions()
           name = std::string("Physical") +
             ((dim == 3) ? "Volume" : (dim == 2) ? "Surface" :
              (dim == 1) ? "Line" : "Point") + num.str();
-        name.insert(0, "Gmsh parameters/Physical groups/");
+        name.insert(0, "Gmsh/Physical groups/");
         onelab::region p(name, num.str());
         p.setDimension(dim);
         p.setReadOnly(true);
diff --git a/Fltk/visibilityWindow.cpp b/Fltk/visibilityWindow.cpp
index 3b1903fca3..334dad2a64 100644
--- a/Fltk/visibilityWindow.cpp
+++ b/Fltk/visibilityWindow.cpp
@@ -325,14 +325,6 @@ static void _rebuild_list_browser()
     if(VisibilityList::instance()->getVisibility(i))
       FlGui::instance()->visibility->browser->select(i + 1);
   }
-
-#if 0
-  // activate/deactivate delete button
-  if(type == VisibilityList::PhysicalEntities)
-    FlGui::instance()->visibility->push[0]->activate();
-  else
-    FlGui::instance()->visibility->push[0]->deactivate();
-#endif
 }
 
 static void visibility_browser_apply_cb(Fl_Widget *w, void *data)
@@ -362,31 +354,6 @@ static void visibility_browser_apply_cb(Fl_Widget *w, void *data)
   }
 }
 
-#if 0
-static void visibility_delete_cb(Fl_Widget *w, void *data)
-{
-  bool all = true;
-  for(int i = 0; i < VisibilityList::instance()->getNumEntities(); i++){
-    if(!FlGui::instance()->visibility->browser->selected(i + 1)){
-      all = false;
-      break;
-    }
-  }
-  if(all){
-    GModel::current()->deletePhysicalGroups();
-  }
-  else{
-    for(int i = 0; i < VisibilityList::instance()->getNumEntities(); i++){
-      if(FlGui::instance()->visibility->browser->selected(i + 1)){
-        Vis *v = VisibilityList::instance()->getEntity(i);
-        GModel::current()->deletePhysicalGroup(v->getDim(), v->getTag());
-      }
-    }
-  }
-  visibility_cb(NULL, (void*)"redraw_only");
-}
-#endif
-
 static void visibility_sort_cb(Fl_Widget *w, void *data)
 {
   const char *str = (const char*)data;
@@ -1238,13 +1205,6 @@ visibilityWindow::visibilityWindow(int deltaFontSize)
     browser_type->menu(browser_type_table);
     browser_type->value(2); // physicals
 
-    // "Delete" is out of place in a Visibility window - it's a destructive operation!
-#if 0
-    push[0] = new Fl_Button
-      (width - 2 * CC - 3 * WB, height - 2 * BH - 3 * WB, CC, BH, "Delete");
-    push[0]->callback(visibility_delete_cb);
-#endif
-
     Fl_Return_Button *b1 = new Fl_Return_Button
       (width - 1 * CC - 2 * WB, height - 2 * BH - 3 * WB, CC, BH, "Apply");
     b1->callback(visibility_browser_apply_cb);
diff --git a/tutorial/t1.geo b/tutorial/t1.geo
index ce12fd846b..bbebfbfc9a 100644
--- a/tutorial/t1.geo
+++ b/tutorial/t1.geo
@@ -69,18 +69,18 @@ Physical Point(1) = {1,2} ;
 
 MY_LINE = 2;
 Physical Line(MY_LINE) = {1,2} ;
-Physical Line("My second line (auto physical id)") = {3} ;
+Physical Line("My second line (automatic physical id)") = {3} ;
 Physical Line("My third line (physical id 5)", 5) = {4} ;
 Physical Surface("My surface") = {6} ;
 
 // All the line elements created during the meshing of lines 1 and 2 will be
 // saved in the output mesh file with the physical id 2. The elements from line
 // 3 will be saved in the output mesh file with an automatic physical id,
-// associated with the label "My second line (auto physical id)". The elements
-// from line 4 will be saved with physical id 5, associated with the label "My
-// third line (physical id 5)". And finally, all the triangular elements
-// resulting from the discretization of surface 6 will be given an automatic
-// physical id associated with the label "My surface").
+// associated with the label "My second line (automatic physical id)". The
+// elements from line 4 will be saved with physical id 5, associated with the
+// label "My third line (physical id 5)". And finally, all the triangular
+// elements resulting from the discretization of surface 6 will be given an
+// automatic physical id associated with the label "My surface").
 
 // Note that if no physical entities are defined, then all the elements in the
 // mesh will be saved "as is", with their default orientation.
diff --git a/tutorial/t2.geo b/tutorial/t2.geo
index eff5b22fee..eea1180c79 100644
--- a/tutorial/t2.geo
+++ b/tutorial/t2.geo
@@ -104,4 +104,4 @@ Characteristic Length {103, 105, 109, 102, 28, 24, 6, 5} = lc * 3;
 // To save all the tetrahedra discretizing the volumes 129 and 130 with a common
 // region number, we finally define a physical volume:
 
-Physical Volume (1) = {129,130};
+Physical Volume ("The volume", 1) = {129,130};
-- 
GitLab