[glom] Makes navigation work to alternate specified relationships.
- From: Murray Cumming <murrayc src gnome org>
- To: svn-commits-list gnome org
- Subject: [glom] Makes navigation work to alternate specified relationships.
- Date: Sun, 19 Apr 2009 14:15:48 -0400 (EDT)
commit 5e18142f136965f80b963dc3bb23ebeeb42dcac7
Author: Murray Cumming <murrayc murrayc com>
Date: Sun Apr 19 20:13:43 2009 +0200
Makes navigation work to alternate specified relationships.
* glom/mode_data/flowtablewithfields.cc: on_portal_user_requested_details():
Don't default to navigating to just the immediate related table. Instead,
always use the navigation options, by always calling
LayoutItem_Portal::get_suitable_record_to_view_details().
Bug #579172 (Michael Hasselmann)
---
ChangeLog | 10 ++++++++++
glom/mode_data/flowtablewithfields.cc | 26 ++++++++------------------
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8acd659..338a714 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-04-17 Murray Cumming <murrayc murrayc com>
+
+ Makes navigation work to alternate specified relationships.
+
+ * glom/mode_data/flowtablewithfields.cc: on_portal_user_requested_details():
+ Don't default to navigating to just the immediate related table. Instead,
+ always use the navigation options, by always calling
+ LayoutItem_Portal::get_suitable_record_to_view_details().
+ Bug #579172 (Michael Hasselmann)
+
2009-04-11 Murray Cumming <murrayc murrayc com>
* glom/base_db.cc: add_standard_groups(): Give the developer group
diff --git a/glom/mode_data/flowtablewithfields.cc b/glom/mode_data/flowtablewithfields.cc
index 6b04992..71f1546 100644
--- a/glom/mode_data/flowtablewithfields.cc
+++ b/glom/mode_data/flowtablewithfields.cc
@@ -1155,24 +1155,14 @@ void FlowTableWithFields::on_portal_user_requested_details(Gnome::Gda::Value pri
if(!portal)
return;
- const Glib::ustring related_table = portal->get_table_used(Glib::ustring() /* parent table - not relevant */);
- if(related_table.empty())
- return;
-
- if(get_document()->get_table_is_hidden(related_table))
- {
- //Try to find a doubly-related table that is not hidden, and open that instead:
- Glib::ustring doubly_related_table_name;
- Gnome::Gda::Value doubly_related_primary_key;
- portal_box->get_suitable_record_to_view_details(primary_key_value, doubly_related_table_name, doubly_related_primary_key);
-
- if(!(doubly_related_table_name.empty()) && !Conversions::value_is_empty(doubly_related_primary_key))
- signal_requested_related_details().emit(doubly_related_table_name, doubly_related_primary_key);
- }
- else
- {
- signal_requested_related_details().emit(related_table, primary_key_value);
- }
+ //Try to find a related (or doubly related) table that is not hidden, and open that,
+ //based on the navigation options for the portal:
+ Glib::ustring table_name;
+ Gnome::Gda::Value primary_key;
+ portal_box->get_suitable_record_to_view_details(primary_key_value, table_name, primary_key);
+
+ if(!(table_name.empty()) && !Conversions::value_is_empty(primary_key))
+ signal_requested_related_details().emit(table_name, primary_key);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]