[gnote] Fix missing or mis-named API in DBus interface.



commit 7f927f5cea892bc2487b52e2a6abaa69ff1fbb41
Author: Hubert Figuiere <hub figuiere net>
Date:   Sat Jul 18 15:50:14 2009 -0400

    Fix missing or mis-named API in DBus interface.

 src/dbus/gnote-introspect.xml |    6 +++++-
 src/dbus/remotecontrol.cpp    |   16 +++++++++++++++-
 src/dbus/remotecontrol.hpp    |    3 ++-
 3 files changed, 22 insertions(+), 3 deletions(-)
---
diff --git a/src/dbus/gnote-introspect.xml b/src/dbus/gnote-introspect.xml
index 66ee335..092e848 100644
--- a/src/dbus/gnote-introspect.xml
+++ b/src/dbus/gnote-introspect.xml
@@ -17,6 +17,10 @@
       <arg type="s" name="uri" direction="in"/>
       <arg type="b" name="ret" direction="out"/>
     </method>
+    <method name="DisplayNote">
+      <arg type="s" name="uri" direction="in"/>
+      <arg type="b" name="ret" direction="out"/>
+    </method>
     <method name="DisplayNoteWithSearch">
       <arg type="s" name="uri" direction="in"/>
       <arg type="s" name="search" direction="in"/>
@@ -31,7 +35,7 @@
       <arg type="s" name="linked_title" direction="in"/>
       <arg type="s" name="ret" direction="out"/>
     </method>
-    <method name="FindNoteStartHereNote">
+    <method name="FindStartHereNote">
       <arg type="s" name="ret" direction="out"/>
     </method>
     <method name="GetAllNotesWithTag">
diff --git a/src/dbus/remotecontrol.cpp b/src/dbus/remotecontrol.cpp
index 9313fc1..3b18843 100644
--- a/src/dbus/remotecontrol.cpp
+++ b/src/dbus/remotecontrol.cpp
@@ -106,6 +106,20 @@ namespace gnote {
 
   }
 
+  bool RemoteControl::DisplayNote(const std::string& uri)
+  {
+    Note::Ptr note;
+
+    note = m_manager.find_by_uri (uri);
+    if (!note) {
+      return false;
+    }
+
+    note->get_window()->present();
+    return true;
+  }
+
+
   bool RemoteControl::DisplayNoteWithSearch(const std::string& uri, const std::string& search)
   {
     Note::Ptr note;
@@ -152,7 +166,7 @@ namespace gnote {
   }
 
 
-  std::string RemoteControl::FindNoteStartHereNote()
+  std::string RemoteControl::FindStartHereNote()
   {
     Note::Ptr note = m_manager.find_by_uri (m_manager.start_note_uri());
     return (!note) ? "" : note->uri();
diff --git a/src/dbus/remotecontrol.hpp b/src/dbus/remotecontrol.hpp
index 149c3b6..ee2cb80 100644
--- a/src/dbus/remotecontrol.hpp
+++ b/src/dbus/remotecontrol.hpp
@@ -46,11 +46,12 @@ public:
   virtual std::string CreateNamedNote(const std::string& linked_title);
   virtual std::string CreateNote();
   virtual bool DeleteNote(const std::string& uri);
+  virtual bool DisplayNote(const std::string& uri);
   virtual bool DisplayNoteWithSearch(const std::string& uri, const std::string& search);
   virtual void DisplaySearch();
   virtual void DisplaySearchWithText(const std::string& search_text);
   virtual std::string FindNote(const std::string& linked_title);
-  virtual std::string FindNoteStartHereNote();
+  virtual std::string FindStartHereNote();
   virtual std::vector< std::string > GetAllNotesWithTag(const std::string& tag_name);
   virtual int32_t GetNoteChangeDate(const std::string& uri);
   virtual std::string GetNoteCompleteXml(const std::string& uri);



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