- Replaced "length" in column header with "duration"

- Make the tree widget display more useful information

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1121 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
elvez 2006-09-12 22:36:25 +00:00
parent 15d2f72944
commit 3ef89029ec
3 changed files with 10 additions and 11 deletions

View File

@ -82,7 +82,7 @@ AddRequestDialog::AddRequestDialog(BaseObjectType* cobject, const RefPtr<Xml>& g
_list_columns.add(_list_key_column);
_list_columns.add(_list_resource_column);
_list_columns.add(_list_length_column);
_list_columns.add(_list_duration_column);
_list_model = ListStore::create(_list_columns);
_list->set_model(_list_model);
@ -95,7 +95,7 @@ AddRequestDialog::AddRequestDialog(BaseObjectType* cobject, const RefPtr<Xml>& g
_list->append_column(_("key"), _list_key_column);
_list->append_column(_("resource"), _list_resource_column);
_list->append_column(_("length"), _list_length_column);
_list->append_column(_("duration"), _list_duration_column);
_list->get_selection()->signal_changed().connect(
sigc::mem_fun(*this, &AddRequestDialog::_on_list_selection_changed));
@ -124,7 +124,7 @@ AddRequestDialog::run_add(Thread& owner)
TreeNodeChildren sreq_container = _list_model->children();
for(Iseq<TreeIter> it = iseq(sreq_container); it; ++it)
h.add_subrequest(*r, (*it)[_list_key_column], (*it)[_list_length_column]);
h.add_subrequest(*r, (*it)[_list_key_column], (*it)[_list_duration_column]);
}
hide();
@ -159,7 +159,7 @@ AddRequestDialog::run_edit(Request& request)
const ustring name = resources.find(key)->second->get_name();
row[_list_resource_column] = name;
row[_list_length_column] = sr.get_length();
row[_list_duration_column] = sr.get_length();
}
if(run() == RESPONSE_OK)
@ -175,7 +175,7 @@ AddRequestDialog::run_edit(Request& request)
TreeNodeChildren sreq_container = _list_model->children();
for(Iseq<TreeIter> it = iseq(sreq_container); it; ++it)
history.add_subrequest(request, (*it)[_list_key_column], (*it)[_list_length_column]);
history.add_subrequest(request, (*it)[_list_key_column], (*it)[_list_duration_column]);
}
hide();
@ -214,8 +214,8 @@ AddRequestDialog::_on_add()
const ustring resource = (*sel)[_combo_resource_column];
row[_list_resource_column] = resource;
const unsigned int length = _duration_spin->get_value_as_int();
row[_list_length_column] = length;
const unsigned int duration = _duration_spin->get_value_as_int();
row[_list_duration_column] = duration;
}
void

View File

@ -72,7 +72,7 @@ namespace sgpem
Gtk::TreeModelColumnRecord _list_columns;
Gtk::TreeModelColumn<unsigned int> _list_key_column;
Gtk::TreeModelColumn<Glib::ustring> _list_resource_column;
Gtk::TreeModelColumn<unsigned int> _list_length_column;
Gtk::TreeModelColumn<unsigned int> _list_duration_column;
Gtk::Button* _add_button;
Gtk::Button* _remove_button;

View File

@ -637,9 +637,8 @@ SchedulablesTreeWidget::markup_schedulable(const Schedulable& s)
oss << "<small><span foreground=\""
<< GlobalPreferences::get_instance().get_schedulable_color(s.get_state())
<< "\"><b>" << Markup::escape_text(s.get_name()) << "</b></span>"
<< _(", arrives at: ") << s.get_arrival_time()
<< _(", base priority: ") << s.get_base_priority()
<< _(", elapsed time: ") << s.get_elapsed_time()
<< _(" (") << s.get_elapsed_time()
<< _("/") << s.get_total_cpu_time() << ")"
<< _(", current priority: ") << s.get_current_priority()
<< "</small>";