diff --git a/glade/main-window.glade b/glade/main-window.glade index 65fcf6f..9f39a79 100644 --- a/glade/main-window.glade +++ b/glade/main-window.glade @@ -4,12 +4,12 @@ - 300 - 200 GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False + 800 + 600 True False True @@ -18,6 +18,7 @@ GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -28,6 +29,8 @@ True + GTK_PACK_DIRECTION_LTR + GTK_PACK_DIRECTION_LTR @@ -282,133 +285,140 @@ GTK_CORNER_TOP_LEFT - - 3 + True - False - 0 + GTK_SHADOW_IN - + + 3 True - True - True + False 0 - + + True + True + True + 0 + + + + + + + + True + Schedulables + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + - + True - Schedulables - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + True + True + 0 + + + + + + + + True + Resources + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + - label_item + 0 + True + True + + + + + + True + True + False + 0 + + + + + + + + True + Requests + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True - - 0 - True - True - - - - - - True - True - True - 0 - - - - - - - - True - Resources - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - - - - - - True - True - True - 0 - - - - - - - - True - Requests - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - False - True - @@ -463,9 +473,11 @@ False - Application Name + SGPEMv2 University of Padova, dept. of Pure and Applied Mathematics + An educational simulator for process scheduling policies in a monoprocessor computer. 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. + False Giovanni Giacobbi <ggiacobb@studenti.math.unipd.it> Filippo Paparella <ironpipp@gmail.com> Paolo Santi <psanti@studenti.math.unipd.it> diff --git a/src/main.cc b/src/main.cc index 94c63d2..e818f44 100644 --- a/src/main.cc +++ b/src/main.cc @@ -24,8 +24,6 @@ #include "main.hh" #include "parse_opts.hh" -#include "text_simulation.hh" -#include "io_manager.hh" #include #include @@ -55,17 +53,6 @@ main(int argc, char* argv[]) // Parses options and prepares vector with // 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; } - diff --git a/src/parse_opts.cc b/src/parse_opts.cc index b126583..6b4ed4f 100644 --- a/src/parse_opts.cc +++ b/src/parse_opts.cc @@ -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 #include -#include +#include #include using namespace sgpem; @@ -49,7 +51,7 @@ parse_options(int argc, char** argv) OptionEntry no_gui; OptionEntry policies_dir; OptionEntry modules_dir; - OptionEntry filename; + OptionEntry filename; no_gui.set_short_name('N'); policies_dir.set_short_name('P'); @@ -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 { @@ -126,7 +134,8 @@ parse_options(int argc, char** argv) gui->open_file(*fnames.begin()); main_loop.run(gui->get_initial_window()); delete gui; - } + } + } // ~ try catch(Glib::OptionError e) {