[gnote] Remove get_widget_actions



commit 769af2882980335351ca591f70cf98f562754dd4
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sat May 22 21:00:22 2021 +0300

    Remove get_widget_actions

 src/mainwindowembeds.hpp  |  1 -
 src/notewindow.cpp        | 17 -----------------
 src/notewindow.hpp        |  1 -
 src/searchnoteswidget.cpp |  6 ------
 src/searchnoteswidget.hpp |  1 -
 5 files changed, 26 deletions(-)
---
diff --git a/src/mainwindowembeds.hpp b/src/mainwindowembeds.hpp
index 25adfc01..9628eb2f 100644
--- a/src/mainwindowembeds.hpp
+++ b/src/mainwindowembeds.hpp
@@ -99,7 +99,6 @@ class HasActions
 public:
   virtual ~HasActions() {}
   virtual std::vector<PopoverWidget> get_popover_widgets() = 0;
-  virtual std::vector<MainWindowAction::Ptr> get_widget_actions() = 0;
 
   sigc::signal<void> signal_popover_widgets_changed;
 };
diff --git a/src/notewindow.cpp b/src/notewindow.cpp
index e60513d4..fb251248 100644
--- a/src/notewindow.cpp
+++ b/src/notewindow.cpp
@@ -322,17 +322,6 @@ namespace gnote {
     return popover_widgets;
   }
 
-  std::vector<MainWindowAction::Ptr> NoteWindow::get_widget_actions()
-  {
-    std::vector<MainWindowAction::Ptr> res;
-    EmbeddableWidgetHost *h = host();
-    if(h != NULL) {
-      h->find_action("important-note");
-      h->find_action("delete-note");
-    }
-    return res;
-  }
-
     // Delete this Note.
     //
 
@@ -597,12 +586,6 @@ namespace gnote {
     embeddable_toolbar()->set_sensitive(m_enabled);
     if(m_global_keys)
       m_global_keys->enabled(m_enabled);
-    for(const MainWindowAction::Ptr & action : get_widget_actions()) {
-      // A list includes empty actions to mark separators, non-modifying actions are always enabled
-      if(action && !Glib::RefPtr<NonModifyingNoteAction>::cast_dynamic(action)) {
-        action->set_enabled(enable);
-      }
-    }
   }
 
 
diff --git a/src/notewindow.hpp b/src/notewindow.hpp
index 9a98924b..ade5faec 100644
--- a/src/notewindow.hpp
+++ b/src/notewindow.hpp
@@ -184,7 +184,6 @@ public:
     virtual void unreference() const override;
   };
   virtual std::vector<PopoverWidget> get_popover_widgets() override;
-  virtual std::vector<MainWindowAction::Ptr> get_widget_actions() override;
 
   void set_size(int width, int height)
     {
diff --git a/src/searchnoteswidget.cpp b/src/searchnoteswidget.cpp
index 8adb4fa0..a13e73b0 100644
--- a/src/searchnoteswidget.cpp
+++ b/src/searchnoteswidget.cpp
@@ -1467,12 +1467,6 @@ std::vector<PopoverWidget> SearchNotesWidget::get_popover_widgets()
   return popover_widgets;
 }
 
-std::vector<MainWindowAction::Ptr> SearchNotesWidget::get_widget_actions()
-{
-  std::vector<MainWindowAction::Ptr> actions;
-  return actions;
-}
-
 void SearchNotesWidget::on_settings_changed()
 {
   if(m_note_list_context_menu) {
diff --git a/src/searchnoteswidget.hpp b/src/searchnoteswidget.hpp
index c7c5650a..13b2fc6f 100644
--- a/src/searchnoteswidget.hpp
+++ b/src/searchnoteswidget.hpp
@@ -55,7 +55,6 @@ public:
   virtual void set_initial_focus() override;
   virtual void perform_search(const Glib::ustring & search_text) override;
   virtual std::vector<PopoverWidget> get_popover_widgets() override;
-  virtual std::vector<MainWindowAction::Ptr> get_widget_actions() override;
 
   void select_all_notes_notebook();
   void new_note();


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