diff --git a/src/canvas.cpp b/src/canvas.cpp --- a/src/canvas.cpp +++ b/src/canvas.cpp @@ -2,12 +2,12 @@ * * This file is part of the Virtual Leaf. * - * The Virtual Leaf is free software: you can redistribute it and/or modify + * VirtualLeaf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * The Virtual Leaf is distributed in the hope that it will be useful, + * VirtualLeaf is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. @@ -84,6 +84,8 @@ static const std::string _module_id("$Id$"); +using namespace std; + // We use a global variable to save memory - all the brushes and pens in // the mesh are shared. @@ -524,8 +526,8 @@ Main::Main(QGraphicsScene& c, Mesh &m, Q view->setItemChecked(fluxes_id, FALSE); cell_walls_id = view->insertItem("Show transporters", this, SLOT(toggleShowWalls())); view->setItemChecked(cell_walls_id, FALSE); - apoplasts_id = view->insertItem("Show apoplasts", this, SLOT(toggleShowApoplasts())); - view->setItemChecked(apoplasts_id, FALSE); + // apoplasts_id = view->insertItem("Show apoplasts", this, SLOT(toggleShowApoplasts())); + // view->setItemChecked(apoplasts_id, FALSE); view->insertSeparator(); only_boundary_id = view->insertItem("Show only leaf &boundary", this, SLOT(toggleLeafBoundary())); view->insertSeparator(); @@ -558,10 +560,11 @@ Main::Main(QGraphicsScene& c, Mesh &m, Q tooltips_id = helpmenu->insertItem("Show Cell&Info", this, SLOT(Refresh())); helpmenu->setItemChecked(tooltips_id, true); helpmenu->insertSeparator(); - helpmenu->insertItem("&About", this, SLOT(about()) ); //, Key_F1); - helpmenu->insertSeparator(); + //helpmenu->insertSeparator(); helpmenu->insertItem("&LICENSE", this, SLOT(gpl()) ); - menu->insertItem("&Help",helpmenu); + helpmenu->insertItem("About", this, SLOT(about()) ); //, Key_F1); + + menu->insertItem("&Help",helpmenu); statusBar(); setCentralWidget(editor); printer = 0; @@ -929,8 +932,8 @@ void Main::clear() void Main::about() { static QMessageBox* about = new QMessageBox - ( "Virtual Leaf V1.0", - "
"
"An Open Source framework for cell-based modeling of plant tissue growth and development
"
"(c) 2005-2008, Roeland Merks et al.
"
@@ -938,7 +941,7 @@ void Main::about()
"Ghent, Belgium
"
"(c) 2008-2010, Roeland Merks et al.
"
" Centrum Wiskunde & Informatica and Netherlands Consortium for Systems Biology, Amsterdam, Netherlands
"
-"
The Virtual Leaf is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
"
+"
VirtualLeaf is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
"
"
If you use this code for your projects, please cite our paper:"
"
Merks, Guravage, Inze, and Beemster. An Open Source framework for cell-based modeling of plant tissue growth and development. Plant Physiology, submitted.
.
"
"
Please share your model plugins and extensions at http://virtualleaf.googlecode.com.",
@@ -954,8 +957,17 @@ void Main::gpl()
QMessageBox::Information, 1, 0, 0, this, 0, FALSE );
QDir docDir(QApplication::applicationDirPath());
- docDir.cd("../doc");
+ docDir.cd("../doc"); // Where Linux expects gpl3.txt
QString path = docDir.filePath("gpl3.txt");
+ if (!docDir.exists("gpl3.txt")){
+ docDir = QApplication::applicationDirPath();
+ docDir.cd("doc"); // Where Windows expects gpl3.txt
+ path = docDir.filePath("gpl3.txt");
+ }
+
+ // At this point path points either to the linux variant, which
+ // exists, or the windows variant, which may exist. Testing the
+ // ifstream object will determine whether we've found gpl3.txt.
std::ifstream file(path.toStdString().c_str());
std::string str;
@@ -1325,7 +1337,7 @@ void Main::XMLReadSettings(xmlNode *sett
view->setItemChecked(hide_cells_id, hidecellsp);
options->setItemChecked(dyn_cells_id, dynamicscellsp);
view->setItemChecked( cell_walls_id, showwallsp);
- view->setItemChecked( apoplasts_id, showapoplastsp);
+ // view->setItemChecked( apoplasts_id, showapoplastsp);
editor->setTransform(viewport);
}
@@ -1345,7 +1357,7 @@ xmlNode *Main::XMLSettingsTree(void)
showfluxesp = view->isItemChecked(fluxes_id);
dynamicscellsp = options->isItemChecked(dyn_cells_id);
showwallsp = view->isItemChecked( cell_walls_id);
- showapoplastsp = view->isItemChecked( apoplasts_id);
+ //showapoplastsp = view->isItemChecked( apoplasts_id);
hidecellsp = view->isItemChecked( hide_cells_id);
xmlNode *settings = MainBase::XMLSettingsTree();