[gtkmm] TreeView: Removed unused TreeView::_get_base_model() method.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] TreeView: Removed unused TreeView::_get_base_model() method.
- Date: Wed, 16 Mar 2011 11:39:17 +0000 (UTC)
commit 8073fc59effc57669fa0a183aa436f05dfd7def3
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Mar 16 12:35:59 2011 +0100
TreeView: Removed unused TreeView::_get_base_model() method.
* gtk/src/treeview.[hg|ccg]: As suggested by Kjell Ahlstedt in
https://bugzilla.gnome.org/show_bug.cgi?id=582981#c16
ChangeLog | 7 +++++++
gtk/src/treeview.ccg | 24 ++----------------------
gtk/src/treeview.hg | 9 +++------
3 files changed, 12 insertions(+), 28 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1405f1f..073834e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-03-16 Murray Cumming <murrayc murrayc-desktop>
+
+ TreeView: Removed unused TreeView::_get_base_model() method.
+
+ * gtk/src/treeview.[hg|ccg]: As suggested by Kjell Ahlstedt in
+ https://bugzilla.gnome.org/show_bug.cgi?id=582981#c16
+
2010-12-27 Luca Wehrstedt <lerks users sourceforge net>
Make TreeModelFilter behave like TreeModelSort.
diff --git a/gtk/src/treeview.ccg b/gtk/src/treeview.ccg
index d2af055..f9ea1bd 100644
--- a/gtk/src/treeview.ccg
+++ b/gtk/src/treeview.ccg
@@ -163,7 +163,7 @@ void TreeView::enable_model_drag_source(Gdk::ModifierType start_button_mask, Gdk
std::vector<TargetEntry> targets (1, TargetEntry (treeview_target_row));
enable_model_drag_source(targets, start_button_mask, actions);
-}
+}
void TreeView::enable_model_drag_dest(const std::vector<TargetEntry>& targets, Gdk::DragAction actions)
{
@@ -334,26 +334,6 @@ void TreeView::reset_expander_column()
gtk_tree_view_set_expander_column(gobj(), 0 /* see C docs */);
}
-Glib::RefPtr<Gtk::TreeModel> TreeView::_get_base_model()
-{
- Glib::RefPtr<TreeModel> refModel = get_model();
-
- bool get_child = true;
- while(get_child && refModel)
- {
- Glib::RefPtr<Gtk::TreeModelFilter> refModelFilter = Glib::RefPtr<Gtk::TreeModelFilter>::cast_dynamic(refModel);
- Glib::RefPtr<Gtk::TreeModelSort> refModelSort = Glib::RefPtr<Gtk::TreeModelSort>::cast_dynamic(refModel);
- if(refModelFilter)
- refModel = refModelFilter->get_model();
- else if(refModelSort)
- refModel = refModelSort->get_model();
- else
- get_child = false;
- }
-
- return refModel;
-}
-
void TreeView::_auto_store_on_cellrenderer_toggle_edited(const Glib::ustring& path_string,
int model_column)
{
@@ -479,7 +459,7 @@ bool TreeView::is_blank_at_pos(int x, int y, TreePath& path, TreeViewColumn*& co
GtkTreePath* cpath = 0;
GtkTreeViewColumn* pcolumn = 0;
const bool result = gtk_tree_view_is_blank_at_pos(const_cast<GtkTreeView*>(gobj()), x, y, &cpath, &pcolumn, &(cell_x), &(cell_y));
-
+
path = TreePath(cpath, false /* take ownership instead of taking a copy */);
column = Glib::wrap(pcolumn);
return result;
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index 6320916..1481976 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -547,14 +547,14 @@ public:
bool get_visible_range(TreeModel::Path& start_path, TreeModel::Path& end_path) const;
_IGNORE(gtk_tree_view_get_visible_range)
-
+
//TODO: Documentation
bool is_blank_at_pos(int x, int y, TreePath& path, TreeViewColumn*& column, int& cell_x, int& cell_y) const;
_IGNORE(gtk_tree_view_is_blank_at_pos)
-
+
//TODO: Documentation
bool is_blank_at_pos(int x, int y) const;
-
+
/* Drag-and-Drop support */
_IGNORE(gtk_tree_view_enable_model_drag_source)
@@ -809,9 +809,6 @@ _CONVERSION(`GtkTreeIter*',`const TreeModel::iterator&',`TreeModel::iterator(gtk
_WRAP_PROPERTY("enable-tree-lines", bool)
_WRAP_PROPERTY("tooltip-column", int)
- /// Get the treeview's model, but actually get the child model while it's a TreeModelFilter or TreeModelSort.
- Glib::RefPtr<Gtk::TreeModel> _get_base_model();
-
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]