[gnote] Updated replacetitle after popover changes



commit f1f1cef79aec618707cbc7969313b2f67b8387dc
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sun Mar 31 18:08:07 2019 +0300

    Updated replacetitle after popover changes

 src/addins/replacetitle/replacetitle.desktop.in.in | 2 +-
 src/addins/replacetitle/replacetitlenoteaddin.cpp  | 6 +++---
 src/addins/replacetitle/replacetitlenoteaddin.hpp  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/addins/replacetitle/replacetitle.desktop.in.in 
b/src/addins/replacetitle/replacetitle.desktop.in.in
index 9c69a930..6aef65ec 100644
--- a/src/addins/replacetitle/replacetitle.desktop.in.in
+++ b/src/addins/replacetitle/replacetitle.desktop.in.in
@@ -4,7 +4,7 @@ _Name=Replace title
 _Description=Replace title with selection.
 _Authors=Pierre-Yves Luyten
 Category=Tools
-Version=0.3
+Version=0.4
 DefaultEnabled=true
 Module=libreplacetitle
 LibgnoteRelease=@LIBGNOTE_RELEASE@
diff --git a/src/addins/replacetitle/replacetitlenoteaddin.cpp 
b/src/addins/replacetitle/replacetitlenoteaddin.cpp
index 40c94c46..557be869 100644
--- a/src/addins/replacetitle/replacetitlenoteaddin.cpp
+++ b/src/addins/replacetitle/replacetitlenoteaddin.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2011-2013,2016-2017 Aurimas Cernius
+ * Copyright (C) 2011-2013,2016-2017,2019 Aurimas Cernius
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -47,11 +47,11 @@ void ReplaceTitleNoteAddin::on_note_opened()
     sigc::mem_fun(*this, &ReplaceTitleNoteAddin::replacetitle_button_clicked));
 }
 
-std::map<int, Gtk::Widget*> ReplaceTitleNoteAddin::get_actions_popover_widgets() const
+std::vector<gnote::PopoverWidget> ReplaceTitleNoteAddin::get_actions_popover_widgets() const
 {
   auto widgets = NoteAddin::get_actions_popover_widgets();
   auto button = gnote::utils::create_popover_button("win.replacetitle-replace", _("Replace title"));
-  gnote::utils::add_item_to_ordered_map(widgets, gnote::REPLACE_TITLE_ORDER, button);
+  widgets.push_back(gnote::PopoverWidget::create_for_note(gnote::REPLACE_TITLE_ORDER, button));
   return widgets;
 }
 
diff --git a/src/addins/replacetitle/replacetitlenoteaddin.hpp 
b/src/addins/replacetitle/replacetitlenoteaddin.hpp
index 1e2443ff..ff88d879 100644
--- a/src/addins/replacetitle/replacetitlenoteaddin.hpp
+++ b/src/addins/replacetitle/replacetitlenoteaddin.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2011-2013,2016 Aurimas Cernius
+ * Copyright (C) 2011-2013,2016,2019 Aurimas Cernius
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ public:
   virtual void initialize() override;
   virtual void shutdown() override;
   virtual void on_note_opened() override;
-  virtual std::map<int, Gtk::Widget*> get_actions_popover_widgets() const override;
+  virtual std::vector<gnote::PopoverWidget> get_actions_popover_widgets() const override;
 private:
   void replacetitle_button_clicked(const Glib::VariantBase&);
 };


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