[glom] Fix an error found by the gtkmm change to use operator const void*.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Fix an error found by the gtkmm change to use operator const void*.
- Date: Mon, 4 Apr 2011 12:47:27 +0000 (UTC)
commit 8714b3eb6094e36a8ccd342dcaff78e9c8bcf2f0
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Apr 4 14:47:04 2011 +0200
Fix an error found by the gtkmm change to use operator const void*.
* glom/utility_widgets/adddel/adddel.cc: There is no
TreeNodeChildren::operator[](TreeIter). The compiler was casting the TreeIter
to bool and then to (int)0.
ChangeLog | 10 ++++++++-
glom/utility_widgets/adddel/adddel.cc | 34 ++++++++++++++++----------------
2 files changed, 26 insertions(+), 18 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7b713b1..f27f41f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2011-04-04 Murray Cumming <murrayc murrayc com>
+ Fix an error found by the gtkmm change to use operator const void*.
+
+ * glom/utility_widgets/adddel/adddel.cc: There is no
+ TreeNodeChildren::operator[](TreeIter). The compiler was casting the TreeIter
+ to bool and then to (int)0.
+
+2011-04-04 Murray Cumming <murrayc murrayc com>
+
Require the latest mm-common and dist the mm-common scripts.
* configure.ac: Add a MM_CONFIG_DOCTOOL_DIR() call so that the scripts will
@@ -15,7 +23,7 @@
* glom/mode_design/fields/dialog_fielddefinition.h:
* glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.[h|cc]:
:
- * glom/mode_design/script_library/dialog_script_library.[h|cc]: Use
+ * glom/mode_design/script_library/dialog_script_library.[h|cc]: Use
Gsv::* instead of Gsv::Source*.
2011-03-30 Murray Cumming <murrayc murrayc com>
diff --git a/glom/utility_widgets/adddel/adddel.cc b/glom/utility_widgets/adddel/adddel.cc
index ec2d14c..5f942b3 100644
--- a/glom/utility_widgets/adddel/adddel.cc
+++ b/glom/utility_widgets/adddel/adddel.cc
@@ -148,7 +148,7 @@ void AddDel::set_treeview_accessible_name(const Glib::ustring& name)
{
#ifdef GTKMM_ATKMM_ENABLED
m_TreeView.get_accessible()->set_name(name);
-#endif
+#endif
}
void AddDel::warn_about_duplicate()
@@ -256,7 +256,7 @@ void AddDel::setup_menu()
try
{
- Glib::ustring ui_info =
+ Glib::ustring ui_info =
"<ui>"
" <popup name='ContextMenu'>"
" <menuitem action='ContextEdit'/>"
@@ -272,7 +272,7 @@ void AddDel::setup_menu()
}
//Get the menu:
- m_pMenuPopup = dynamic_cast<Gtk::Menu*>( m_refUIManager->get_widget("/ContextMenu") );
+ m_pMenuPopup = dynamic_cast<Gtk::Menu*>( m_refUIManager->get_widget("/ContextMenu") );
if(!m_pMenuPopup)
g_warning("menu not found");
}
@@ -311,7 +311,7 @@ Gtk::TreeModel::iterator AddDel::get_item_placeholder()
return add_item_placeholder();
}
}
-
+
Gtk::TreeModel::iterator AddDel::add_item_placeholder()
{
Gtk::TreeModel::iterator iter = m_refListStore->append();
@@ -393,7 +393,7 @@ 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
Glib::ustring strValue = get_value(iter, col);
- return (strValue == "true");
+ return (strValue == "true");
}
Glib::ustring AddDel::get_value_key_selected()
@@ -515,7 +515,7 @@ void AddDel::add_blank()
if(get_allow_user_actions()) //The extra blank line is only used if the user may add items:
{
- Gtk::TreeModel::iterator iter = get_last_row();
+ Gtk::TreeModel::iterator iter = get_last_row();
if(get_is_placeholder_row(iter))
{
bAddNewBlank = false; //One already exists.
@@ -759,7 +759,7 @@ void AddDel::construct_specified_columns()
{
std::cerr << G_STRFUNC << ": Leaking a Gtk::TreeModelColumn<>." << std::endl;
}
-
+
++model_column_index;
}
@@ -899,7 +899,7 @@ guint AddDel::add_column(const AddDelColumnInfo& column_info)
return m_ColumnTypes.size()-1;
}
-
+
guint AddDel::add_column(const Glib::ustring& strTitle, AddDelColumnInfo::enumStyles style, bool editable, bool visible)
{
//Use the title as the column_id:
@@ -976,8 +976,8 @@ void AddDel::set_allow_delete(bool val)
{
m_allow_delete= val;
}
-
-
+
+
void AddDel::set_allow_user_actions(bool bVal)
{
m_bAllowUserActions = bVal;
@@ -1084,7 +1084,7 @@ Glib::ustring AddDel::treeview_get_key(const Gtk::TreeModel::iterator& row)
if(m_refListStore)
{
- Gtk::TreeModel::Row treerow = m_refListStore->children()[row];
+ Gtk::TreeModel::Row treerow = *row;
if(treerow)
treerow.get_value(m_col_key, value);
@@ -1114,7 +1114,7 @@ void AddDel::on_treeview_cell_edited_bool(const Glib::ustring& path_string, int
row.set_value(model_column_index, value_new);
//TODO: Did it really change?
-
+
//Is this an add or a change?:
bool bIsAdd = false;
@@ -1153,7 +1153,7 @@ void AddDel::on_treeview_cell_edited_bool(const Glib::ustring& path_string, int
{
//Change it back, so that we ignore it:
row.set_value(model_column_index, value_old);
-
+
//Signal that a new key was added:
//We will ignore editing of bool values in the blank row. It seems like a bad way to start a new record.
//m_signal_user_added.emit(row);
@@ -1164,7 +1164,7 @@ void AddDel::on_treeview_cell_edited_bool(const Glib::ustring& path_string, int
m_signal_user_changed.emit(row, model_column_index);
}
-
+
}
}
@@ -1226,7 +1226,7 @@ void AddDel::on_treeview_cell_edited(const Glib::ustring& path_string, const Gli
//Fire appropriate signal:
if(bIsAdd)
{
- //Signal that a new key was added"
+ //Signal that a new key was added"
m_signal_user_added.emit(row);
}
else if(bIsChange)
@@ -1509,7 +1509,7 @@ void AddDel::set_value_key(const Gtk::TreeModel::iterator& iter, const Glib::ust
//This is not a placeholder anymore, if it every was:
iter->set_value(m_col_placeholder, false);
}
-
+
iter->set_value(m_col_key, strValue);
}
@@ -1539,7 +1539,7 @@ bool AddDel::get_model_column_index(guint view_column_index, guint& model_column
const guint count = m_ColumnTypes.size();
if(hidden > count)
return false; //This should never happen.
-
+
if(view_column_index >= (count - hidden))
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]