- 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:
parent
3612d20ae0
commit
db34232e72
|
@ -4,12 +4,12 @@
|
|||
<glade-interface>
|
||||
|
||||
<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="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</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="destroy_with_parent">False</property>
|
||||
<property name="decorated">True</property>
|
||||
|
@ -18,6 +18,7 @@
|
|||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<property name="focus_on_map">True</property>
|
||||
<property name="urgency_hint">False</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="MainBox">
|
||||
|
@ -28,6 +29,8 @@
|
|||
<child>
|
||||
<widget class="GtkMenuBar" id="MenuBar">
|
||||
<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>
|
||||
<widget class="GtkMenuItem" id="MenuItem.File">
|
||||
|
@ -281,6 +284,11 @@
|
|||
<property name="shadow_type">GTK_SHADOW_NONE</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>
|
||||
<widget class="GtkVBox" id="ExpandersBox">
|
||||
<property name="border_width">3</property>
|
||||
|
@ -374,7 +382,7 @@
|
|||
<widget class="GtkExpander" id="RequestsExpander">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="expanded">True</property>
|
||||
<property name="expanded">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
|
@ -413,6 +421,8 @@
|
|||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="shrink">True</property>
|
||||
<property name="resize">False</property>
|
||||
|
@ -463,9 +473,11 @@
|
|||
|
||||
<widget class="GtkAboutDialog" id="AboutDialog">
|
||||
<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="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="wrap_license">False</property>
|
||||
<property name="authors">Giovanni Giacobbi <ggiacobb@studenti.math.unipd.it>
|
||||
Filippo Paparella <ironpipp@gmail.com>
|
||||
Paolo Santi <psanti@studenti.math.unipd.it>
|
||||
|
|
13
src/main.cc
13
src/main.cc
|
@ -24,8 +24,6 @@
|
|||
#include "main.hh"
|
||||
|
||||
#include "parse_opts.hh"
|
||||
#include "text_simulation.hh"
|
||||
#include "io_manager.hh"
|
||||
|
||||
#include <glibmm/module.h>
|
||||
#include <glibmm/thread.h>
|
||||
|
@ -56,16 +54,5 @@ main(int argc, char* argv[])
|
|||
// filenames of documents to be opened
|
||||
parse_options(argc, argv);
|
||||
|
||||
TextSimulation sim;
|
||||
|
||||
while(1)
|
||||
{
|
||||
string str;
|
||||
getline(cin, str);
|
||||
|
||||
TextSimulation::parse_command(sim, str);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,13 +23,15 @@
|
|||
|
||||
#include "backend/global_preferences.hh"
|
||||
#include "backend/plugin_manager.hh"
|
||||
#include "text_simulation.hh"
|
||||
#include "io_manager.hh"
|
||||
#include "gui_builder.hh"
|
||||
#include "parse_opts.hh"
|
||||
|
||||
#include <glibmm/optioncontext.h>
|
||||
#include <gtkmm/main.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
using namespace sgpem;
|
||||
|
@ -114,10 +116,16 @@ parse_options(int argc, char** argv)
|
|||
{
|
||||
// We don't return to main, instead we
|
||||
// initialize the command line version
|
||||
// of sgpemv2 (?)
|
||||
throw Glib::OptionError(Glib::OptionError::FAILED, _("The `No-GUI' option isn't active yet."));
|
||||
// of sgpemv2
|
||||
TextSimulation sim;
|
||||
|
||||
// FIXME : to be written!
|
||||
while(1)
|
||||
{
|
||||
std::string str;
|
||||
getline(std::cin, str);
|
||||
|
||||
TextSimulation::parse_command(sim, str);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -127,6 +135,7 @@ parse_options(int argc, char** argv)
|
|||
main_loop.run(gui->get_initial_window());
|
||||
delete gui;
|
||||
}
|
||||
|
||||
} // ~ try
|
||||
catch(Glib::OptionError e)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue