Initial steps for displaying project modified status in UI

This commit is contained in:
Nedko Arnaudov 2008-07-04 01:54:41 +03:00
parent 8beac82995
commit e5cfcf035f
4 changed files with 22 additions and 4 deletions

View File

@ -24,17 +24,20 @@ struct project_impl
string name;
time_t modification_time;
string comment;
bool modified_status;
};
project::project(
const string& name,
time_t modification_time,
const string& comment)
const string& comment,
bool modified_status)
{
_impl_ptr = new project_impl;
_impl_ptr->name = name;
_impl_ptr->modification_time = modification_time;
_impl_ptr->comment = comment;
_impl_ptr->modified_status = modified_status;
}
project::~project()
@ -63,7 +66,13 @@ project::get_modification_time(
}
void
get_comment(
project::get_comment(
string& comment)
{
}
bool
project::get_modified_status()
{
return _impl_ptr->modified_status;
}

View File

@ -27,7 +27,8 @@ public:
project(
const string& name,
time_t modification_time,
const string& comment);
const string& comment,
bool modified_status);
~project();
@ -47,6 +48,9 @@ public:
set_name(
const string& name);
bool
get_modified_status();
private:
project_impl * _impl_ptr;
};

View File

@ -197,6 +197,11 @@ project_list_impl::project_added(
project_ptr->get_name(project_name);
if (project_ptr->get_modified_status())
{
project_name += " *";
}
row = *(_model->append());
row[_columns.name] = project_name;
row[_columns.project_ptr] = project_ptr;

View File

@ -41,7 +41,7 @@ void
session::project_add(
const string& project_name)
{
shared_ptr<project> project_ptr(new project(project_name, 0, ""));
shared_ptr<project> project_ptr(new project(project_name, 0, "", false));
_impl_ptr->projects.push_back(project_ptr);