- Textual simulation is now brought up only if requested

by the -N switch given at the cmdline


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@754 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-07-12 08:31:25 +00:00
parent 3612d20ae0
commit db34232e72
3 changed files with 142 additions and 134 deletions

View File

@ -4,12 +4,12 @@
<glade-interface> <glade-interface>
<widget class="GtkWindow" id="MainWindow"> <widget class="GtkWindow" id="MainWindow">
<property name="width_request">300</property>
<property name="height_request">200</property>
<property name="title" translatable="yes"></property> <property name="title" translatable="yes"></property>
<property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property> <property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property> <property name="modal">False</property>
<property name="default_width">800</property>
<property name="default_height">600</property>
<property name="resizable">True</property> <property name="resizable">True</property>
<property name="destroy_with_parent">False</property> <property name="destroy_with_parent">False</property>
<property name="decorated">True</property> <property name="decorated">True</property>
@ -18,6 +18,7 @@
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property> <property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>
<child> <child>
<widget class="GtkVBox" id="MainBox"> <widget class="GtkVBox" id="MainBox">
@ -28,6 +29,8 @@
<child> <child>
<widget class="GtkMenuBar" id="MenuBar"> <widget class="GtkMenuBar" id="MenuBar">
<property name="visible">True</property> <property name="visible">True</property>
<property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
<property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
<child> <child>
<widget class="GtkMenuItem" id="MenuItem.File"> <widget class="GtkMenuItem" id="MenuItem.File">
@ -281,6 +284,11 @@
<property name="shadow_type">GTK_SHADOW_NONE</property> <property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property> <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<widget class="GtkViewport" id="ExpandersViewport">
<property name="visible">True</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<child> <child>
<widget class="GtkVBox" id="ExpandersBox"> <widget class="GtkVBox" id="ExpandersBox">
<property name="border_width">3</property> <property name="border_width">3</property>
@ -374,7 +382,7 @@
<widget class="GtkExpander" id="RequestsExpander"> <widget class="GtkExpander" id="RequestsExpander">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="expanded">True</property> <property name="expanded">False</property>
<property name="spacing">0</property> <property name="spacing">0</property>
<child> <child>
@ -413,6 +421,8 @@
</widget> </widget>
</child> </child>
</widget> </widget>
</child>
</widget>
<packing> <packing>
<property name="shrink">True</property> <property name="shrink">True</property>
<property name="resize">False</property> <property name="resize">False</property>
@ -463,9 +473,11 @@
<widget class="GtkAboutDialog" id="AboutDialog"> <widget class="GtkAboutDialog" id="AboutDialog">
<property name="destroy_with_parent">False</property> <property name="destroy_with_parent">False</property>
<property name="name" translatable="yes">Application Name</property> <property name="name" translatable="yes">SGPEMv2</property>
<property name="copyright">University of Padova, dept. of Pure and Applied Mathematics</property> <property name="copyright">University of Padova, dept. of Pure and Applied Mathematics</property>
<property name="comments" translatable="yes">An educational simulator for process scheduling policies in a monoprocessor computer.</property>
<property name="license">SGPEMv2 comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under the terms of the GNU General Public License; for details see file COPYING contained in the source package.</property> <property name="license">SGPEMv2 comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under the terms of the GNU General Public License; for details see file COPYING contained in the source package.</property>
<property name="wrap_license">False</property>
<property name="authors">Giovanni Giacobbi &lt;ggiacobb@studenti.math.unipd.it&gt; <property name="authors">Giovanni Giacobbi &lt;ggiacobb@studenti.math.unipd.it&gt;
Filippo Paparella &lt;ironpipp@gmail.com&gt; Filippo Paparella &lt;ironpipp@gmail.com&gt;
Paolo Santi &lt;psanti@studenti.math.unipd.it&gt; Paolo Santi &lt;psanti@studenti.math.unipd.it&gt;

View File

@ -24,8 +24,6 @@
#include "main.hh" #include "main.hh"
#include "parse_opts.hh" #include "parse_opts.hh"
#include "text_simulation.hh"
#include "io_manager.hh"
#include <glibmm/module.h> #include <glibmm/module.h>
#include <glibmm/thread.h> #include <glibmm/thread.h>
@ -56,16 +54,5 @@ main(int argc, char* argv[])
// filenames of documents to be opened // filenames of documents to be opened
parse_options(argc, argv); parse_options(argc, argv);
TextSimulation sim;
while(1)
{
string str;
getline(cin, str);
TextSimulation::parse_command(sim, str);
}
return 0; return 0;
} }

View File

@ -23,13 +23,15 @@
#include "backend/global_preferences.hh" #include "backend/global_preferences.hh"
#include "backend/plugin_manager.hh" #include "backend/plugin_manager.hh"
#include "text_simulation.hh"
#include "io_manager.hh"
#include "gui_builder.hh" #include "gui_builder.hh"
#include "parse_opts.hh" #include "parse_opts.hh"
#include <glibmm/optioncontext.h> #include <glibmm/optioncontext.h>
#include <gtkmm/main.h> #include <gtkmm/main.h>
#include <cstdlib> #include <string>
#include <iostream> #include <iostream>
using namespace sgpem; using namespace sgpem;
@ -114,10 +116,16 @@ parse_options(int argc, char** argv)
{ {
// We don't return to main, instead we // We don't return to main, instead we
// initialize the command line version // initialize the command line version
// of sgpemv2 (?) // of sgpemv2
throw Glib::OptionError(Glib::OptionError::FAILED, _("The `No-GUI' option isn't active yet.")); TextSimulation sim;
// FIXME : to be written! while(1)
{
std::string str;
getline(std::cin, str);
TextSimulation::parse_command(sim, str);
}
} }
else else
{ {
@ -127,6 +135,7 @@ parse_options(int argc, char** argv)
main_loop.run(gui->get_initial_window()); main_loop.run(gui->get_initial_window());
delete gui; delete gui;
} }
} // ~ try } // ~ try
catch(Glib::OptionError e) catch(Glib::OptionError e)
{ {