[glom] Related records portals: Allow navigation via read-only relationships.



commit 4e0f494a67d540ae92d9e333429ed7fd0a434362
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Sep 9 14:36:46 2011 +0200

    Related records portals: Allow navigation via read-only relationships.
    
    * glom/mode_data/box_data_list_related.cc: on_adddel_user_requested_edit():
      Remove the check for a non-editable relationship, because that is about
      editing, but this is about opening, and we already have the navigation=None
      option.

 ChangeLog                               |    9 +++++++++
 glom/mode_data/box_data_list_related.cc |    8 +-------
 2 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5c020a4..98419c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2011-09-09  Murray Cumming  <murrayc murrayc com>
 
+	Related records portals: Allow navigation via read-only relationships.
+
+	* glom/mode_data/box_data_list_related.cc: on_adddel_user_requested_edit():
+  Remove the check for a non-editable relationship, because that is about 
+  editing, but this is about opening, and we already have the navigation=None
+  option.
+
+2011-09-09  Murray Cumming  <murrayc murrayc com>
+
 	Script Library: Prevent a crash when opening the dialog.
 
 	* ui/developer/dialog_script_library.glade: Change the GtkComboBox to a 
diff --git a/glom/mode_data/box_data_list_related.cc b/glom/mode_data/box_data_list_related.cc
index 697d531..574eabe 100644
--- a/glom/mode_data/box_data_list_related.cc
+++ b/glom/mode_data/box_data_list_related.cc
@@ -173,13 +173,7 @@ Gnome::Gda::Value Box_Data_List_Related::get_primary_key_value(const Gtk::TreeMo
 
 void Box_Data_List_Related::on_adddel_user_requested_edit(const Gtk::TreeModel::iterator& row)
 {
-  if(!(m_portal->get_relationship_used_allows_edit()))
-  {
-    std::cerr << "Box_Data_List_Related::on_adddel_user_requested_eidt() called on non-editable portal. This should not happen." << std::endl;
-    return;
-  }
-
-  //Call base class:
+  //Note that this is really an Open rather than an Edit.
 
   const Gnome::Gda::Value primary_key_value = m_AddDel.get_value_key(row); //The primary key is in the key.
   //std::cout << "debug: " << G_STRFUNC << ": Requesting edit for primary_key=" << primary_key_value.to_string() << std::endl;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]