[gnote] Fix inconsistency in search dialog selection causing drag and drop and delete to mis-behave. (Closes



commit f522780f2609b6ce003cbf003ce974c8b8530cd3
Author: Hubert Figuiere <hub figuiere net>
Date:   Sat May 16 19:43:44 2009 -0400

    Fix inconsistency in search dialog selection causing drag and drop and delete to mis-behave. (Closes #579107, Closes #582757)
---
 NEWS                  |    2 ++
 src/recentchanges.cpp |   10 ++--------
 src/recentchanges.hpp |    1 -
 3 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/NEWS b/NEWS
index 513b4ad..eb5529f 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,8 @@ Fixes:
     bugzilla icon in the bugzilla addin (Closes #581080)
   * Stop calculating the status icon menu position by thyself.
   * Fix UI for InsertTimeStamp addin (Closes #582788) (0.1.1)
+  * Fix inconsistency in search dialog selection causing drag and 
+    drop and delete to mis-behave. (Closes #579107, Closes #582757)
 
 Translations:
 
diff --git a/src/recentchanges.cpp b/src/recentchanges.cpp
index ee35ad5..ddeb167 100644
--- a/src/recentchanges.cpp
+++ b/src/recentchanges.cpp
@@ -338,7 +338,6 @@ namespace gnote {
     m_tree->signal_drag_data_get().connect(
       sigc::mem_fun(*this, &NoteRecentChanges::on_treeview_drag_data_get));
 
-    // this cause a frakkin' warning.
     m_tree->enable_model_drag_source(m_targets,
       Gdk::BUTTON1_MASK | Gdk::BUTTON3_MASK, Gdk::ACTION_MOVE);
 
@@ -977,16 +976,11 @@ namespace gnote {
     return selected_notes;
   }
 
-  Note::Ptr NoteRecentChanges::get_note(const Gtk::TreeIter & iter)
-  {
-    return (*iter)[m_column_types.note];
-  }
-
   Note::Ptr NoteRecentChanges::get_note(const Gtk::TreePath & p)
   {
-    Gtk::TreeIter iter = m_store->get_iter(p); 
+    Gtk::TreeIter iter = m_store_sort->get_iter(p); 
     if(iter) {
-      return get_note(iter);
+      return (*iter)[m_column_types.note];
     }
     return Note::Ptr();
   }
diff --git a/src/recentchanges.hpp b/src/recentchanges.hpp
index d3f8bda..3d1fcdc 100644
--- a/src/recentchanges.hpp
+++ b/src/recentchanges.hpp
@@ -99,7 +99,6 @@ private:
   void position_context_menu(int & x, int & y, bool & push_in);
   void get_widget_screen_pos(Gtk::Widget &, int &, int &);
   Note::List get_selected_notes();
-  Note::Ptr get_note(const Gtk::TreeIter & iter);
   Note::Ptr get_note(const Gtk::TreePath & p);
   void on_open_note();
   void on_delete_note();



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