[gtkmm/gtkmm-2-24] ListViewText: Rename methods to be consistent with ComboBoxText.



commit d3f4c9b6eb0f811e0ddc00cf3e1703be0589fbaf
Author: Murray Cumming <murrayc murrayc com>
Date:   Sat Jan 15 00:22:16 2011 +0100

    ListViewText: Rename methods to be consistent with ComboBoxText.
    
    * gtk/gtkmm/listviewtext.[h|cc]: Rename append_text(), insert_text(), and
    prepend_text() to append(), insert() and prepend() because that is what
    ComboBoxText now uses (because it has other append overloads).
    Keep the old methods as deprecated.

 ChangeLog                 |    9 +++++++++
 gtk/gtkmm/listviewtext.cc |   21 +++++++++++++++++++--
 gtk/gtkmm/listviewtext.h  |   25 +++++++++++++++++++++++++
 3 files changed, 53 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b200619..efb15d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-01-15  Murray Cumming  <murrayc murrayc com>
+
+	ListViewText: Rename methods to be consistent with ComboBoxText.
+
+	* gtk/gtkmm/listviewtext.[h|cc]: Rename append_text(), insert_text(), and 
+	prepend_text() to append(), insert() and prepend() because that is what 
+	ComboBoxText now uses (because it has other append overloads).
+	Keep the old methods as deprecated.
+
 2011-01-14  Murray Cumming  <murrayc murrayc com>
 
 	Fix the make check build.
diff --git a/gtk/gtkmm/listviewtext.cc b/gtk/gtkmm/listviewtext.cc
index c4f82f8..72ea31e 100644
--- a/gtk/gtkmm/listviewtext.cc
+++ b/gtk/gtkmm/listviewtext.cc
@@ -88,8 +88,25 @@ Glib::ustring ListViewText::get_column_title(guint column) const
   return get_column(column)->get_title();
 }
 
+#ifndef GTKMM_DISABLE_DEPRECATED
 guint ListViewText::append_text(const Glib::ustring& column_one_value)
 {
+  return append(column_one_value);
+}
+
+void ListViewText::prepend_text(const Glib::ustring& column_one_value)
+{
+  prepend(column_one_value);
+}
+
+void ListViewText::insert_text(guint row, const Glib::ustring& column_one_value)
+{
+  insert(row, column_one_value);
+}
+#endif //GTKMM_DISABLE_DEPRECATED  
+
+guint ListViewText::append(const Glib::ustring& column_one_value)
+{
   Gtk::TreeModel::Row newRow = *(m_model->append());
 
   newRow[m_model_columns.m_columns[0]] = column_one_value;
@@ -97,14 +114,14 @@ guint ListViewText::append_text(const Glib::ustring& column_one_value)
   return size() - 1;
 }
 
-void ListViewText::prepend_text(const Glib::ustring& column_one_value)
+void ListViewText::prepend(const Glib::ustring& column_one_value)
 {
   Gtk::TreeModel::Row newRow = *(m_model->prepend());
 
   newRow[m_model_columns.m_columns[0]] = column_one_value;
 }
 
-void ListViewText::insert_text(guint row, const Glib::ustring& column_one_value)
+void ListViewText::insert(guint row, const Glib::ustring& column_one_value)
 {
   g_return_if_fail( row < size() );
 
diff --git a/gtk/gtkmm/listviewtext.h b/gtk/gtkmm/listviewtext.h
index 79166d9..e15470a 100644
--- a/gtk/gtkmm/listviewtext.h
+++ b/gtk/gtkmm/listviewtext.h
@@ -57,22 +57,47 @@ public:
    */
   Glib::ustring get_column_title(guint column) const;
 
+#ifndef GTKMM_DISABLE_DEPRECATED
   /** Add a new row at the end of the list
    * @param column_one_value the new text for the new row, column 0
    * @return the number of the row added
+   *
+   * @deprecated Use append().
    */
   guint append_text(const Glib::ustring& column_one_value = Glib::ustring());
 
   /** Insert a new row at the beginning of the list
    * @param column_one_value the new text for the new row, column 0
+   *
+   * @deprecated Use prepend().
    */
   void prepend_text(const Glib::ustring& column_one_value = Glib::ustring());
 
   /** Insert a new row at an arbitrary position in the list
    * @param row The row number
    * @param column_one_value the new text for the new row, column 0
+   *
+   * @deprecated Use insert().
    */
   void insert_text(guint row, const Glib::ustring& column_one_value = Glib::ustring());
+#endif //GTKMM_DISABLE_DEPRECATED  
+  
+  /** Add a new row at the end of the list
+   * @param column_one_value the new text for the new row, column 0
+   * @return the number of the row added
+   */
+  guint append(const Glib::ustring& column_one_value = Glib::ustring());
+
+  /** Insert a new row at the beginning of the list
+   * @param column_one_value the new text for the new row, column 0
+   */
+  void prepend(const Glib::ustring& column_one_value = Glib::ustring());
+
+  /** Insert a new row at an arbitrary position in the list
+   * @param row The row number
+   * @param column_one_value the new text for the new row, column 0
+   */
+  void insert(guint row, const Glib::ustring& column_one_value = Glib::ustring());
 
   /// Discard all row:
   void clear_items();



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