Again, portability fixes
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1159 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
93359507ea
commit
503634d7c5
|
@ -23,6 +23,8 @@
|
|||
#include <sgpemv2/string_utils.hh>
|
||||
#include <sgpemv2/history.hh>
|
||||
#include <sgpemv2/resource.hh>
|
||||
#include <sgpemv2/process.hh>
|
||||
#include <sgpemv2/thread.hh>
|
||||
|
||||
using namespace sgpem;
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ AddRequestDialog::AddRequestDialog(BaseObjectType* cobject, const RefPtr<Xml>& g
|
|||
}
|
||||
|
||||
Request*
|
||||
AddRequestDialog::run_add(Thread& owner)
|
||||
AddRequestDialog::run_add(sgpem::Thread& owner)
|
||||
{
|
||||
update_combo();
|
||||
|
||||
|
|
|
@ -22,6 +22,10 @@
|
|||
|
||||
#include <cmath>
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
#endif
|
||||
|
||||
using namespace sgpem;
|
||||
|
||||
|
||||
|
|
|
@ -301,7 +301,7 @@ PreferencesEditor::on_add_plugins_dir()
|
|||
{
|
||||
// I must get a string
|
||||
Glib::ustring path;
|
||||
Gtk::FileChooserDialog* ask_path = new Gtk::FileChooserDialog::FileChooserDialog(
|
||||
Gtk::FileChooserDialog* ask_path = new Gtk::FileChooserDialog(
|
||||
_("Select a directory to add"),
|
||||
Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER, path);
|
||||
ask_path->add_button("gtk-cancel", Gtk::RESPONSE_CANCEL);
|
||||
|
@ -351,7 +351,7 @@ PreferencesEditor::on_add_policies_dir()
|
|||
{
|
||||
// I must get a string
|
||||
Glib::ustring path;
|
||||
Gtk::FileChooserDialog* ask_path = new Gtk::FileChooserDialog::FileChooserDialog(
|
||||
Gtk::FileChooserDialog* ask_path = new Gtk::FileChooserDialog(
|
||||
_("Select a directory to add"),
|
||||
Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER, path);
|
||||
ask_path->add_button("gtk-cancel", Gtk::RESPONSE_CANCEL);
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace sgpem
|
|||
|
||||
public:
|
||||
|
||||
PreferencesEditor(const std::string& gladefile = GLADEDIR "/configure-dialog.glade");
|
||||
explicit PreferencesEditor(const std::string& gladefile = GLADEDIR "/configure-dialog.glade");
|
||||
|
||||
|
||||
void
|
||||
|
|
|
@ -46,8 +46,13 @@
|
|||
using namespace sgpem;
|
||||
using namespace std;
|
||||
|
||||
#ifndef M_SQRT1_2
|
||||
#define M_SQRT1_2 0.70710678118654752440
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
#endif
|
||||
|
||||
|
||||
HoltNode::HoltNode(Vec2 pt)
|
||||
|
|
18
src/main.cc
18
src/main.cc
|
@ -42,11 +42,17 @@ main(int argc, char* argv[])
|
|||
using namespace std;
|
||||
using Glib::ustring;
|
||||
|
||||
#ifndef _MSC_VER
|
||||
// Set up gettext support
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
#endif
|
||||
|
||||
#ifndef NDEBUG
|
||||
try
|
||||
{
|
||||
#endif
|
||||
// Set up Glib thread support
|
||||
Glib::thread_init();
|
||||
|
||||
|
@ -54,5 +60,17 @@ main(int argc, char* argv[])
|
|||
// filenames of documents to be opened
|
||||
parse_options(argc, argv);
|
||||
|
||||
#ifndef NDEBUG
|
||||
}
|
||||
catch(const std::exception& exp)
|
||||
{
|
||||
std::cerr << exp.what() << std::endl;
|
||||
}
|
||||
catch(const Glib::Exception& gexp)
|
||||
{
|
||||
std::cerr << gexp.what() << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ TabularSimulationStatisticsWidget::update(const History& changed_history)
|
|||
int num_procs=0, num_threads=0;
|
||||
vector<Process*> procs = Simulation::get_instance().get_history().get_environment_at(0).get_processes();
|
||||
num_procs = procs.size();
|
||||
for (uint i =0; i < procs.size(); i++)
|
||||
for (unsigned int i =0; i < procs.size(); i++)
|
||||
num_threads += procs[i]->get_threads().size();
|
||||
|
||||
if (num_procs == 0)
|
||||
|
|
Loading…
Reference in New Issue