- Removed from GUI and textual interface questions regarding preemptability and availability of resources

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@937 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
elvez 2006-08-24 22:10:31 +00:00
parent dc09e6918c
commit 50929d9a94
10 changed files with 4 additions and 134 deletions

View File

@ -69,89 +69,12 @@
<widget class="GtkTable" id="MainTable"> <widget class="GtkTable" id="MainTable">
<property name="border_width">6</property> <property name="border_width">6</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="n_rows">4</property> <property name="n_rows">2</property>
<property name="n_columns">2</property> <property name="n_columns">2</property>
<property name="homogeneous">False</property> <property name="homogeneous">False</property>
<property name="row_spacing">11</property> <property name="row_spacing">11</property>
<property name="column_spacing">9</property> <property name="column_spacing">9</property>
<child>
<widget class="GtkLabel" id="Preemptable.Label">
<property name="visible">True</property>
<property name="label" translatable="yes">Pre-emptable</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="Availability.Spin">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="climb_rate">1</property>
<property name="digits">0</property>
<property name="numeric">True</property>
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">False</property>
<property name="adjustment">0 0 inf 1 0 0</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="Availability.Label">
<property name="visible">True</property>
<property name="label" translatable="yes">Availability</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child> <child>
<widget class="GtkSpinButton" id="Places.Spin"> <widget class="GtkSpinButton" id="Places.Spin">
<property name="visible">True</property> <property name="visible">True</property>
@ -250,30 +173,6 @@
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
</child> </child>
<child>
<widget class="GtkCheckButton" id="Preemptable.Check">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
</widget> </widget>
<packing> <packing>
<property name="padding">0</property> <property name="padding">0</property>

View File

@ -161,13 +161,10 @@ ResourcesWidget::_on_add_resource()
_add_resource_dialog_glade->get_widget("Name.Entry", name_entry); _add_resource_dialog_glade->get_widget("Name.Entry", name_entry);
_add_resource_dialog_glade->get_widget("Places.Spin", places_spin); _add_resource_dialog_glade->get_widget("Places.Spin", places_spin);
_add_resource_dialog_glade->get_widget("Availability.Spin", availability_spin);
_add_resource_dialog_glade->get_widget("Preemptable.Check", preemptable_check);
Simulation::get_instance().get_history().add_resource(name_entry->get_text(), Simulation::get_instance().get_history().add_resource(name_entry->get_text(),
preemptable_check->get_active(), false,
places_spin->get_value_as_int(), places_spin->get_value_as_int());
availability_spin->get_value_as_int());
} }
_add_resource_dialog->hide(); _add_resource_dialog->hide();

View File

@ -1,9 +1,7 @@
set cpu-policy 3 set cpu-policy 3
add resource add resource
forchetta forchetta
false
1 1
0
add process add process
Scuola di Mileto Scuola di Mileto
0 0

View File

@ -1,14 +1,10 @@
set cpu-policy 3 set cpu-policy 3
add resource add resource
ashi ashi
false
2 2
0
add resource add resource
forchetta forchetta
false
1 1
0
add process add process
Scuola di Mileto Scuola di Mileto
0 0

View File

@ -2,21 +2,15 @@ set cpu-policy 2
add resource add resource
forchetta forchetta
false
1 1
0
add resource add resource
ashi ashi
false
2 2
0
add resource add resource
dita dita
false
10 10
0

View File

@ -6,14 +6,10 @@ configure-cpu-policy
add resource add resource
scythe scythe
false
1 1
0
add resource add resource
sword sword
false
1 1
0
add process add process

View File

@ -2,9 +2,7 @@ set cpu-policy 3
add resource add resource
forchetta forchetta
false
1 1
0
add process add process
Pitagorici Pitagorici

View File

@ -31,9 +31,7 @@ configure-cpu-policy
add resource add resource
Jenna Jameson Jenna Jameson
false
2 2
0
add process add process
"Wet Dreams IV" "Wet Dreams IV"

View File

@ -6,9 +6,7 @@ configure-cpu-policy
add resource add resource
banana banana
false
1 1
0

View File

@ -1053,18 +1053,14 @@ TextSimulation::on_add_resource(const Tokens& arguments)
check_arguments_num(arguments, 0); check_arguments_num(arguments, 0);
CommandParameter<ustring> name(_("name"), "", "", false, ""); CommandParameter<ustring> name(_("name"), "", "", false, "");
CommandParameter<bool> preemptable(_("pre-emptable?"), false, false, false, false);
CommandParameter<int> places(_("places"), 0, INT_MAX, false, 1); CommandParameter<int> places(_("places"), 0, INT_MAX, false, 1);
CommandParameter<int> availability(_("availability"), 0, INT_MAX, false, 0);
get_parameter(name); get_parameter(name);
get_parameter(preemptable);
get_parameter(places); get_parameter(places);
get_parameter(availability);
History& h = Simulation::get_instance().get_history(); History& h = Simulation::get_instance().get_history();
h.add_resource(name.value, preemptable.value, places.value, availability.value); h.add_resource(name.value, false, places.value);
} }
void void