[glom] Add comments
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Add comments
- Date: Wed, 21 Dec 2011 20:33:30 +0000 (UTC)
commit 3e70a2ac643067ea8ee0fb3d300b273197f2c8ad
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Dec 21 21:33:22 2011 +0100
Add comments
glom/base_db_table_data_readonly.h | 4 ++++
glom/mode_data/box_data_details.cc | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/glom/base_db_table_data_readonly.h b/glom/base_db_table_data_readonly.h
index d1cbb9a..61ba65a 100644
--- a/glom/base_db_table_data_readonly.h
+++ b/glom/base_db_table_data_readonly.h
@@ -44,6 +44,10 @@ protected:
//TODO: Move these to Base_DB_Table_Data too?
virtual sharedptr<Field> get_field_primary_key() const = 0;
+
+ //TODO: Document whether these get the primary key in an existing record,
+ //or the primary key value as it is entered in the UI, even before a record exists,
+ //or both.
virtual Gnome::Gda::Value get_primary_key_value_selected() const = 0;
virtual Gnome::Gda::Value get_primary_key_value(const Gtk::TreeModel::iterator& row) const = 0;
diff --git a/glom/mode_data/box_data_details.cc b/glom/mode_data/box_data_details.cc
index df1a3a7..3ebfd75 100644
--- a/glom/mode_data/box_data_details.cc
+++ b/glom/mode_data/box_data_details.cc
@@ -711,7 +711,7 @@ void Box_Data_Details::on_flowtable_field_edited(const sharedptr<const LayoutIte
Gnome::Gda::Value primary_key_value = get_primary_key_value_selected();
//std::cout << "debug: " << G_STRFUNC << ": primary_key_value=" << primary_key_value.to_string() << std::endl;
- if(!Conversions::value_is_empty(primary_key_value)) //If there is not a primary key value:
+ if(!Conversions::value_is_empty(primary_key_value)) //If there is not a stored primary key value yet:
{
Glib::ustring table_name;
sharedptr<Field> primary_key_field;
@@ -840,7 +840,7 @@ void Box_Data_Details::on_flowtable_field_edited(const sharedptr<const LayoutIte
}
else
{
- //There is no current primary key value:
+ //There is no current stored primary key value yet:
if(m_field_primary_key && m_field_primary_key->get_auto_increment()) //If the primary key is an auto-increment:
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]