[gnote/meson] Add activate signal handler



commit 91f7e345ed2b4ee90c2487b9a302e74c4070fc1c
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Mon Apr 5 19:20:22 2021 +0300

    Add activate signal handler

 src/gnote.cpp | 6 ++++++
 src/gnote.hpp | 1 +
 2 files changed, 7 insertions(+)
---
diff --git a/src/gnote.cpp b/src/gnote.cpp
index 67577e29..d4e120c5 100644
--- a/src/gnote.cpp
+++ b/src/gnote.cpp
@@ -110,6 +110,12 @@ namespace gnote {
   }
 
 
+  void Gnote::on_activate()
+  {
+    get_main_window().present();
+  }
+
+
   int Gnote::on_command_line(const Glib::RefPtr<Gio::ApplicationCommandLine> & command_line)
   {
     Gtk::Application::on_command_line(command_line);
diff --git a/src/gnote.hpp b/src/gnote.hpp
index 00c465a7..c84bc374 100644
--- a/src/gnote.hpp
+++ b/src/gnote.hpp
@@ -166,6 +166,7 @@ public:
 protected:
   virtual int on_command_line(const Glib::RefPtr<Gio::ApplicationCommandLine> & command_line) override;
   virtual void on_startup() override;
+  virtual void on_activate() override;
 private:
   Gnote();
   Glib::ustring get_note_path(const Glib::ustring & override_path);


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