[gnote] Expose actions from main window



commit 06e2d6b27df53a0a4656e3ddc37ac1fc7f4b1a48
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sun Dec 6 14:30:44 2015 +0200

    Expose actions from main window

 src/mainwindowembeds.hpp |    1 +
 src/recentchanges.cpp    |    5 +++++
 src/recentchanges.hpp    |    1 +
 3 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/mainwindowembeds.hpp b/src/mainwindowembeds.hpp
index aa0d230..d1f6dd4 100644
--- a/src/mainwindowembeds.hpp
+++ b/src/mainwindowembeds.hpp
@@ -40,6 +40,7 @@ public:
   virtual bool running() = 0;
   virtual bool contains(EmbeddableWidget &) = 0;
   virtual bool is_foreground(EmbeddableWidget &) = 0;
+  virtual MainWindowAction::Ptr find_action(const Glib::ustring & name) = 0;
 };
 
 class EmbeddableWidget
diff --git a/src/recentchanges.cpp b/src/recentchanges.cpp
index f23388f..7461267 100644
--- a/src/recentchanges.cpp
+++ b/src/recentchanges.cpp
@@ -586,6 +586,11 @@ namespace gnote {
     return false;
   }
 
+  MainWindowAction::Ptr NoteRecentChanges::find_action(const Glib::ustring & name)
+  {
+    return IActionManager::obj().find_main_window_action(name);
+  }
+
   EmbeddableWidget *NoteRecentChanges::currently_embedded()
   {
     std::vector<Gtk::Widget*> children = m_embed_box.get_children();
diff --git a/src/recentchanges.hpp b/src/recentchanges.hpp
index 47478ca..e39aa52 100644
--- a/src/recentchanges.hpp
+++ b/src/recentchanges.hpp
@@ -61,6 +61,7 @@ public:
     }
   virtual bool contains(EmbeddableWidget &) override;
   virtual bool is_foreground(EmbeddableWidget &) override;
+  virtual MainWindowAction::Ptr find_action(const Glib::ustring & name) override;
 protected:
   virtual void present_note(const Note::Ptr & note) override;
   virtual void on_show() override;


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