[glom] LayoutItem_Portal: Do not implement get_part_type_name().



commit 4499dc07dbc9bb006d312eaa00a300a1abf53e80
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Apr 1 21:01:52 2013 +0200

    LayoutItem_Portal: Do not implement get_part_type_name().
    
            * glom/libglom/data_structure/layout/layoutitem_portal.[h|cc]:
    Remove the get_part_type_name() override because it adds
    a translation that we never use. We only ever instantiate the
    derived portal types.

 ChangeLog                                          |   21 ++++++++++++++-----
 .../data_structure/layout/layoutitem_portal.cc     |   10 ---------
 .../data_structure/layout/layoutitem_portal.h      |    5 +++-
 3 files changed, 19 insertions(+), 17 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 93fae00..a7252cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,18 +1,27 @@
-2013-03-21  Murray Cumming  <murrayc murrayc com>
+2013-04-01  Murray Cumming  <murrayc murrayc com>
 
-        Add a translation file for an example.
+        LayoutItem_Portal: Do not implement get_part_type_name().
 
-        * examples/po_files/example_film_manager/gl.po:
-       Add this missing file. The translations seem to have got into
-       the .glom file somehow, but this .po file was not in git.
+        * glom/libglom/data_structure/layout/layoutitem_portal.[h|cc]:
+       Remove the get_part_type_name() override because it adds
+       a translation that we never use. We only ever instantiate the
+       derived portal types.
 
-2013-02-15  Murray Cumming  <murrayc murrayc com>
+2013-04-01  Murray Cumming  <murrayc murrayc com>
 
         FieldTypes: Some simplification.
 
         * glom/libglom/data_structure/fieldtypes.[h|cc]:
        Remove a now-unused duplicate map of types.
 
+2013-03-21  Murray Cumming  <murrayc murrayc com>
+
+        Add a translation file for an example.
+
+        * examples/po_files/example_film_manager/gl.po:
+       Add this missing file. The translations seem to have got into
+       the .glom file somehow, but this .po file was not in git.
+
 2013-02-15  Murray Cumming  <murrayc murrayc com>
 
         MySQL support: Add a check for an empty initial password.
diff --git a/glom/libglom/data_structure/layout/layoutitem_portal.cc 
b/glom/libglom/data_structure/layout/layoutitem_portal.cc
index e11998c..4c4e9b9 100644
--- a/glom/libglom/data_structure/layout/layoutitem_portal.cc
+++ b/glom/libglom/data_structure/layout/layoutitem_portal.cc
@@ -79,16 +79,6 @@ LayoutItem_Portal& LayoutItem_Portal::operator=(const LayoutItem_Portal& src)
   return *this;
 }
 
-Glib::ustring LayoutItem_Portal::get_part_type_name() const
-{
-  //TODO: "Portal" probably shouldn't appear in the UI.
-  //We should use "Related Records instead.
-  //Translators: This is the name of a UI element (a layout part name).
-  //It means a list of related records.
-  return _("Portal");
-}
-
-
 void LayoutItem_Portal::change_related_field_item_name(const Glib::ustring& table_name, const Glib::ustring& 
field_name, const Glib::ustring& field_name_new)
 {
   LayoutGroup::change_related_field_item_name(table_name, field_name, field_name_new);
diff --git a/glom/libglom/data_structure/layout/layoutitem_portal.h 
b/glom/libglom/data_structure/layout/layoutitem_portal.h
index 8d18d16..c29f10c 100644
--- a/glom/libglom/data_structure/layout/layoutitem_portal.h
+++ b/glom/libglom/data_structure/layout/layoutitem_portal.h
@@ -54,7 +54,10 @@ public:
 
   virtual Glib::ustring get_title(const Glib::ustring& locale) const;
   virtual Glib::ustring get_title_or_name(const Glib::ustring& locale) const;
-  virtual Glib::ustring get_part_type_name() const;
+
+  //We do not implement this, because we only ever want to use the method
+  //in the derived class.
+  //virtual Glib::ustring get_part_type_name() const;
 
   virtual void change_field_item_name(const Glib::ustring& table_name, const Glib::ustring& field_name, 
const Glib::ustring& field_name_new);
   virtual void change_related_field_item_name(const Glib::ustring& table_name, const Glib::ustring& 
field_name, const Glib::ustring& field_name_new);


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