[gtkmm] TreeView: Added unset_drag_dest_row().



commit 981388bd3268514b177e742d3bc7f6a0e20d52cd
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Sep 6 06:20:39 2011 +0200

    TreeView: Added unset_drag_dest_row().
    
    * gtk/src/treeview.[hg|ccg]: Added unset_drag_dest_row().
    Bug #577986 (Hubert Figuiere, Johannes Schmid)

 ChangeLog            |    7 +++++++
 gtk/src/treeview.ccg |    7 +++++++
 gtk/src/treeview.hg  |    8 ++++++++
 3 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c6fdb98..d54409e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-09-06  Murray Cumming  <murrayc murrayc com>
+
+	TreeView: Added unset_drag_dest_row().
+
+	* gtk/src/treeview.[hg|ccg]: Added unset_drag_dest_row().
+	Bug #577986 (Hubert Figuiere, Johannes Schmid)
+
 2011-09-02  Kjell Ahlstedt  <kjell ahlstedt bredband net>
 
 	Avoid infinite loop in Gtk::Dialog::get_content_area().
diff --git a/gtk/src/treeview.ccg b/gtk/src/treeview.ccg
index 143f998..a2126e0 100644
--- a/gtk/src/treeview.ccg
+++ b/gtk/src/treeview.ccg
@@ -470,4 +470,11 @@ bool TreeView::is_blank_at_pos(int x, int y) const
   return gtk_tree_view_is_blank_at_pos(const_cast<GtkTreeView*>(gobj()), x, y, 0, 0, 0, 0);
 }
 
+void TreeView::unset_drag_dest_row()
+{
+  // The C docs specify that a 0 path means unset.
+  gtk_tree_view_set_drag_dest_row(gobj(), 0, GTK_TREE_VIEW_DROP_BEFORE /* Arbitrary. Ignored anyway. */);
+}
+
+
 } // namespace Gtk
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index 85180a4..a29f2d5 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -608,12 +608,20 @@ public:
   /* These are useful to implement your own custom stuff. */
 
   /** Sets the row that is highlighted for feedback.
+   * See also unset_drag_dest_row().
    *
    * @param path The path of the row to highlight
    * @param pos Specifies whether to drop before, after or into the row
    */
   _WRAP_METHOD(void set_drag_dest_row(const TreeModel::Path& path, TreeViewDropPosition pos), gtk_tree_view_set_drag_dest_row)
 
+  /** Remove an existing highlight.
+   * See set_drag_dest_row().
+   *
+   * @newin{3,2}
+   */
+  void unset_drag_dest_row();
+
   /** Gets information about the row that is highlighted for feedback.
    *
    * @param path Return location for the path of the highlighted row



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