[glom/gtkmm4v3: 19/21] gtkmm4: AddDel: Add a get_value() override that takes a Row.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/gtkmm4v3: 19/21] gtkmm4: AddDel: Add a get_value() override that takes a Row.
- Date: Tue, 14 Mar 2017 09:45:10 +0000 (UTC)
commit 655dc4e5cf2b040e5a38df8e87a9d2d3d26b6e4f
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Mar 14 10:18:48 2017 +0100
gtkmm4: AddDel: Add a get_value() override that takes a Row.
Apparently gtkmm4 no longer has an implicit conversion.
glom/utility_widgets/adddel/adddel.cc | 15 +++++++++------
glom/utility_widgets/adddel/adddel.h | 4 ++++
2 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/glom/utility_widgets/adddel/adddel.cc b/glom/utility_widgets/adddel/adddel.cc
index b8d3977..d4af425 100644
--- a/glom/utility_widgets/adddel/adddel.cc
+++ b/glom/utility_widgets/adddel/adddel.cc
@@ -297,29 +297,27 @@ void AddDel::remove_all()
}
-Glib::ustring AddDel::get_value(const Gtk::TreeModel::iterator& iter, guint col)
+Glib::ustring AddDel::get_value(const Gtk::TreeModel::Row& row, guint col)
{
Glib::ustring value;
if(m_list_store)
{
- Gtk::TreeModel::Row treerow = *iter;
-
- if(treerow)
+ if(row)
{
const guint col_real = col;
//Get different types of data, depending on the column:
if(m_column_types[col_real].m_style == AddDelColumnInfo::enumStyles::Boolean)
{
bool bool_value = false;
- treerow.get_value(col_real, bool_value);
+ row.get_value(col_real, bool_value);
//Create a string representation of the value:
value = bool_value ? "true" : "false";
}
else
{
- treerow.get_value(col_real, value);
+ row.get_value(col_real, value);
}
}
}
@@ -327,6 +325,11 @@ Glib::ustring AddDel::get_value(const Gtk::TreeModel::iterator& iter, guint col)
return value;
}
+Glib::ustring AddDel::get_value(const Gtk::TreeModel::iterator& iter, guint col)
+{
+ return get_value(*iter, col);
+}
+
bool AddDel::get_value_as_bool(const Gtk::TreeModel::iterator& iter, guint col)
{
//TODO: I doubt that this works. It should really get the value from the treeview as a bool. murrayc
diff --git a/glom/utility_widgets/adddel/adddel.h b/glom/utility_widgets/adddel/adddel.h
index cc0fe91..3844c14 100644
--- a/glom/utility_widgets/adddel/adddel.h
+++ b/glom/utility_widgets/adddel/adddel.h
@@ -99,7 +99,11 @@ public:
void remove_all();
+ Glib::ustring get_value(const Gtk::TreeModel::Row& iter, guint col);
+
+ // TODO: Remove this one?
Glib::ustring get_value(const Gtk::TreeModel::iterator& iter, guint col);
+
bool get_value_as_bool(const Gtk::TreeModel::iterator& iter, guint col);
/** Get the row's hidden key
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]