[gnote] Update tableofcontents after popover changes
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Update tableofcontents after popover changes
- Date: Sun, 31 Mar 2019 16:07:51 +0000 (UTC)
commit c1d5bad0294f56007076201e4f8f32720d8a765b
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun Mar 31 18:09:53 2019 +0300
Update tableofcontents after popover changes
src/addins/tableofcontents/tableofcontents.desktop.in.in | 2 +-
src/addins/tableofcontents/tableofcontentsnoteaddin.cpp | 8 ++++----
src/addins/tableofcontents/tableofcontentsnoteaddin.hpp | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/addins/tableofcontents/tableofcontents.desktop.in.in
b/src/addins/tableofcontents/tableofcontents.desktop.in.in
index 50795136..9e7394e1 100644
--- a/src/addins/tableofcontents/tableofcontents.desktop.in.in
+++ b/src/addins/tableofcontents/tableofcontents.desktop.in.in
@@ -4,7 +4,7 @@ _Name=Table of Contents
_Description=Navigate long structured notes. Set section and subsection headings in your note, and the Table
of Contents will show in a menu.
_Authors=Luc Pionchon
Category=Tools
-Version=1.2.0
+Version=1.3.0
DefaultEnabled=false
Module=libtableofcontents
_Copyright=© 2013 Luc Pionchon
diff --git a/src/addins/tableofcontents/tableofcontentsnoteaddin.cpp
b/src/addins/tableofcontents/tableofcontentsnoteaddin.cpp
index cf8e0535..51640b4a 100644
--- a/src/addins/tableofcontents/tableofcontentsnoteaddin.cpp
+++ b/src/addins/tableofcontents/tableofcontentsnoteaddin.cpp
@@ -3,7 +3,7 @@
* It lists note's table of contents in a menu.
*
* Copyright (C) 2013 Luc Pionchon <pionchon luc gmail com>
- * Copyright (C) 2013,2015-2017 Aurimas Cernius <aurisc4 gmail com>
+ * Copyright (C) 2013,2015-2017,2019 Aurimas Cernius <aurisc4 gmail com>
*
* 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
@@ -124,13 +124,13 @@ void TableofcontentsNoteAddin::on_foregrounded()
}
-std::map<int, Gtk::Widget*> TableofcontentsNoteAddin::get_actions_popover_widgets() const
+std::vector<gnote::PopoverWidget> TableofcontentsNoteAddin::get_actions_popover_widgets() const
{
auto widgets = NoteAddin::get_actions_popover_widgets();
auto toc_item = gnote::utils::create_popover_submenu_button("tableofcontents-menu", _("Table of
Contents"));
- gnote::utils::add_item_to_ordered_map(widgets, gnote::TABLE_OF_CONTENTS_ORDER, toc_item);
+ widgets.push_back(gnote::PopoverWidget::create_for_note(gnote::TABLE_OF_CONTENTS_ORDER, toc_item));
auto toc_menu = gnote::utils::create_popover_submenu("tableofcontents-menu");
- gnote::utils::add_item_to_ordered_map(widgets, 100000, toc_menu);
+ widgets.push_back(gnote::PopoverWidget::create_custom_section(toc_menu));
std::vector<Gtk::Widget*> toc_items;
get_toc_popover_items(toc_items);
diff --git a/src/addins/tableofcontents/tableofcontentsnoteaddin.hpp
b/src/addins/tableofcontents/tableofcontentsnoteaddin.hpp
index 2f7bf3fb..af654b9a 100644
--- a/src/addins/tableofcontents/tableofcontentsnoteaddin.hpp
+++ b/src/addins/tableofcontents/tableofcontentsnoteaddin.hpp
@@ -3,7 +3,7 @@
* It lists note's table of contents in a menu.
*
* Copyright (C) 2013 Luc Pionchon <pionchon luc gmail com>
- * Copyright (C) 2013,2015-2016 Aurimas Cernius <aurisc4 gmail com>
+ * Copyright (C) 2013,2015-2016,2019 Aurimas Cernius <aurisc4 gmail com>
*
* 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
@@ -61,7 +61,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 on_menu_hidden();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]