Commit d3f4c9b6 authored by Murray Cumming's avatar Murray Cumming

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.
parent 075e078c
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.
......
......@@ -88,7 +88,24 @@ 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());
......@@ -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() );
......
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment