glom r1712 - in trunk: . docs/user-guide docs/user-guide/C/figures docs/website/screenshots glom/mode_data



Author: murrayc
Date: Wed Oct 22 16:54:44 2008
New Revision: 1712
URL: http://svn.gnome.org/viewvc/glom?rev=1712&view=rev

Log:
2008-10-22  Murray Cumming  <murrayc murrayc com>

* glom/mode_data/box_data_list_related.cc create_layout_get_layout():
Return the portal as the group instead of trying to get the layout via 
the (not meant to be used) list_related layout name. This makes related 
records portals show the specified fields again, instead of all of them.
* glom/mode_data/box_data_manyrecords.cc: 
* glom/mode_data/box_data_manyrecords.h: Remove the useless 
create_layout_get_layout() override.

Added:
   trunk/docs/user-guide/C/figures/glom_design_details_layout_toolbar.png   (contents, props changed)
   trunk/docs/user-guide/C/figures/glom_design_print_layout.png   (contents, props changed)
   trunk/docs/user-guide/C/figures/glom_initial_dialog_local_network.png   (contents, props changed)
   trunk/docs/website/screenshots/glom_design_details_layout_toolbar.png   (contents, props changed)
   trunk/docs/website/screenshots/glom_design_print_layout.png   (contents, props changed)
   trunk/docs/website/screenshots/glom_initial_dialog_local_network.png   (contents, props changed)
Modified:
   trunk/ChangeLog
   trunk/docs/user-guide/Makefile.am
   trunk/glom/mode_data/box_data.h
   trunk/glom/mode_data/box_data_list.cc
   trunk/glom/mode_data/box_data_list_related.cc
   trunk/glom/mode_data/box_data_manyrecords.cc
   trunk/glom/mode_data/box_data_manyrecords.h

Added: trunk/docs/user-guide/C/figures/glom_design_details_layout_toolbar.png
==============================================================================
Binary file. No diff available.

Added: trunk/docs/user-guide/C/figures/glom_design_print_layout.png
==============================================================================
Binary file. No diff available.

Added: trunk/docs/user-guide/C/figures/glom_initial_dialog_local_network.png
==============================================================================
Binary file. No diff available.

Modified: trunk/docs/user-guide/Makefile.am
==============================================================================
--- trunk/docs/user-guide/Makefile.am	(original)
+++ trunk/docs/user-guide/Makefile.am	Wed Oct 22 16:54:44 2008
@@ -13,6 +13,7 @@
 	figures/glom_design_layout_list.png \
 	figures/glom_design_reports_vertical_group.png \
 	figures/glom_import.png \
+	figures/glom_initial_dialog_local_network.png \
 	figures/start.png \
 	figures/glom_design_fields_dialog_calculated.png \
 	figures/glom_design_reports_details.png \

Added: trunk/docs/website/screenshots/glom_design_details_layout_toolbar.png
==============================================================================
Binary file. No diff available.

Added: trunk/docs/website/screenshots/glom_design_print_layout.png
==============================================================================
Binary file. No diff available.

Added: trunk/docs/website/screenshots/glom_initial_dialog_local_network.png
==============================================================================
Binary file. No diff available.

Modified: trunk/glom/mode_data/box_data.h
==============================================================================
--- trunk/glom/mode_data/box_data.h	(original)
+++ trunk/glom/mode_data/box_data.h	Wed Oct 22 16:54:44 2008
@@ -104,7 +104,7 @@
 
   /** Get the layout groups, with the Field information filled in.
    */
-  Document_Glom::type_list_layout_groups get_data_layout_groups(const Glib::ustring& layout);
+  Document_Glom::type_list_layout_groups get_data_layout_groups(const Glib::ustring& layout_name);
   void fill_layout_group_field_info(const sharedptr<LayoutGroup>& group, const Privileges& table_privs);
 
 

Modified: trunk/glom/mode_data/box_data_list.cc
==============================================================================
--- trunk/glom/mode_data/box_data_list.cc	(original)
+++ trunk/glom/mode_data/box_data_list.cc	Wed Oct 22 16:54:44 2008
@@ -441,7 +441,8 @@
 
 Document_Glom::type_list_layout_groups Box_Data_List::create_layout_get_layout()
 {
-  //Overriden in Box_Data_List_Related:
+  //This method is overriden in Box_Data_List_Related.
+
   return get_data_layout_groups(m_layout_name); 
 }
 

Modified: trunk/glom/mode_data/box_data_list_related.cc
==============================================================================
--- trunk/glom/mode_data/box_data_list_related.cc	(original)
+++ trunk/glom/mode_data/box_data_list_related.cc	Wed Oct 22 16:54:44 2008
@@ -49,8 +49,10 @@
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   m_AddDel.signal_user_requested_layout().connect(sigc::mem_fun(*this, &Box_Data_List_Related::on_adddel_user_requested_layout));
 #endif // !GLOM_ENABLE_CLIENT_ONLY
-  
-  m_layout_name = "list_related"; //TODO: We need a unique name when 2 portals use the same table.
+
+  //We do not actually use this, 
+  //so it is a bug if this appears in the .glom file:
+  m_layout_name = "list_related";
 }
 
 void Box_Data_List_Related::enable_buttons()
@@ -365,8 +367,14 @@
 
 Document_Glom::type_list_layout_groups Box_Data_List_Related::create_layout_get_layout()
 {
-  //Overriden in Box_Data_List_Related:
-  return get_data_layout_groups(m_layout_name); 
+  Document_Glom::type_list_layout_groups result;
+
+  //Do not use get_data_layout_groups(m_layout_name).
+  //instead do this:
+  if(m_portal)
+    result.push_back(m_portal);
+  
+  return result;
 }
 
 //These create_layout*() methods are actually copy/pasted from Box_Data_List().

Modified: trunk/glom/mode_data/box_data_manyrecords.cc
==============================================================================
--- trunk/glom/mode_data/box_data_manyrecords.cc	(original)
+++ trunk/glom/mode_data/box_data_manyrecords.cc	Wed Oct 22 16:54:44 2008
@@ -35,6 +35,8 @@
 : m_has_one_or_more_records(false),
   m_read_only(false)
 {
+  //We do not actually use this, 
+  //so it is a bug if this appears in the .glom file:
   m_layout_name = "manyrecords"; //Set by derived classes.
 
   //Groups are not very helpful for a list view:
@@ -51,11 +53,13 @@
   //Overridden by derived classes.
 }
 
+/*
 Document_Glom::type_list_layout_groups Box_Data_ManyRecords::create_layout_get_layout()
 {
   //Overriden in Box_Data_ManyRecords_Related:
   return get_data_layout_groups(m_layout_name); 
 }
+*/
 
 Box_Data_ManyRecords::type_signal_user_requested_details Box_Data_ManyRecords::signal_user_requested_details()
 {

Modified: trunk/glom/mode_data/box_data_manyrecords.h
==============================================================================
--- trunk/glom/mode_data/box_data_manyrecords.h	(original)
+++ trunk/glom/mode_data/box_data_manyrecords.h	Wed Oct 22 16:54:44 2008
@@ -55,7 +55,7 @@
 
 
 protected:
-  virtual Document_Glom::type_list_layout_groups create_layout_get_layout(); //overriden in Box_Data_ManyRecords_Related.
+  //virtual Document_Glom::type_list_layout_groups create_layout_get_layout(); //overriden in Box_Data_ManyRecords_Related.
   void create_layout_add_group(const sharedptr<LayoutGroup>& layout_group);
 
   virtual void print_layout();



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