[gnote] Add getter for note to NoteBuffer



commit 6cb064df997ea50522a6426e61e0a838f36142b7
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sat Apr 12 19:24:31 2014 +0300

    Add getter for note to NoteBuffer

 src/notebuffer.cpp |    6 +++---
 src/notebuffer.hpp |    7 ++++++-
 2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/notebuffer.cpp b/src/notebuffer.cpp
index b38b29c..99f4f0a 100644
--- a/src/notebuffer.cpp
+++ b/src/notebuffer.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2010-2013 Aurimas Cernius
+ * Copyright (C) 2010-2014 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -66,10 +66,10 @@ namespace gnote {
   }
   
 
-  NoteBuffer::NoteBuffer(const NoteTagTable::Ptr & tags, Note & note)
+  NoteBuffer::NoteBuffer(const NoteTagTable::Ptr & tags, Note & note_)
     : Gtk::TextBuffer(tags)
     , m_undomanager(NULL)
-    , m_note(note)
+    , m_note(note_)
   {
     m_undomanager = new UndoManager(this);
     signal_insert().connect(sigc::mem_fun(*this, &NoteBuffer::text_insert_event));
diff --git a/src/notebuffer.hpp b/src/notebuffer.hpp
index 4223f74..203fec8 100644
--- a/src/notebuffer.hpp
+++ b/src/notebuffer.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2011-2013 Aurimas Cernius
+ * Copyright (C) 2011-2014 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -62,6 +62,11 @@ public:
     }
   ~NoteBuffer();
 
+  Note & note() const
+    {
+      return m_note;
+    }
+
   // Signal that text has been inserted, and any active tags have
   // been applied to the text.  This allows undo to pull any
   // active tags from the inserted text.


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